How to Root Huawei Packed with EMUI 8 and EMUI 9 or Higher with Magisk


We know rooting Samsung device with Magisk using the method of system-as-root. Huawei devices using Kirin processors have a different partitioning method from most common devices. Rooting Huawei devices depending on what EMUI version your device is running, the instructions wili be defferent.

Getting Started: Preparation

  • Huawei Device packed with EMUI 8, 9 or higher;
  • At least 50% battery level;
  • USB Cable (the original one recommended);
  • Install the adb and fastboot. Just download the Google SDK Platform-Tools package for using the adb and fastboot. on your Windows. And Terminal for Mac. Mac just user Terminal.
  • The Platform-Tools download websites: https://developer.android.com/studio/releases/platform-tools

    how to root Android 10 with Magisk
  • The Latest Magisk Package. Download URL: https://magiskmanager.com/
  • Backup everything in your Huawei device.

Step by Step to Root Your Huawei Device with Magisk

Step 1: Plug your Android device into your computer via USB cable.

Step 2: Unzip the Platform-Tools package.

you download and then press "Shift" and click the right mouse, select "Open the command line here". Or just input the "cmd" in the top address bar the press the "Enter".

You will get the "cmd" window. All the following "adb" commands and fastboot commands are entered under the DOS interface.

Check your device whether it connects to network by input the following command in under the DOS interface: adb devices  Check your USB and debugging if your device can't connect to network.

Step 3: Knowing your device

If your device is running anything older than Android 7.1, skip this section as your device will not be using A/B nor system-as-root. First, you need to know whether your device is using A/B partitions. If you don’t know, use a terminal (adb shell or any terminal emulator) to check with this command: getprop ro.build.ab_update. If the result is true, then your device is using A/B partitions. If your device is A/B, then your device is also certainly using system-as-root. To find out whether you are using system-as-root on a non-A/B device, use a terminal to check with this command: getprop ro.build.system_root_image. If the result is true, then your device is using system-as-root.

Step 4: Unlocking Bootloader of Huawei Device.

adb reboot bootloader

Step 5: Obtain Huawei Stock Imgages

Huawei does not release official factory images, however most firmware zips can be downloaded from the Huawei Firmware Database. To extract images from UPDATE.APP in the zip, you have to use Huawei Update Extractor (Windows only!)

Step 6: Huawei EMUI 8 using the extract ramdisk.img

  • For EMUI 8 devices, your device has a partition named ramdisk, which is where Magisk is going to be installed.
  • Extract RAMDISK.img from your firmware. Follow the instructions for boot image patching above, but use the RAMDISK.img file instead of a boot image.
  • To flash the patched image to your device, here is the fastboot command:fastboot flash ramdisk /path/to/magisk_patched.img

Ste 7: Huawei EMUI 9 or higher using the extract recovery_ramdisk.img

  • For EMUI 9+ devices, the ramdisk partition no longer exists. As a workaround, Magisk will be installed to the recovery_ramdisk partition.
  • Extract RECOVERY_RAMDISK.img from your firmware. Follow the instructions for boot image patching above, but use the RECOVERY_RAMDISK.img file instead of a boot image.
  • To flash the patched image to your device, here is the fastboot command:fastboot flash recovery_ramdisk /path/to/magisk_patched.img

Ste 7: Reboot the device. Your Huawei Device is successfully rooted.