[ROOT] How to properly root the P20 lite

Search This thread

Barrel Titor

Member
Jul 21, 2015
31
10
Vienna
OnePlus 7 Pro
Hi, I used the patched ramdisk uploaded few posts previous yours.

Could you tell me what's the difference from using patched ramdisk VS patched boot image? Which one is better?

Hey. There is no difference between a ramdisk image and a boot image. With a new partition layout they renamed the boot partition into ramdisk. (okay technically there may be a difference but for our intents and purposes its the same)

It doesn't matter anyways how the .img file is named, however you must use the "fastboot flash ramdisk xyz.img" command, so it knows where to flash the parched .img file.
 

Zapthos

Senior Member
Apr 3, 2018
263
73
Is this still possible with EMUI 9.1 or do I have to downgrade to EMUI 8.0? Since I got my screen repared at a store yesterday the warranty is probably voided anyway.
 

Barrel Titor

Member
Jul 21, 2015
31
10
Vienna
OnePlus 7 Pro
Is this still possible with EMUI 9.1 or do I have to downgrade to EMUI 8.0? Since I got my screen repared at a store yesterday the warranty is probably voided anyway.

This is still possible with 9.1, however it changed a little because of A/B partitioning

I have made a reddit comment explaining the process. I will paste it here for you.

Hello!
According to this guide, since EMUI 9+ the recovery_ramdisk parition will be used for magisk payload.
1) Download your current firmware with huawei firmware finder
2) Extract the UPDATE.APP from the update.zip file downloaded by firmwarefinder
3) Extract recovery_ramdisk.img from the UPDATE.APP (for me it was called "recovery_ramdis.img)
4) Transfer the ramdisk image to your phone by any means
5) In magisk choose "Install"->"Install"(again)->"Select and Patch a File"->[Now choose the recovery_ramdisk.img]
6) Magisk should now integrate the magisk payload into your recovery_ramdisk.img and will produce a new file called "magisk_patched,img" located in your /storage/emulated/0/Download directory
7) Get the patched.img via "adb pull /storage/emulated/0/Download/magisk_patched.img"
8) Restart your device in fastboot mode. Unfortunately button press events are not captured properly at the moment so you might try "adb reboot bootlaoder" command
9) Execute "fastboot flash recovery_ramdisk magisk_patched.img"
???
10)Profit

edit2: Unfortunately booting's a bit ****y now.. Whereas you used to boot by just simply pressing the power btn (from power off state) and acknowledging that your phone is now oH sO vErY unseCUre PLS UnDo kThX, you now HAVE to press vol up+power btn until you see the first "huawei" flash image.. After that release every button. Your phone should now show you the "oMg SO scARy unloCk" screen, however it should now just say "your device is now booting" instead of giving you 3 options and making you wait 5 seconds.. Rebooting is a bit **** now but since it no longer gives you those 5 seconds wait time, i see this as an absolute win ;))
edit3: don't worry, be happy. After testing, i can report that this works for me. You may take my recovery_ramdisk.img. I used this based on the 261080 build (based on android 9.1). I am in the C432 region (Western Europe, France). I am uncertain if this works internationally, so you might not want to use this if you are outside this region. Otherwise feel free to!
Big Download link to recovery_ramdisk
 
  • Like
Reactions: Zapthos

Zapthos

Senior Member
Apr 3, 2018
263
73
This is still possible with 9.1, however it changed a little because of A/B partitioning

I have made a reddit comment explaining the process. I will paste it here for you.

Thanks, gonna root my device ASAP!

---------- Post added at 07:18 PM ---------- Previous post was at 07:13 PM ----------

This is still possible with 9.1, however it changed a little because of A/B partitioning

I have made a reddit comment explaining the process. I will paste it here for you.

Actually, how do I get an unlock code? The link leads me to a page talking about EMUI 10. Also, how do I enter Magisk when I haven't rooted it yet and thus I don't have it?
 
  • Like
Reactions: Barrel Titor

Barrel Titor

Member
Jul 21, 2015
31
10
Vienna
OnePlus 7 Pro
Thanks, gonna root my device ASAP!

---------- Post added at 07:18 PM ---------- Previous post was at 07:13 PM ----------



Actually, how do I get an unlock code? The link leads me to a page talking about EMUI 10. Also, how do I enter Magisk when I haven't rooted it yet and thus I don't have it?

Oh sorry, normally you get the unlock code from huawei.. If you have requested an unlock code before, that code will still work, provided the repair shop has not replaced the motherboard of your phone that is.
However, huawei has stopped distributing unlock codes about a year ago..
You enter magisk by flashing the recovery_ramdisk which contains some magisk code. You can use the recovery_ramdisk i have attached to my comment, it should work fine.

Unfortunately i do not know any other methods of getting hands at a bootloader unlock code. I heard there are some online resellers that can generate bootloader unlock codes for you for a fee, but i think that's all a bit shady and i would give this a shot only as a last resort..
 

Zapthos

