Guide: How To Install Magisk

This guide covers the method officially supported by the OpenKirin team in order to install Magisk on our builds. Please be aware that this guide does require you to have read the How To Extract Partition Images From Stock EMUI Firmware, and the How To Flash Extracted Partition Images guides, or have an understanding of the information they provide.

  1. This guide does require you to have fastboot installed, as well as one of our builds from the downloads section. If you haven’t already installed fastboot, please refer to our Installing Fastboot and ADB guide before going any further.
  2. Once fastboot is installed, you’re ready to get started. The first step is to extract the RAMDISK.IMG file from your device’s stock EMUI firmware, as we learned in the How To Extract Partition Images From Stock EMUI Firmware guide.
  3. Once extracted, take your USB cable and connect your phone to your PC, and select FILES AND STUFF
  4. Transfer your extracted RAMDISK.IMG to your phone (Internal Storage or External SD, it doesn’t matter which one you choose). Disconnect your USB cable once completed.
  5. Once you have done this, open up Magisk Manager on your device. If you don’t have Magisk Manager installed, you may download the latest version of Magisk Manager from this thread on XDA.
  6. When you open Magisk Manager, you’ll see the below screen:
  7. Click the “Install” button, and choose “Install” in the pop-up menu:
  8. In the next pop-up, click the “Patch Boot Image File” option:
  9. Using the file explorer that pops up, navigate to the folder on your phone where you transferred the RAMDISK.img and select it:
  10. Once you select it, it will start to patch the RAMDISK.IMG file. If all went well, you’ll see the below screen:
  11. Click “Reboot”
  12. Once your phone has rebooted, plug your phone back into your PC, and navigate to the Download folder in your Internal Storage. In that same folder, you should now see another file called patched_boot.img :
  13. Transfer this file to your PC, into the same folder where you have installed fastboot:
  14. Once completed, power off your device. While powered down, hold down the volume down key of your device, while connecting your device to your PC with the USB cable. If you’ve done it properly, you should see the below screen:
  15. In the command window, enter the command fastboot flash ramdisk patched_boot.img . It should look similar to the below screenshot:
  16. Press enter, and you should see the patched ramdisk file flash like in the below screenshot:
  17. Once it’s completed, type the command fastboot reboot and unplug your phone
  18. Once your phone has booted back up, go to Magisk Manager. If you’ve done everything correctly, you’ll see the below screen indicating you’ve installed Magisk:
  19. Congratulations, your device is now rooted with Magisk!