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

[RECOVERY][Unofficial] TWRP 3.2.1-0 [Notch Friendly] P20 Lite Edition

Search This thread

alveola666

Senior Member
Feb 25, 2014
80
9

Attachments

  • IMG_20190110_144345_453.jpg
    IMG_20190110_144345_453.jpg
    49.4 KB · Views: 373

alveola666

Senior Member
Feb 25, 2014
80
9
Alright then. I thought it was common issue, but if it's supposed to be writable, then it's very likely that the problem is on my end. I'll look into it and report if I find the solution. Cheers.
 
  • Like
Reactions: kilroystyx

aIecxs

Senior Member
Feb 17, 2016
1,109
341
gitlab.com
Hi can you compile TWRP for huawei P20 lite (ane-lx1) EMUI 9 , android Pie
have you unlocked bootloader? Does TWRP for EMUI 8 boot from fastboot?
Yes, my bootloader is unlocked, I flashed TWRP for Emui 8 but I have a blank screen with "error mode, recovery load failed" when I press vol up + power button , I have EMUI 9.
please try booting without flashing:
Code:
fastboot boot TWRP_3.2.1-0_ANE-LX1_Full_01.img
even if it fails or loops on TWRP splash screen, check if adb is working and check the output of partitions:
Code:
adb shell
mount /system -r
mount
ls -l /dev/block/bootdevice/by-name
cat /etc/recovery.fstab
 

Commando2936

Member
Jun 7, 2019
11
2
22
Sainte Marie
please try booting without flashing:
Code:
fastboot boot TWRP_3.2.1-0_ANE-LX1_Full_01.img
even if it fails or loops on TWRP splash screen, check if adb is working and check the output of partitions:
Code:
adb shell
mount /system -r
mount
ls -l /dev/block/bootdevice/by-name
cat /etc/recovery.fstab

Huawei phone doesn't provide
HTML:
fastboot boot ….

HTML:
mount /system -r
HTML:
mount: bad /etc/fstab: No such file or directory

HTML:
mount
HTML:
too long...

HTML:
 ls -l /dev/block/bootdevice/by-name/
HTML:
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 bootfail_info -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 cache -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 cust -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 dfx -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 dto -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 dts -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 eng_system -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 eng_vendor -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 erecovery_kernel -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 erecovery_ramdisk -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 erecovery_vbmeta -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 erecovery_vendor -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 20 2019-06-09 17:01 fastboot -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 2019-06-09 17:01 frp -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 fw_hifi -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 20 2019-06-09 17:01 fw_lpm3 -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 hisitest0 -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 hisitest1 -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 hisitest2 -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 kernel -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 misc -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 modem_fw -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 modem_om -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 modem_secure -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 modemnvm_backup -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 20 2019-06-09 17:01 modemnvm_factory -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 modemnvm_img -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 modemnvm_system -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 modemnvm_update -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 20 2019-06-09 17:01 nvme -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 odm -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 20 2019-06-09 17:01 oeminfo -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 patch -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 persist -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 preload -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 product -> /dev/block/mmcblk0p56
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 recovery_ramdisk -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 recovery_vbmeta -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 recovery_vendor -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 reserved2 -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 20 2019-06-09 17:01 reserved3 -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 reserved4 -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 reserved5 -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 reserved9 -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 rrecord -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 secure_storage -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 sensorhub -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 splash2 -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 system -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 teeos -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 trustfirmware -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 userdata -> /dev/block/mmcblk0p57
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 vbmeta -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 vendor -> /dev/block/mmcblk0p55
lrwxrwxrwx 1 root root 21 2019-06-09 17:01 version -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 20 2019-06-09 17:01 vrl -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 20 2019-06-09 17:01 vrl_backup -> /dev/block/mmcblk0p2

HTML:
cat /etc/recovery.fstab
HTML:
cat: /etc/recovery.fstab: No such file or directory
 

aIecxs

Senior Member
Feb 17, 2016
1,109
341
gitlab.com
Thx i didn't know that fastboot boot boot.img is disabled.

the output looks good to me, the only mismatch i can see is missing in recovery.fstab,
Code:
/dev/block/bootdevice/by-name/preload
/dev/block/bootdevice/by-name/eng_system
/dev/block/bootdevice/by-name/eng_vendor
while these symlinks not listed in your output
Code:
/dev/block/bootdevice/by-name/ramdisk
/dev/block/bootdevice/by-name/reserved8

i have less knowlegde what all these partitions stand for, but the TWRP is matching your phones partition layout. i don't know why this TWRP does not work for you. maybe you flashed something in wrong place or wrong order?

i recommend to flash again
 
Last edited:

Commando2936

Member
Jun 7, 2019
11
2
22
Sainte Marie
I solve my problem :
For EMUI 9 users , you must download your firmware file from androidhost . ru and
extract update.app then download Huawei Update Extractor , open update.app and extract :
- RECOVERY-RAMDIS.img
- RECOVERY-VBMETA.img
- RECOVERY-VENDOR.img
Open terminal and type :
fastboot flash recovery-ramdisk RECOVERY-RAMDIS.img
fastboot flash recovery-vendor RECOVERY-VBMETA.img
fastboot flash recovery-vbmeta RECOVERY-VENDOR.img
After you can flash TWRP .
It's work for me !
 
Last edited:
  • Like
Reactions: aIecxs

kilroystyx

Senior Member
Nov 1, 2011
1,142
434
Braga
Was anybody able to successfully root the official EMUI9 using this TWRP?
I am able to install TWRP from @kilroystyx and also the latest Magisk but after reboot the Magisk app says that the device is not rooted.

EMUI 9.1 have a different file system (EROFS), not sure but I think Magisk do not support yet.

EMUI 9.0 for root the device you don't need TWRP.
I use Magisk app to patch the stock recovery, then flash this recovery patched in the recovery_ramdisk partition in fastboot mode, then reboot into recovery and Magisk do the trick. To have root and maintain you need always boot into recovery.
You have root or you have TWRP, not both.
 
  • Like
Reactions: ladislav.heller

chacox

Senior Member
Jun 28, 2012
175
90
Barquisimeto
EMUI 9.1 have a different file system (EROFS), not sure but I think Magisk do not support yet.

EMUI 9.0 for root the device you don't need TWRP.
I use Magisk app to patch the stock recovery, then flash this recovery patched in the recovery_ramdisk partition in fastboot mode, then reboot into recovery and Magisk do the trick. To have root and maintain you need always boot into recovery.
You have root or you have TWRP, not both.
Last version of magisk already supports EMUI9.1

v19.3

- [MagiskHide] Hugely improve process monitor implementation, hopefully should no longer cause 100% CPU and daemon crashes

- [MagiskInit] Wait for partitions to be ready for early mount, should fix bootloops on a handful of devices

- [MagiskInit] Support EROFS used in EMUI 9.1

- [MagiskSU] Properly implement mount namespace isolation

- [MagiskBoot] Proper checksum calculation for header v2



Sent from my ANE-LX1 using XDA-Developers Legacy app
 
  • Like
Reactions: kilroystyx

kilroystyx

Senior Member
Nov 1, 2011
1,142
434
Braga
Last version of magisk already supports EMUI9.1

v19.3

- [MagiskHide] Hugely improve process monitor implementation, hopefully should no longer cause 100% CPU and daemon crashes

- [MagiskInit] Wait for partitions to be ready for early mount, should fix bootloops on a handful of devices

- [MagiskInit] Support EROFS used in EMUI 9.1

- [MagiskSU] Properly implement mount namespace isolation

- [MagiskBoot] Proper checksum calculation for header v2
I'm glad that now it is supporting EROFS, thanks for the info ?

By the way do you know a tool to unpack EROFS partition?
tia
 

Sh4d0wk1ng

Member
Nov 6, 2018
18
2
OnePlus 6T
You root emui 9 by downloading magisk apk, installing it.
Using Huawei extractor to removed your ramdisk_recovery.img. from the firmware. using magisk apk to patch it.
Then booting to fastboot and flashing in the recovery_ramdisk. You will have to boot into recovery to access magisk.

Read the magisk documentation in the magisk GitHub. You don't need twrp recovery to install it.

