[Huawei P20 Lite Guides, News, & Discussion] brugernavn:
So I just got this phone just for fun, it was 75 USD, and went straight to XDA to root it so i can remove some bloat etc. but holy moly i ended up have 10 tabs with different guides open, i have compiled what I did to get this phone rooted.

I want to thank everyone who made different threads about rooting and installing Magisk on this phone, i have read so many guides now so i cant remember their names!.

BUT THANK YOU!.

Let's get to it

Here is what I did for to unlock the bootloader, install magisk and root my Huawei P20 Lite ANE-LX1

First you need to install HiSuite: https://consumer.huawei.com/minisite/HiSuite_en/

and then install ADB and Fastboot drivers: https://dl.google.com/android/repository/platform-tools-latest-windows.zip

(extract the platform-tools folder to the root of your C: drive)

Plug in your phone and let it install drivers.

Then you need to downgrade your firmware to 146 using Dload method, as DCU Client can't read the bootloader unlock code on newer firmwares.

I used "Huawei P20 Lite ANE-L21 Anne-L21 8.0.0.146(C432) Firmware Android 8.0.0 EMUI 8.0.0 05014YXX androidhost.ru.zip" (https://androidhost.ru/6ti)

When finished downloading, open the zip file, open software and copy the folder "Dload" to the root of your EXTERNAL SD CARD,

not internal storage!.

Now take your phone and "dial" *#*#2846579#*#* go to Software Upgrade -> SdCard Upgrade and click OK.

Your phone should now begin installing the old firmware, when the phone first boots up, dont set it up, turn it off and hold Volume up + Power and select Wipe Data/Factory Reset, Wipe Cache, and then reboot.

With the phone booted, enable USB Debugging (Settings > System > About Phone > version number > Tap it 7 times to become developer, AND click OEM-Unlock, then go to Settings > System > Developer Options > USB Debugging).

Now we need to buy 4 credits from DC-Unlocker (4 Euro) ( https://www.dc-unlocker.com/buy ) when you have 4 credits on your account, go and download https://hcu-client.com/download/hcu-client-v1-0-0-0287/

Password: hcu

extract the contents of the zip to a folder called HCU in the root of your C: drive

Open up HCU.exe, type in your username and password (check your mail, the info will be there).

Grab your phone and dial *#*#2846579#*#*, go to Background Settings -> USB Port Settings -> Manufacture Mode and press close.

Plug in your phone and let it install drivers.

Open up HCU client, select Unlock, and then Read Bootloader Code.

when you have the code, save it!

Turn off your phone

Hold volume down and power, now we are in fastboot mode.

Open CMD and write:

CD C:\platform-tools

fastboot oem unlock YOUR UNLOCK KEY HERE

Accept the stuff and unlock your bootloader, your phone will be factory reset, and all your data lost if you dont have a backup.

Turn the phone off and on again, set it up, and go to settings -> System -> System update, and update, mine was ANE-LX1 8.0.0.162(C432)

Now re-enable USB Debugging option in Developer Options.

install Magisk Manager (https://github.com/topjohnwu/Magisk/releases/download/v18.0/Magisk-v18.0.zip)

Download patched_ramdisk.img (https://mega.nz/#!GWp1ia6R!xUcg_T_17v1ktlFQPq-Ujo4DRKfAg8E4-_k2J2zLO60)

and place it in the root of your phones internal storage

Open up Magisk Manager, press install -> install -> Patch Boot Image File -> find the patched_ramdisk.img and click OK.

Now open CMD and write:

CD C:\platform-tools>

adb pull /storage/emulated/0/download/patched_boot.img

Now you should have the patched_boot.img in your platform tools folder.

Turn off your phone, hold volume down and power to get to fastboot mode.

in CMD write:

CD C:\platform-tools>

fastboot flash ramdisk patched_boot.img

reboot your phone and check if magisk was installed correctly and check if you have root.

Hope this works for you!