Just got your hands on a brand new Huawei P20 and want to root? Well, we got you covered. In this post we are going to achieve Huawei P20 root using Magsik, and also install TWRP recovery in the process of rooting. The first step in this process would be to unlock the bootloader on your Huawei P20, followed by TWRP and then finally root using Magisk. We will show you all of these steps as we go on.
How to : Huawei P20 Root & TWRP Recovery
Warning
We are not responsible for any bricked devices. You are doing this at your own risk.
Make sure your Huawei P20 is charged 70-80 percent.
Pre-Requisites
Make sure you have Unlocked the bootloader on your Huawei P20. If not, you can read our Huawei P20 bootloader unlock tutorial below.
How to : Huawei P20 Bootloader Unlock
Next, please ensure you have enabled USB debugging and OEM unlock. To do so, Navigate to Settings -> About on your Huawei P20 and tap on build number seven times. Once you see a message saying “Your are now a developer” go back to Settings and you will see an option called Developer Options.
Open developer options and enable USB debugging and OEM Unlock.
Make sure adb and fastboot are setup on your computer (Windows, Mac or Linux) and working. Click the link below to learn how to setup adb and fastboot on Windows, Mac and Linux.
Download TWRP Recovery for Huawei P20 from below link, rename it to recovery.img and place it in platform-tools folder.
Download TWRP Recovery for Huawei P20 Pro
Download latest version of Magisk and no verity and place the zip files in internal memory of Huawei P20.
Download latest version of Magisk
How to Install TWRP Recovery Huawei P20
Step 1 – Boot into fastboot mode
Turn off your Huawei P20. Press and hold Power + Volume Down until you see a fastboot screen.
You can also boot into fastboot mode while device is on :-
- Connect Huawei P20 to computer using usb cable.
- Open command prompt (for Windows) or Terminal (for Mac and Linux).
- Navigate to platform-tools folder and issue below command.
Windows
adb reboot bootloader
Mac or Linux
./adb reboot bootloader
Step 2 – Flash TWRP recovery
- Open command prompt (for Windows) or Terminal (for Mac and Linux).
- Navigate to platform-tools folder and issue below command.
Windows
fastboot flash recovery_ramdisk recovery.img
Mac or Linux
./fastboot flash recovery_ramdisk recovery.img
Step 3 – Boot into TWRP
We need to prevent the device from booting into Android as that will result in TWRP recovery being overwritten by stock recovery.
Windows
fastboot reboot
Mac or Linux
./fastboot reboot
As soon as you execute above command, remove the USB cable and keep pressing Volume UP, so the device will boot to TWRP. Once in TWRP you can go to Reboot -> System.
How to : Huawei P20 Root
Step 1 – Boot into TWRP
Power off device and reboot device by holding volume up + power button. You will boot into TWRP recovery.
You can also boot into TWRP recovery after installing TWRP by issuing below commands in fastboot mode.
Windows
fastboot boot recovery.img
Mac or Linux
./fastboot boot recovery.img
Step 2 – Root using Magisk
Once in TWRP click on Install, then select Magisk zip file downloaded in pre-requisites, and swipe to confirm flashing zip file.
Once Magisk zip file is flashed successfully, repeat the same process to flash no verity zip file downloaded in pre-requisites section.
Step 3 – Reboot into Android
Click on back, then on Reboot and then on System and you will boot into Android.
How to : Check Huawei P20 Root
In case you want to check if your Huawei P20 is rooted or not, download Root Checker app, open it and click on Verify Root. If you are rooted you will get an appropriate message.