Magisk

Installation

If you already have Magisk installed, it is strongly recommended to upgrade directly via Magisk Manager. The following tutorial is for first time users. For Huawei users, please check the specific section for more information.

Prerequisite

Custom Recovery

If your device have custom recovery support, the easiest way is to install it through custom recoveries, such as TWRP.

Boot Image Patching

This is the “cool” way to install Magisk on your device. Either your device does not have proper custom recoveries, your device is using the A/B partition scheme and you don’t want to mix recovery and boot images together, or you have other concerns (e.g. OTA Installation), you should use this method instead.

In order to use this method, you are required to obtain a copy of the stock boot image, which can be found by extracting OEM provided factory images, or extracted from OTA update zips. If you are unable to obtain one yourself, someone on the Internet might share it somewhere. The following instructions will guide you through the process after you have the copy of boot image.

Huawei

Huawei devices using Kirin processors have a different partitioning method from most common devices. Magisk is usually installed to the boot partition of the device, however Huawei devices does not have this partition. Depending on what EMUI version your device is running the instructions are slightly different. Even if you have switched to a custom ROM, you shall still know which version of EMUI you are running before switching.

Obtain Stock Images

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

EMUI 8

For EMUI 8 devices, your device have a partition named ramdisk, which will be where Magisk is going to be installed.

EMUI 9

For EMUI 9 devices, the ramdisk partition no longer exists. As a workaround, Magisk will be installed to the recovery_ramdisk partition. This means that you HAVE TO boot to recovery every time you reboot. This also means that you CANNOT have Magisk and custom recoveries at the same time! To boot to recovery, press Power + Volume Up when booting your device.