Senior Member
Apr 3, 2018
263
73
Oh sorry, normally you get the unlock code from huawei.. If you have requested an unlock code before, that code will still work, provided the repair shop has not replaced the motherboard of your phone that is.
However, huawei has stopped distributing unlock codes about a year ago..
You enter magisk by flashing the recovery_ramdisk which contains some magisk code. You can use the recovery_ramdisk i have attached to my comment, it should work fine.

Unfortunately i do not know any other methods of getting hands at a bootloader unlock code. I heard there are some online resellers that can generate bootloader unlock codes for you for a fee, but i think that's all a bit shady and i would give this a shot only as a last resort..

I've found this but I don't know if I should trust this. Do you know if this is safe? http://www.droidthunder.com/unlock-bootloader-of-huawei/
 

Barrel Titor

Member
Jul 21, 2015
31
10
Vienna
OnePlus 7 Pro

Zapthos

Senior Member
Apr 3, 2018
263
73
I don't know if this is safe.. I'm not saying whether you should try it or not but if you are going to try it i would recommend you do it in a VM. Keep in mind though that you are giving away your IMEI and with that your phone can get locked remotely
Yeah I forgot about the IMEI part. I'm not gonna risk it, I'm just gonna think about installing the root through TWRP even though it's more risky and takes more time.
 

Meskaly

New member
Sep 30, 2022
4
1
Hi there, Is still possible to root the p20 lite? I have one here in no use and wanna come back learn about root, flash etc... since I got Hauwei phones had stop doing the stuff.

And I read something about hauwei that we cant do anything else, thats true?

If I can do stuff with the phone, can someone point me at the right direction? cause the links of this post are broked

Tks!
 

-Alf-

Senior Member
Sep 28, 2017
2,168
731
Huawei P9 Lite
Huawei P10 Lite
Hi there, Is still possible to root the p20 lite? I have one here in no use and wanna come back learn about root, flash etc... since I got Hauwei phones had stop doing the stuff.

And I read something about hauwei that we cant do anything else, thats true?

If I can do stuff with the phone, can someone point me at the right direction? cause the links of this post are broked

Tks!
Hi, first of all you need to unlock the bootloader.
A. For free > try this method
B. Paid service (4euros) - hcu-client or dc-unlocker (you must downgrade to A8).
 
  • Like
Reactions: Meskaly

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Even without a custom recovery like TWRP you can get Magisk on your phone.
    To do this you need to manually patch the stock boot image and flash that to your boot partition.
    However, I've done all of this and with a few steps you'll be rooted.

    There's a more detailed guide below.

    1) Get bootloader unlock code here
    2) Enable "OEM Unlocking", boot into fastboot and type: "fastboot oem unlock your-unlock-code"
    3) Download patched ramdisk image here and put it in fastboot directory.
    4) Reboot into fastboot and type: "fastboot flash ramdisk patched_ramdisk.img"
    (Optional) 5) Flash this to go back to stock ramdisk

    [Detailed Guide]

    First off, you need an unlocked bootloader. To do this, you need a special code from Huawei, you can request this here:
    https://emui.huawei.com/en/plugin.php?id=unlock

    With this code, and having "OEM unlocking" enabled in debugger settings, boot in fastboot mode.
    Afterwards, open fastboot console and type: "fastboot oem unlock your-unlock-code"
    Your device will now reboot.

    Now reboot your device back into fastboot mode and open a fastboot console once more.
    Download this patched ramdisk partition and place it in the same folder as your fastboot executable.
    http://www.mediafire.com/file/9yfz6w9e8q7j5u2/patched_ramdisk.img

    Now simply type in the console: "fastboot flash ramdisk patched_ramdisk.img".
    Reboot your phone and it is rooted!
    Download Magisk Manager to update/configure Magisk.


    [REMOVE ROOT]

    To remove the root, simply flash this original ramdisk partition, the same way as above. You can also relock the bootloader if wanted.
    http://www.mediafire.com/file/4d6w2labc6cmh2o/original_ramdisk.img
    2
    Just a clarification. So lite version come with 8.0 ? Not 8.1 ?

    Correct
    2
    1) Get bootloader unlock code here
    this is giving me a 404 error...:rolleyes:
    2
    Hey there PartyPeople.

    A few days ago Magisk 18.0 released and i was so free to create a ramdisk containing the updated Magisk package since i had troubles getting things to work with a new Magisk manager on an old ramdisk.
    You'll find the download right here: https://mega.nz/#!ryhlEaTB!ulJZHuHobCIL4V8xhezP-anbAnm7lpsBPdY4XPupc5c

    Please keep in mind that i haven't tested this yet, however i am pretty confident this will work just fine. Should this not work then feel free to contact me or flash the unmodified ramdisk.

    As an addendum to the general consensus of flashing TWRP in this thread, i would advise against that, until at least the folks from OpenKirin have figured out TWRP support. If you just want to root your P20 Lite, don't bother with TWRP, you might regret it later
    1
    apparently free method wont work anymore.
    In September it was still working... :cool: