This post might contain affiliate links. You don't pay more, but I receive commission if you buy something through one of those links.

How to restore your Huawei P8 Lite to factory if you’ve rooted it with TWRP and can’t upgrade to Marshmallow

Follow these steps if you'd like to upgrade to Android Marshmallow but can't due to a problem with TWRP. This is an old post aimed at Huawei P8 Lite owners, but it might work for other Huawei models.
Share on email
Share on whatsapp
Share on facebook
Share on pinterest

I installed TWRP on my Huawei (pronounced wah-way, not hoo-ha-hoo-hay) a while back, hoping to replace Huawei’s EMUI completely, perhaps with CyanogenMod or something closer to stock Android than EMUI.

It was not to be. For reasons I don’t grasp, you can’t hack a Huawei phone the same way you can other Android devices.

I was elated when Huawei eventually rolled out their version of Android Marshmallow to South Africans. At least I’d have Android 6 running on my P8 Lite, despite EMUI, which I despise.

So I performed OTA downloads for both my wife’s P8 Lite and mine.

Hers went smoothly; mine didn’t want to upgrade. Kept on throwing an error message.

So I decided to unroot the phone or do whatever needs to be done to roll back the P8 Lite to stock state.

This is when the “fun” began.

I spent days googling for a solution; found plenty floating around the net. The problem is, they’re mostly aimed at geeks and semi-geeks. I consider myself less than semi-geek. What does this online marketer know about rooting, flashing, stock roms, this APP file and that Flashboot?

I eventually came across a post that moved me forward.

Without further ado, here’s how to roll back your Huawei P8 Lite if you’ve installed TWRP and would like to upgrade to Marshmallow but can’t.

Warning: follow these steps at your own risk… And backup your data before you continue…

Download stock P8 Lite firmware

I’m using MTN in South Africa. I downloaded the “HUAWEI P8 Lite Firmware (ALE-L21, Android5.0.1, EMUI3.1.1, C16B141, South Africa, channel-others)” package. My son told me he’d downloaded a European package which worked fine for him (he owns the P8).

  • Get it from the Huawei ZA website.
    • They’ve added the EMUI 4 Marshmallow package since. Might as well get that.
    • This file is huge. You need fastish internet to keep sane.

Enable developer options

If you have TWRP installed, your phone’s developer options are probably active. If not, activate it following these steps:

  • Tap on the Settings icon.
  • Scroll down to “About phone” and tap on it.
  • Tap on “Build number” a few times.
    • A message pops up telling you that your developer options have been enabled, once you’ve tapped enough.
  • Tap the back button.
  • You’ll now notice a “Developer options” menu item. Tap on it.
  • Inside developer options, tap on “USB debugging” to enable it.

Download the Huawei Update Extractor

You need this tool for some geeky stuff. I don’t know how or why it works, but it does.

  • Download it from XDA.
    • Version at time of writing.
  • Unzip it.
    • You’ll notice a file called “HuaweiUpdateExtractor.exe” inside the folder. This is all you need to concern yourself with. It doesn’t install when you double click it; it just runs the program.

Download & install Minimal ADB & Fastboot

You need this tool to take another geeky step. What, you thought I’d explain what this does? How should I know?

  • Download the EXE from XDA.
    • Version 1.4.2 at time of writing.
  • Once downloaded, double click on the file. Follow the steps to install the program.
    • It asks whether you want it to create a desktop icon when you install. You can allow this.
    • On my machine it installed to “C:\Program Files (x86)\Minimal ADB and Fastboot”.
    • At the end of the installation it asks whether you want to run the program. You can run it if you wish.

Prepare files from the stock firmware download

  • Unzip the “HUAWEI P8 Lite Firmware (ALE-L21, Android5.0.1, EMUI3.1.1, C16B141, South Africa, channel-others)” file you downloaded earlier.
    • I use 7-Zip for this sort of operation.
    • You’re presented with some PDF files and a dload folder. Delete the PDF files. The dload’s where it’s at.
  • Double click the “HuaweiUpdateExtractor.exe” file you downloaded earlier.
  • Underneath the “Update file” text at the top left of the tool there’s a long white box. To the right of that box there’s a little square grey box with two dots inside. Click on the grey box.
  • Find the dload folder, navigate into it and double click on the UPDATE.APP file.
    • This opens a bunch of files inside the Huawei Update Extractor.
  • Highlight the following files together:
    • BOOT.img
    • RECOVERY.img
    • SYSTEM.img
    • CUST.img
  • Right click on this selection.
  • Click on “Extract Selected”.
    • Extract it to your desktop.
    • The tool might create additional files. Delete those. You just need the four mentioned above.
  • Close the Huawei Update Extractor.

Turn off your phone and plug it into your PC

For this procedure to succeed you need your phone to be off.

  • Switch off your phone.
  • Plug your phone into your PC via USB.

