• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

How to unbrick Huawei P20 Lite ANE-LX1?

Search This thread

Pi0312

Member
Apr 10, 2019
11
4
Hello there,

I managed to unlock the bootloader and the FRP for the Huawei P20 Lite ANE-LX1 (which was on emui 9)
Then I flashed Twrp-3.5.2_9-0.
It worked fine for a while. But when I tired "Wipe data", it got stuck with "Formating f2fs, Done" for 1hour.
So I rebooted the device with volume down + power.
When I try to get back in TWRP, it's getting stuck at the logo and there is also no access to eRecovry, it says "booting now" undefinitely.
And of course no access to the stock rom which says the same thing "booting now" undefinitely.
I also tried fastboot erase system.
I still have acces to the fastboot mode with bootloader unlock + FRP unlock.

Is there a way to unbrick the device?

Let me know if you need any additional info.
Thank you in advance.
 
  • Like
Reactions: LIFATRON3000

-Alf-

Senior Member
Sep 28, 2017
1,649
521
Huawei P9 Lite
Huawei P10 Lite

Pi0312

Member
Apr 10, 2019
11
4
Thanks for the info about "wipe data"

Yes, I have the bootloader unlock code.

here are the results:
ANE-LX1 9.1.0.381 (C432E7R1P7)
vendorcountry: hw/eu
 

-Alf-

Senior Member
Sep 28, 2017
1,649
521
Huawei P9 Lite
Huawei P10 Lite

Pi0312

Member
Apr 10, 2019
11
4
Thanks.

I went to the link for download the Service ROM but...
Am I missing something or the .rar file is locked with a password and one must pay for it?
 

Pi0312

Member
Apr 10, 2019
11
4
sorry, that's not what I meant.
I'm new to this kind of things.

thank you again.
I'll try it tomorrow and report back.

Cheers
 

MrPipa

New member
Sep 14, 2016
2
1
I'm in the exact same soup (and additionally flashed the phenix kernel). How exactly does one do the dload method without dialpad?

I tried:
  1. flash twrp, got stuck on the twrp logo where ADB works, so pushed UPDATE.APP to /sdcard/dload/UPDATE.APP and tried booting while holding both volume keys and power. No luck, boots back to TWRP and stuck on logo.
  2. Flashed stock recovery over recovery_ramdisk and tried again. No luck and stuck on "Your device is booting now..."
  3. both of the above but with an external SD card and instead of /dload/UPDATE.APP I just copied the whole dload directory from the stock service ROM
Nothing seems to work and now I would kindly ask for help - what should I do?
 

LR7875

Senior Member
Jun 25, 2021
873
356
Samsung Galaxy Tab 2
Xiaomi Mi Pad
Try flashing a treble system image.
Click assets then select the 'arm64 vanilla' build.
Extract the .xz file once and rename it system.img.
Put it into the folder that contains fastboot .
Then download this vbmeta.img and put it into the fastboot folder.
Then execute, in fastboot:
fastboot -w
fastboot --disable-verification flash vbmeta vbmeta.img
fastboot flash system system.img
fastboot reboot
 

MrPipa

New member
Sep 14, 2016
2
1
Got it!
I found an old message by @-Alf- where he suggested to use Huawei Update Extractor to extract system, kernel and recovery_ramdisk images from the stock service ROM and flash them manually with fastboot. This works! Or at least the stock rom and erecovery seems to boot fine.

Thank you both @-Alf- and @LR7875 ! These forums can be confusing, I'm used to Nexus 6P where there is plenty ROMs available and no issues with TWRP etc. 😄 I will now go for my second attempt to get LOS 18 to work (with magisk 😏)

Btw the build number is ANE-LX1 9.1.0.381(C432E7R1P7) (hw/eu edition, same as OP)
 
Last edited:
  • Like
Reactions: LR7875

Pi0312

Member
Apr 10, 2019
11
4
Oright, I'm back in the game.

Thank you -Alf-, LR7875 and MrPipa

I too didn't manage to make the dload method work.
So I also followed Alf's suggestion to use Huawei Update Extractor.

Here is a recap for other noobs like me:

My device is:
Huawei P20 lite
Build: ANE-LX1 9.1.0.381 (C432E7R1P7)
vendorcountry: hw/eu

