[GUIDE]Unlocking Bootloader + Magisk Root for Huawei Mate 20 Pro

jimibxl

Senior Member
Dec 3, 2010
252
116
0
Brussels
I'm trying this right now.

Edit: Again stuck at the animated Huawei logo.
Booting into recovery doesn't work.
Put phone in charge then push vol + & - and power (release power when u feel the vibration

Envoyé de mon LYA-L29 en utilisant Tapatalk

---------- Post added at 08:07 AM ---------- Previous post was at 07:55 AM ----------

I use this recovery boot img.
Use fastboot

https://drive.google.com/file/d/1snkqdu-oYR800QHpu17fpQ3ItpyZ7EHT/view?usp=sharing

Envoyé de mon LYA-L29 en utilisant Tapatalk

---------- Post added at 08:24 AM ---------- Previous post was at 08:07 AM ----------

If any problem with erecovery, reflash twrp transfer à dload folder to SD card or otg then plug phone and push both Vol keys it will auto reset to o thanks to dload then start all bl and root procedure usiin fastboot

Envoyé de mon LYA-L29 en utilisant Tapatalk

---------- Post added at 08:34 AM ---------- Previous post was at 08:24 AM ----------

It is also important that you wipe internal storage so everything is erased. You need to start from fresh

Envoyé de mon LYA-L29 en utilisant Tapatalk

---------- Post added at 08:37 AM ---------- Previous post was at 08:34 AM ----------

If any problem with erecovery, reflash twrp transfer à dload folder (with the files off course)

Envoyé de mon LYA-L29 en utilisant Tapatalk
 

deepsrd

Senior Member
Apr 4, 2008
102
61
0
London
Hi,

Can I ask a favour?

Anyone who has rooted stock rom and running it successfully, can you please grab the following file for me?

Code:
/sys/fs/selinux/policy
You need to have su privileges

Thanks a lot in advance..
 

mikeos

Senior Member
Jul 5, 2016
127
204
0
I'm trying this right now.

Edit: Again stuck at the animated Huawei logo.
Booting into recovery doesn't work.
I was having issues with bootloop. My final solution is TWRP P20Pro (charlotte) recovery image patched using Magisk 18.1 stable. No bootloop so far. Magisk 18.1 is good enough for LYA rooting.
If somebody is on Magisk canary (19.x) either uninstall it (if you can go out of bootloop to the rooted system up and running) e.g. via Magisk uninstall script or device recovery will do the trick. I tested HiSuite recovery with HSTool, worked fine and data were perserved - note that BL will be locked after this recovery method (new unlock will obviously cause factory reset - full wipe except external storage card).
 

User422

Senior Member
Aug 8, 2015
146
16
0
Put phone in charge then push vol + & - and power (release power when u feel the vibration

Envoyé de mon LYA-L29 en utilisant Tapatalk

---------- Post added at 08:07 AM ---------- Previous post was at 07:55 AM ----------

I use this recovery boot img.
Use fastboot

https://drive.google.com/file/d/1snkqdu-oYR800QHpu17fpQ3ItpyZ7EHT/view?usp=sharing

Envoyé de mon LYA-L29 en utilisant Tapatalk

---------- Post added at 08:24 AM ---------- Previous post was at 08:07 AM ----------

If any problem with erecovery, reflash twrp transfer
 

ilos

Senior Member
Jun 17, 2007
1,523
244
0
Saint Priest
I was having issues with bootloop. My final solution is TWRP P20Pro (charlotte) recovery image patched using Magisk 18.1 stable. No bootloop so far. Magisk 18.1 is good enough for LYA rooting.
If somebody is on Magisk canary (19.x) either uninstall it (if you can go out of bootloop to the rooted system up and running) e.g. via Magisk uninstall script or device recovery will do the trick. I tested HiSuite recovery with HSTool, worked fine and data were perserved - note that BL will be locked after this recovery method (new unlock will obviously cause factory reset - full wipe except external storage card).
I was on v19.0 and got too many bootloop. I've done exactly what you said and everything work perfect.
Patched twrp Charlotte with magisk app and 18.1 version, uninstalled v19.0, rebooted in fastboot mod and flashed patched img. Clean root now :)

Can't attach patched img with Tapatalk so here a Google drive link of twrp P20pro Charlotte patched with Magisk 18.1 stable

https://drive.google.com/file/d/1VHMRqvfZ1eA05eA4VtcfC32Q1crFBUTQ/view?usp=drivesdk

Sent from my LYA-L29 using Tapatalk
 
Last edited:

JazonX

Senior Member
Dec 16, 2009
1,675
673
0
Root

1. Download and install Magisk Manager from this XDA post: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
2. Switch channel, go to Magisk Manager -> Settings -> Update Channel , set it to Custom, and the URL is https://bit.ly/2N8UVlq (at the moment, per https://forum.xda-developers.com/apps/magisk/dev-magisk-canary-channel-bleeding-edge-t3839337). Go back to main screen and down swipe to refresh, it should say Latest Version > v18.0.
3. You will need to find the stock RECOVERY_RAMDIS.img file, I used HW Firmware Finder (https://forum.xda-developers.com/tools/general/huawei-firmware-finder-team-mt-t3469146) to help me with the task, however I couldn't find the L0C update file and ended up using L09 update file instead, which appear to work. I also couldn't find the update.zip for .171 so I ended up using the latest full update version that was available to me (http://update.hicloud.com:8180/TDS/...69/g1750/v181585/f1/full/update_full_base.zip).
4. Unzip the file, drag out UPDATE.APP file in the zip package, and opened it with Huawei Firmware Extractor (I used 0.9.9.5 in this thread: https://forum.xda-developers.com/showthread.php?t=2433454). Extract and open the UPDATE.APP in update file. If you get a checksum error make sure to uncheck both of the verify checksum in Settings -> Extract.
5. Now you should see a RECOVERY_RAMDIS.img file, right click and extract it.
6. Send the RECOVERY_RAMDIS.img file back to your phone (anywhere is fine), go back to Magisk Manager -> Install -> Patch boot, get the patched_boot.img file from the phone back to the PC.
UPDATE 2019/01/02: @pvillasuso was kind enough to post the ramdisk image (both original and Magisk modified) for Mate 20 Pro LYA-L09 (Firmware version .171):https://forum.xda-developers.com/showpost.php?p=78575496&postcount=13, obviously use it at your own risk.
7. Go to fastboot mode again:
Code:
adb devices
adb reboot-bootloader
fastboot devices
fastboot flash recovery_ramdisk "PATH_TO_patched_boot.img"
fastboot reboot
Now your phone should be back to normal with no root yet, turn off your phone and turn it back on by booting into recovery (Power and volume up with phone disconnected from USB)

Boot up and if you go to Magisk now you should be able to see Magisk installed with Installed Version same as Latest Version.

Congrats you are now rooted!



* Does the same instructions apply to P30 Pro? (Tried the same, But it goes to a bootloop)
* Can I receive OTA while being rooted from the above method?
 

jimibxl

Senior Member
Dec 3, 2010
252
116
0
Brussels
Put phone in charge then push vol + & - and power (release power when u feel the vibration

Envoyé de mon LYA-L29 en utilisant Tapatalk

---------- Post added at 08:07 AM ---------- Previous post was at 07:55 AM ----------

I use this recovery boot img.
Use fastboot

https://drive.google.com/file/d/1snkqdu-oYR800QHpu17fpQ3ItpyZ7EHT/view?usp=sharing

Envoyé de mon LYA-L29 en utilisant Tapatalk

---------- Post added at 08:24 AM ---------- Previous post was at 08:07 AM ----------

If any problem with erecovery, reflash twrp transfer
it's ok now?
 

ilos

Senior Member
Jun 17, 2007
1,523
244
0
Saint Priest
Nope.

eRecovery says "Software install failed!".

I have access to TWRP but USB OTG doesn't work and sideloading also doesn't work so I can't get the dload folder onto my phone.



Patching P20 Pro TWRP and flashing it also didn't work for me.
You patched twrp Charlotte with magisk 18.1? If no, use my patched img. I had same issue as you, bootloop, stuck on boot or phone going to fastboot himself... Just flash my own img and no more issue at all.

Sent from my LYA-L29 using Tapatalk
 

User422

Senior Member
Aug 8, 2015
146
16
0
You patched twrp Charlotte with magisk 18.1? If no, use my patched img. I had same issue as you, bootloop, stuck on boot or phone going to fastboot himself... Just flash my own img and no more issue at all.

Sent from my LYA-L29 using Tapatalk
First of all. Magisk 18.1/ 19 is what we are trying to get in the first place.

I have tried your file, I have patched and tried my own and everything I could possibly think of.
It always says that Magisk isn't installed and I either can't get into TWRP or I can't see any files when I'm in to flash anything.

The weird thing is. Like I've said before, it did work once.
I have installed a magisk module which has caused a bootloop.
I've repeated the process to fix the bootloop.
Since then, it just won't work.
The Magisk installation is gone and just won't come back anymore.
 
Last edited:

ilos

Senior Member
Jun 17, 2007
1,523
244
0
Saint Priest
I had already the same thing with a module (viper) and the only way was to flash twrp (not charlotte one), boot into twrp, wipe or format (if you want) data, cache and dalvik cache, and reboot to set the phone like a fresh install. After that I've just flashed a patched img.

Sent from my LYA-L29 using Tapatalk
 

User422

Senior Member
Aug 8, 2015
146
16
0
I have the exact same device region code and am on the same firmware version.
The patched_boot.img didn't work for me though.

Just one question though.
What is that link after the "latest magisk version"?
The "(com.iZWsWioJb71GeMuA)"?
It doesn't show that link in my magisk manager.
 

flyl0

Senior Member
Dec 8, 2018
167
34
38
Paris
Last edited:
  • Like
Reactions: goldybewon

User422

Senior Member
Aug 8, 2015
146
16
0
No more bootloops with the latest magisk update, just install it directly from the manager reboot and enjoy booting your device like normal with root access ?

Sent from my HUAWEI LYA-L29 using XDA Labs
Patching that one didn't work either. Just sent me back to the bootloader screen again.
 

auipga

Member
Aug 8, 2008
22
4
0
I have the exact same device region code and am on the same firmware version.
The patched_boot.img didn't work for me though.
Sorry to hear that. Did the one from the first post work for you?

Just one question though.
What is that link after the "latest magisk version"?
The "(com.iZWsWioJb71GeMuA)"?
It doesn't show that link in my magisk manager.
Magisk -> Settings -> tick "Magisk Hide" -> will then use a randomized package name
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone