If you’ve ever thought of rooting your phone or dipping your toes into the world of modding many of the best Android phones, the chances are you’ve heard of Magisk. But what is Magisk? In a nutshell, Magisk is a tool that can be used to gain root access on your device, similar to legacy tools like SuperSU, but it’s not limited to just that. Developed by XDA Senior Recognized Developer topjohnwu, Magisk is a portal that enables all sorts of modifications on your Android phone. Apart from root access, you can also try out a whole lot of derivative components called “Magisk modules” that you can install for different purposes.

There are modules for theming, ad blockers, enabling Camera2API, and a lot of other system-level modifications you can’t do otherwise. If you’re a power user and want to extend the functionality of your phone and push it to its limits, you need to try out Magisk. If all this sounds fun to you, we’ll tell you how you can install Magisk on your Android device to customize it and do things you never thought of doing on your phone.
How to install Magisk
Installing Magisk requires you to have a device with an unlockable bootloader. If you’ve already unlocked the bootloader on your phone, you’re good to go. If you haven’t and you don’t know what we’re talking about, we recommend you head over to the XDA forums, search for your device, and then look for a guide to unlocking the bootloader. There’s no universal method for this, as it differs from phone to phone. Once you’ve unlocked the bootloader, you can proceed further
Unlocking the bootloader will wipe all the data on your smartphone and in some cases, may even void your warranty. It’s advisable to back up all your data before performing these steps. It’s also important to understand that not following the steps correctly may result in a bricked phone so make sure you know how to recover your phone back to its original state in case you end up in a situation like that. Furthermore, Magisk may cause issues with a few streaming and banking apps, so if those are absolutely vital to you, proceed with caution.
Before we begin, make sure you have access to a PC/Mac with ADB and Fastboot installed. Windows users are also advised to install the latest OEM USB driver for your Android device.
Step 1: Identifying the type of boot image
Download the latest version of the Magisk app from the project’s GitHub repository. Since the APK of Magisk is hosted outside the Google Play Store, you may need to allow sideloading apps from unknown sources first and then manually install the downloaded package.
After installing, open the Magisk app. You should see a screen like this:
Now, we need to note down the values of the following parameters:
Ramdisk
A/B
SAR
Step 2: Locating the stock boot image.
In order to patch the boot image for your device, you need to extract it from the official firmware packages. In case you’re using a custom ROM like LineageOS, the flashable ZIP file contains the boot image.
Case I: You have access to the recovery-flashable ZIP file
If you have a device that still uses the A-only partition scheme, you can find the ‘boot.img’ right inside the recovery-flashable ZIP file. Just extract it using a suitable archiver program.
Notice the boot.img file inside POCO M3’s recovery ZIP.
However, if your device utilizes the A/B partition scheme, then the boot image and other partition images are further packed inside a file named payload.bin as shown below.
As you can see, the recovery ZIP of the Google Pixel 5 contains a payload.bin file. In that case, you have to extract the payload.bin file first, then use one of the community-developed payload.bin unpackers to get the boot.img out of it. We strongly suggest you opt for the extractor written in Go by XDA Member ssssut, as it is cross-platform and has been actively developed.