How to Root Huawei P20 Lite using Magisk (ANE-LX1)

How to Root Huawei P20 Lite using Magisk

Huawei announced its new P20 series recently as their first devices to support the notch. The tutorial will help you easily root Huawei P20 Lite using Magisk. The steps will work for models ANE-L01 and ANE-L21.

Ever since 2017, the Chinese manufacturer is quickly raising the bar when it comes to design, power and latest technology. The company already announced various devices during this time. The latest of which is the Huawei P20 series that was made public a few weeks ago. The P20 Lite falls in the budget spectrum of the said series and is ready to compete against some strong players including the Redmi Note 5 Pro. The phone is already available in several regions already and people have already started getting their hands on it. So if you’ve bought it too and want to root Huawei P20 Lite, then the instructions in this guide will help you.

How to Root Huawei P20 Lite using Magisk

Table of Contents

Guide to Root Huawei P20 Lite using Magisk

The P20 Lite comes with a set of powerful hardware configuration including 5.84-inches fullscreen display with the notch, HiSilicon Kirin 659 processor, 16MP+2MP dual camera setup, and more. On the software end, the phone sports Android 8.0 Oreo out-of-the-box with support for Project Treble.

Rooting your Huawei P20 Lite will empower you with privileges, including the ability to modify the core OS. So, if you’re not much happy with the existing Emotion User Interface (EMUI), you can make adjustments to it pretty easily. Rooting also enables you to install third-party mods like enhance various aspects of the software like ViPER4Android or Dolby Atmos for a better audio experience.

At this moment, the device doesn’t hold support for TWRP, which means we will be using an alternate method by flashing a patched ramdisk (boot) image. Thanks to XDA junior member RogerXIII for providing an already patched ramdisk for the device. The instructions below have only been tested for ANE-LX1 variants such as ANE-L01 and ANE-L21. Once you have confirmed that you have the stated variant, you can follow the steps below to root Huawei P20 Lite using Magisk.

Should you wish to try, you can also grab the stock ramdisk on your own and patch is using Magisk.



How to Root Huawei P20 Lite?

  1. First, unlock bootloader on your P20 Lite using the official unlock page.
  2. Power off the phone completely.
  3. While holding the Volume Down button, connect the USB cable to the phone.
  4. Your Huawei P20 Lite should be in the fastboot mode now.
  5. Download the patched ramdisk IMG file.
  6. Transfer the file to C:\adb. This is the folder where the ADB and Fastboot binaries are present on your PC.
  7. Inside the same folder, hold the SHIFT key and right-click on an empty space.
  8. Select ‘Open PowerShell window here’.
    How to Root Huawei P20 Lite using Magisk - Open PowerShell
  9. Confirm that your phone is being detected properly using:
    fastboot devices
  10. The command should return a device ID, along with the ‘fastboot’ message.
  11. Finally, flash the patched ramdisk image to root Huawei P20 Lite:
    fastboot flash ramdisk patched_ramdisk.img
  12. Once the flashing is complete, reboot your phone using:
    fastboot reboot

When your device boots, it shall be rooted on the stock firmware. You can take the advantage now by flashing Magisk Modules or use MagiskHide to hide root from certain apps like bank apps, Pokemon Go, etc.

You should also note that rooting or modifying the OS in any manner will block the OTA updates. In case you want to update, you can simply uninstall any modules/third-party mods that you have installed. Then, follow the steps below to unroot Huawei P20 Lite by flashing the stock ramdisk image.

How to Unroot Huawei P20 Lite?

  1. Download stock ramdisk image.
  2. Boot Huawei P20 Lite into fastboot mode.
  3. Connect the phone to the PC using the USB cable.
  4. Transfer the ‘original_ramdisk.img’ file to C:\adb.
  5. Hold the SHIFT key on the keyboard and right-click on empty space inside the folder.
  6. Select ‘Open PowerShell window here’.
  7. Finally, flash the stock ramdisk to unroot Huawei P20 Lite:
    fastboot flash ramdisk original_ramdisk.img
  8. Reboot the device using:
    fastboot reboot

So this was our tutorial on how to root Huawei P20 Lite using Magisk. We certainly expect TWRP recovery support to be arriving soon as developers get their hands on the device. Once it is available, we will be updating this post with another method. Until then, enjoy your rooted device. If you have any questions regarding the process, leave a comment below.



  1. helo.i have huawei p20 lite. and i try to type this message in cmd:fastboot flash ramdisk patched_ramdisk.img and i have this message:
    Sending ramdisk 8638 KB okay.
    Writing ramdisk FAILED <remote: command not allowed .
    finished total time…
    why am I getting this message? what should I do? sry for bad english language 😀 i am from hungary 🙂

    1. Hi. That’s because the phone’s bootloader is not unlocked. Huawei has indefinitely shut down its official bootloader unlocking program. The only way to root your phone now is by first unlocking the bootloader using a paid service (Like FunkyHuawei).

Leave a Reply

Your email address will not be published. Required fields are marked *