1. Download huawei update extractor here:
http://forum.xda-developers.com/attachment.php?attachmentid=3966156
(from this thread: https://forum.xda-developers.com/t/...updated-v0-9-9-5-open-source-library.2433454/)

2. Download Stock ROM from here: https://androidhost.ru/1O2r
(Thanks to -Alf-)

3. In windows, unzip HuaweiUpdateExtractor_0.9.9.5.zip

4. Unzip "Huawei P20 Lite ( Nova 3e )... .zip"

5. Unzip the update_sd.zip file contained in the folder path /Huawei P20 Lite ( Nova 3e ).../Software/dload/update_sd

5. Launch HuaweiUpdateExtractor.exe

6. Go in the tab settings and uncheck all boxes

7. Back to the first tab, leave the drop down field to "unknown ..."

8. Click on the 3 dots on the right side and select the file UPDATE.APP in the newly unzipped folder update_sd

9. HuaweiUpdateExtractor will show all the .img files contained in the UPDATE.APP file

10. Extract all to a folder (i.e. update-imgs) with right click on any img file and select extract all

11. Put the device in fastboot mode and start flashing .img files (see below)
(from this thread: https://forum.xda-developers.com/t/huawei-p20-lite-bricked.3798842/)

Plug in usb cable into the pc and the device, boot the device into fastboot by pressing and holding Volume Down and power buttons, hold it until it boot into fastboot
Android icon with 2 red lines under it: bootloader unlock and FRP unlock

Then open a terminal or command line in the folder containing all the images i.e. update-imgs
and use these commands:
Code:
fastboot flash cust CUST.img
fastboot flash kernel KERNEL.img
fastboot flash recovery_ramdisk RECOVERY_RAMDIS.img
fastboot flash recovery_vbmeta RECOVERY_VBMETA.img
fastboot flash recovery_vendor RECOVERY_VENDOR.img
fastboot flash system SYSTEM.img
fastboot flash vbmeta VBMETA.img


I'm not sure if they are all necessary but I tried a few of them (system, recovery_ramdis, ramdisk)
and it didn't seem to work.

Only after doing the rest of them, it worked.
Meaning the device could boot into stock rom.

12. Reboot the device after the last command with:
Code:
fastboot reboot

Now back to normal.


After that I got LineageOS 16 on the device with these steps:

1. Download a TWRP, I used this one: https://mega.nz/#!Fgd0xa4R!1o5ejzDnkLJLG2tAZG-STtlJ4nnNCHfwwZdOlmOkrVw
(Thanks to -Alf-, from this thread: https://forum.xda-developers.com/t/recommended-and-tested-twrp-recovery.4199099/)

2. Downlaod LineageOS 16 from here: https://lineageosroms.com/anne/

3. Copy the LineageOS 16 image to device's SD card.

4. Connect the device to a pc via USB cable, put the device in fastboot mode (Volume DOWN + Power buttons until the android icon appears)
then use this command line from the folder containing the TWRP image file (i.e. TWRP-oreo-smart.img):
Code:
fastboot flash recovery_ramdisk TWRP-oreo-smart.img
and reboot with:
Code:
fastboot reboot

5. To get into TWRP, unplug the USB cable and go into recovery mode by pressing and holding Volume UP + Power buttons until Huawei logo appears.

6. In TWRP:
(Again thanks -Alf-, from this thread: https://forum.xda-developers.com/t/rom-official-anne-9-lineageos-16-0.4151163/page-3#post-83601729)

6.a: go to Wipe > Format data, go back to TWRP's main menu
6.b: Wipe > Advanced Wipe > Wipe Dalvik, Cache, Data, System, Internal storage > Swipe to wipe and go back to the TWRP's main menu
6.c: Install > navigate to LineageOS 16's .img file and swipe to install LineageOS
6.d: Back to TWRP's main menu, select Reboot > Reboot recovery > perform factory reset
That part didn't work for me, it kept booting into TWRP.
So I had to get into eRecovery from TWRP, I unplugged the USB cable.
And then pressed Volume UP + Power buttons until the phone rebooted and the Huawei logo appeared.
At the Huawei logo, I released the buttons and the device booted into eRecovery.
Then I could do a factory reset by following the onscreen instructions.

Done, the device reboots and after the Huawei logo appears the LineageOS animation.

Enjoy and again thank you -Alf-, LR7875 and MrPipa


Edit: Added flashing CUST.img as per -Alf- suggestion
Edit: Added remove the USB cable to boot into eRecovery
 
Last edited:

LIFATRON3000

New member
Aug 19, 2021
4
0
Sony Xperia X
Huawei P20 Lite
6.d: Back to TWRP's main menu, select Reboot > Reboot recovery > perform factory reset
That part didn't work for me, so I had to get into eRecovery from outside TWRP by pressing Volume UP + Power buttons until eRecovery appeared
then I could do a factory reset by following the onscreen instructions.
Hello guys, I tried to follow these steps since i also 'bricked' my p20 lite and it worked pretty fine up until the quoted point. When I tap the factory reset the phone instantly shuts of and reboots into twrp. Any idea what could cause this?

My device is:
Huawei P20 lite
Build: ANE-LX1 9.1.0.132(C432E7R1P7)
vendorcountry: hw/eu

Since I have this build I flashed the kernel, system, recovery_ramdisk etc. with .132 build .zip, (rest of the steps were exactly the same), should I have used the .zip @-Alf- provided?
 
Last edited:

Pi0312

Member
Apr 10, 2019
11
4
Hello LIFATRON3000,

I've tried a few build as well and they worked fine. So my guess is that the issue might not be the build.
I find that when the phone is connected to a usb cable, it keeps booting into twrp when I try to get into eRecovery.

So when in trwp, unplug the usb cable and then press Volume UP + Power button.

It should reboot the phone then you'll see the Huawei logo again. Which is when you should release the buttons.

A new screen appears after Huawei that says a few things with a yellow URL and "booting now..." in white, instead of the regular similar screen but with 3 yellow options like: press up for 3 sec or power to boot or if you do nothing it will boot by itself.
And it's after that, that eRecovery is hidden.

Have you tried that already? Unpluging the USB cable and tried to Volume UP + power button?
 

-Alf-

Senior Member
Sep 28, 2017
1,649
521
Huawei P9 Lite
Huawei P10 Lite
In Huawei devices there are two Recovery , Recovery and eRecovery, each has different functions.
How to enter Recovery on EMUI 9.1: you need to turn off the phone (unlike EMUI 8) and press and hold Power + Vol Up.
If your Recovery is patched by Magisk, use this Guide

How to enter eRecovery -
1. Locked phone -on E 9.1 - turn off, connect your phone to charger or PC, then press and hold Power +
Vol Up.
2.Unlocked phone - restart your phone, when the yellow warning appears on the screen, press and hold Vol Up for 3 sec. If you have TWRP installed instead of eRecovery, you can use this to enter TWRP.
Recovery:
IMG_20210821_102828.jpg

eRecovery:
update.png

And it's after that, that eRecovery is hidden.
????
 

Pi0312

Member
Apr 10, 2019
11
4
Thank you @-Alf-
It's good to know. I didn't know that there were 2 of them.
I thought there was only eRecovery. So far I only saw the second screen shot but not the first one.

Regarding the "And it's after that, that eRecovery is hidden."
What I mean is when the phone is unplugged and either turned off or inside of TWRP, if I press Volume UP + power button, I get this screen:
bootScreen4eRecovery.jpg


and it's ONLY after that screen that I get into eRecovery.


If I get this screen:

bootScreen4TWRP-v3.jpg

and press Volume UP for 3 seconds as indicated in the yellow text, I don't get in eRecovery. Instead I get back inside of TWRP.
Not sure if it's how it's supposed to be but that's what I got so far.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Oright, I'm back in the game.

    Thank you -Alf-, LR7875 and MrPipa

    I too didn't manage to make the dload method work.
    So I also followed Alf's suggestion to use Huawei Update Extractor.

    Here is a recap for other noobs like me:

    My device is:
    Huawei P20 lite
    Build: ANE-LX1 9.1.0.381 (C432E7R1P7)
    vendorcountry: hw/eu

    1. Download huawei update extractor here:
    http://forum.xda-developers.com/attachment.php?attachmentid=3966156
    (from this thread: https://forum.xda-developers.com/t/...updated-v0-9-9-5-open-source-library.2433454/)

    2. Download Stock ROM from here: https://androidhost.ru/1O2r
    (Thanks to -Alf-)

    3. In windows, unzip HuaweiUpdateExtractor_0.9.9.5.zip

    4. Unzip "Huawei P20 Lite ( Nova 3e )... .zip"

    5. Unzip the update_sd.zip file contained in the folder path /Huawei P20 Lite ( Nova 3e ).../Software/dload/update_sd

    5. Launch HuaweiUpdateExtractor.exe

    6. Go in the tab settings and uncheck all boxes

    7. Back to the first tab, leave the drop down field to "unknown ..."

    8. Click on the 3 dots on the right side and select the file UPDATE.APP in the newly unzipped folder update_sd

    9. HuaweiUpdateExtractor will show all the .img files contained in the UPDATE.APP file

    10. Extract all to a folder (i.e. update-imgs) with right click on any img file and select extract all

    11. Put the device in fastboot mode and start flashing .img files (see below)
    (from this thread: https://forum.xda-developers.com/t/huawei-p20-lite-bricked.3798842/)

    Plug in usb cable into the pc and the device, boot the device into fastboot by pressing and holding Volume Down and power buttons, hold it until it boot into fastboot
    Android icon with 2 red lines under it: bootloader unlock and FRP unlock

    Then open a terminal or command line in the folder containing all the images i.e. update-imgs
    and use these commands:
    Code:
    fastboot flash cust CUST.img
    fastboot flash kernel KERNEL.img
    fastboot flash recovery_ramdisk RECOVERY_RAMDIS.img
    fastboot flash recovery_vbmeta RECOVERY_VBMETA.img
    fastboot flash recovery_vendor RECOVERY_VENDOR.img
    fastboot flash system SYSTEM.img
    fastboot flash vbmeta VBMETA.img


    I'm not sure if they are all necessary but I tried a few of them (system, recovery_ramdis, ramdisk)
    and it didn't seem to work.

    Only after doing the rest of them, it worked.
    Meaning the device could boot into stock rom.

    12. Reboot the device after the last command with:
    Code:
    fastboot reboot

    Now back to normal.


    After that I got LineageOS 16 on the device with these steps:

    1. Download a TWRP, I used this one: https://mega.nz/#!Fgd0xa4R!1o5ejzDnkLJLG2tAZG-STtlJ4nnNCHfwwZdOlmOkrVw
    (Thanks to -Alf-, from this thread: https://forum.xda-developers.com/t/recommended-and-tested-twrp-recovery.4199099/)

    2. Downlaod LineageOS 16 from here: https://lineageosroms.com/anne/

    3. Copy the LineageOS 16 image to device's SD card.

    4. Connect the device to a pc via USB cable, put the device in fastboot mode (Volume DOWN + Power buttons until the android icon appears)
    then use this command line from the folder containing the TWRP image file (i.e. TWRP-oreo-smart.img):
    Code:
    fastboot flash recovery_ramdisk TWRP-oreo-smart.img
    and reboot with:
    Code:
    fastboot reboot

    5. To get into TWRP, unplug the USB cable and go into recovery mode by pressing and holding Volume UP + Power buttons until Huawei logo appears.

    6. In TWRP:
    (Again thanks -Alf-, from this thread: https://forum.xda-developers.com/t/rom-official-anne-9-lineageos-16-0.4151163/page-3#post-83601729)

    6.a: go to Wipe > Format data, go back to TWRP's main menu
    6.b: Wipe > Advanced Wipe > Wipe Dalvik, Cache, Data, System, Internal storage > Swipe to wipe and go back to the TWRP's main menu
    6.c: Install > navigate to LineageOS 16's .img file and swipe to install LineageOS
    6.d: Back to TWRP's main menu, select Reboot > Reboot recovery > perform factory reset
    That part didn't work for me, it kept booting into TWRP.
    So I had to get into eRecovery from TWRP, I unplugged the USB cable.
    And then pressed Volume UP + Power buttons until the phone rebooted and the Huawei logo appeared.
    At the Huawei logo, I released the buttons and the device booted into eRecovery.
    Then I could do a factory reset by following the onscreen instructions.

    Done, the device reboots and after the Huawei logo appears the LineageOS animation.

    Enjoy and again thank you -Alf-, LR7875 and MrPipa


    Edit: Added flashing CUST.img as per -Alf- suggestion
    Edit: Added remove the USB cable to boot into eRecovery
    1
    Hello there,

    I managed to unlock the bootloader and the FRP for the Huawei P20 Lite ANE-LX1 (which was on emui 9)
    Then I flashed Twrp-3.5.2_9-0.
    It worked fine for a while. But when I tired "Wipe data", it got stuck with "Formating f2fs, Done" for 1hour.
    So I rebooted the device with volume down + power.
    When I try to get back in TWRP, it's getting stuck at the logo and there is also no access to eRecovry, it says "booting now" undefinitely.
    And of course no access to the stock rom which says the same thing "booting now" undefinitely.
    I also tried fastboot erase system.
    I still have acces to the fastboot mode with bootloader unlock + FRP unlock.

    Is there a way to unbrick the device?

    Let me know if you need any additional info.
    Thank you in advance.
    1
    Those links are for nova 3e, does it work also for ANE-LX1?
    I'm not an idiot bro ....
    1
    Got it!
    I found an old message by @-Alf- where he suggested to use Huawei Update Extractor to extract system, kernel and recovery_ramdisk images from the stock service ROM and flash them manually with fastboot. This works! Or at least the stock rom and erecovery seems to boot fine.

    Thank you both @-Alf- and @LR7875 ! These forums can be confusing, I'm used to Nexus 6P where there is plenty ROMs available and no issues with TWRP etc. 😄 I will now go for my second attempt to get LOS 18 to work (with magisk 😏)

    Btw the build number is ANE-LX1 9.1.0.381(C432E7R1P7) (hw/eu edition, same as OP)
    1
    Super, congrats!

    P.S.: if I may add something - often it is important to flash CUST.img partition.