Use Minimal ADB and Fastboot

  • Copy or cut the four files you extracted (BOOT.img, RECOVERY.img, SYSTEM.img & CUST.img) and place them inside the “Minimal ADB and Fastboot” folder.
    • On my laptop it’s at C:\Program Files (x86)\Minimal ADB and Fastboot.
  • If your Command Prompt window isn’t open, open it inside the “Minimal ADB and Fastboot” folder.
    • Inside the “Minimal ADB and Fastboot” folder, hold down shift and click the right mouse button.
    • Click the “Open command window here” option.

Switch on your phone

Your phone is plugged into your PC via USB now. Your four files (BOOT.img, RECOVERY.img, SYSTEM.img & CUST.img) extracted from your firmware file, UPDATE.APP (found inside the dload folder), are now inside your “Minimal ADB and Fastboot” folder (my location: C:\Program Files (x86)\Minimal ADB and Fastboot).

You have a command window open (which you opened inside the “Minimal ADB and Fastboot” folder).

  • Press and hold down your phone’s volume down button. While it’s pressed down, press the power button.

Run Fastboot commands

  • Type the command, fastboot devices, into the command window.
    • This should display your phone’s number on the screen. If it doesn’t, your phone is not connected. You’re on your own on this one.
  • Type the command, fastboot flash boot BOOT.IMG, into the command window.
    • Wait for the process to finish.
  • Type the command, fastboot flash recovery RECOVERY.IMG, into the command window.
    • Wait for the process to finish.
  • Type the command, fastboot flash system SYSTEM.IMG, into the command window.
    • Wait for the process to finish.
  • Type the command, fastboot flash cust CUST.IMG, into the command window.
    • Wait for the process to finish.
  • Type the command, fastboot restart, into the command window.

Your phone should now restart with a fresh Huawei install…

…but things went south for me at this stage.

If you’re stuck in boot loop

My phone went into a boot loop. This means that the phone loaded the Huawei logo, but then froze. It wouldn’t switch off; kept turning on automatically, never progressing past the Huawei logo.

Here’s how to handle that little predicament…

Download au_temp.cfg

You need this file to make this operation work.

Remove your phone’s micro SD card and insert into PC

I presume you own a micro SD card. You should have one. The P8 Lite comes with so little storage it’s hard to imagine using one without a micro SD card.

  • Remove the micro SD card from your phone.
  • Place the micro SD card into an SD card adaptor.
  • Place the SD card adaptor into your PC’s SD slot.

Place appropriate files inside dload

You should have a “dload” folder. This folder must contain two files:

  • UPDATE.APP (you downloaded this from your preferred Huawei location; I got mine from the Huawei ZA website).
  • au_temp.cfg.

Upload dload folder to your micro SD card in Windows

  • Navigate to your micro SD card location on your PC.
  • Copy the dload folder containing the two files, UPDATE.APP & au_temp.cfg, into the root folder of your micro SD card.

Remove micro SD card from PC

With the dload folder now housing the appropriate files safely on your micro SD, you can remove it from your PC.

Be sure to make use of the safe removal function.

Place the micro SD card into your phone

Your phone is actually supposed to be off when you perform this step. It wasn’t possible to power mine down.

I pressed the power button and inserted the micro SD in the brief moment that the phone took to restart. I did it as quickly as possible.

It worked.

The phone boots from micro SD

If all goes well, the phone should now automatically boot from the micro SD card. This gives you a fresh install of Huawei that needs to be set up from scratch.

In conclusion

I hope this helped get your P8 Lite back to normal. This procedure might work for other Huawei models too, although I can’t say for sure.

If you can’t manage to get it working, please don’t leave a comment below. I’m in no position to help you troubleshoot. Visit the XDA forums and google for answers. That’s the best advice I can give you.

0 0 vote
Article Rating
Most Voted
Newest Oldest
Inline Feedbacks
View all comments

“please don’t leave a comment below”, BHAHAHAHA!


It has so helpfull. A lot of thanks.

Bjorn Lee

My man… this was beautiful!!! You broke it all the way down, and i appreciate you iv that!!! Thank You!!!


My p8 lite sitll rebooting on huawei logo


You’re a wonderful man. I had no bootloop problem, thankfully. But seriously you are probably inadvertently saving lives, given how important phones can be these days! Thanks again.

Steve Waters

If you’re stuck in boot loop
How long does it usally take after you insterted the sd?

Ivan Maškov

i had that loop problem i solved it when wiped all data on phone,,dalvik etc,,on twrp,,,after that works as it supposed to,,

Ascanio Barbarani

I’ve moved some files from internal memory to sd card trying to free space up but I’m pretty sure I’ve missplaced some “operational” files and my media files now won’t remain saved or uncorrupted for more than a few minutes. Then I lose them God knows where. Would it make sense to make a backup and format the device to factory settings or do I have to do your procedure? If I format to factory settings, would the back up take care of all the missplaced files (probably containing all the media I am not able to view anymore) or… Read more »

Lunathi Nathi Nesi

So my phone is on boot loop… Do I just insert the sd card and wait?

Henco Potgieter

Dankie dankie dankie – F##%**n DANKIE!!!

Chantal Flynn

Hi, die link wil nie werk nie, ek het wel op n ander plek die vodacom en mtn software gekry maar daar is net n file in. was joune ook so

Scroll to Top