https://topjohnwu.github.io/Magisk/install.html#emui-9-or-higher
 

Kodize

Member
Nov 28, 2018
31
5
Saltillo
one question.

II come from other devices of other brands, all my life I have installed twrp, rooted and installed roms, in this case for the p20 lite you do not ask me any unlocking boot to install twrp?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    [RECOVERY][Unofficial][TWRP 3.2.1-0][Notch Friendly] P20 Lite Edition

    Don't use WIPE the data partition

    HTML:
    [/B]
     * Your warranty is now void.
     * I am not responsible for bricked devices.
     * ATTENTION: YOU are choosing to install this recovery at your own risk.
     * I do not take responsibility for any problems with your device.

    Features:
    - This recovery is based on the TWRP from Pretoriano80
    - Notch-friendly; due to notch-design I re-positioned the clock, now it is visible all the time
    - I added the possibility to do a full device backup, thanks to Sudeep Duhoon

    Installation:
    Code:
    fastboot flash recovery_ramdisk TWRP_3.2.1-0_ANE-LX1_Full_01.img
    fastboot reboot
    
    *Note many devices will replace your custom recovery automatically during first boot.
    To prevent this, after typing fastboot reboot, remove the USB cable and hold the Vol+ key and boot to TWRP.
    Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP.
    If you don't follow this step, you will have to repeat the install.

    Note: No sources available due to minor changes on the Pretoriano80's TWRP

    Special Thanks:
    @Pretoriano80
    @zxz0O0
    @Sudeep Duhoon
    @persona78
    +TeamWin
    +OpenKirin

    Version Information:
    Status: Under testing

    Created: 2018-06-06
    Last Updated:

    Download link:
    TWRP_3.2.1-0_ANE-LX1_Full_01.img
    4
    If your firmware is EMUI9.1, then can u pls describe the exact steps how did you make Magisk working on it?


    At first, follow the steps from Magisk Install:
    1) Download a current FullOTA Firmware
    2) deflate UPDATE.APP
    3) Extract RECOVERY_RAMDIS.img (Using Huawei Image Extractor)
    4a) Install Magsik-App
    adb install MagiskManager-v7.3.2.apk
    4b) Push Recovery to device
    adb push RECOVERY_RAMDIS.img /sdcard/Download
    4c) Let Magisk patch Recovery (Start MagisManager on device Install → Install → Select and Patch a File)
    4d) Pull patched recovery from device
    adb pull /sdcard/Download/magisk_patched.img
    5) Restart device with VOL- and Power, Install this image to RECOVERY_RAMDISK
    fastboot flash recovery_ramdisk recovery_ramdisk_patched.img
    6) Now you can either do fastboot reboot, pull out the cord and push volup+power or do it slowly:
    fastboot reboot
    adb reboot recovery
    7) Start Magsik, push install to set up some necesarry stuff reboot

    Take care: you'll always have to reboot using recovery
    From Magsik-Doc in GitHub:
    In summary, after installing Magisk:

    (Powering up normally) → (System with NO Magisk)
    (OEM Recovery Key Combo) → (Splash screen) → (Release all buttons) → (System with Magisk)
    (OEM Recovery Key Combo) → (Splash screen) → (Keep pressing volume up) → (Actual recovery)


    Some thinks I've noticed:
    First of all, I was not able to enter the recovery (but this may be concerned as I almost always have connect the usb for now)
    Taht's the reason, I was not able to reset/wipe the device (as eRecovery uses the normal recovery to wipe the device).
    Don't panic: just reflash the original RECOVERY_RAMDIS.img and do everyhting nesessary.

    Good luck,
    Peter
    2
    download link is broken
    can anyone share the recovery file
    This is an outdated version...

    Look here
    2
    Will this recovery and future custom ROMs be compatible with ane-lx3?
    This recovery should be compatible with ANE-LX3.
    I don't have an answer in short term if this recovery will be compatible with custom ROMs but I'm work on it.
    2
    Hi, is it possible to install this recovery in a completely stock unit without USB debugging enabled? Thanks!
    Hi, USB debugging has nothing to do with this process, to flash TWRP the bootloader must be unlocked.