Advertisements

If you wish to root your device, you might already know about Magisk, which is quite similar to SuperSU. It allows you to gain root access and install mods to enhance your Android device, such as enabling Camera2API, ad blocker, and top-level system modifications. These things can push your device’s limits further with Magisk.

In this article, we will provide an in-depth guide on how you can install Magisk on your Android device to customize it according to your own choice. So, without further ado, let’s get into this.

Getting started with installing Magisk on Android:

Firstly, you need to have your device bootloader unlocked, and there are multiple ways to do this. It is important to note that unlocking the bootloader will wipe all your data and void your warranty. It is recommended to have a complete backup of your device and not to perform this on your primary device. You should have basic knowledge for troubleshooting or being familiar because it might brick your device. Also, Magisk users may encounter issues with streaming and banking apps.

Pre-Requirements

Your device should have access to your PC/Mac with ADB and Fastboot installed on your device. It is also advised to install OEM USB drivers for your Android device.

Checking the type of boot image:

Download and install the Magisk App from the GitHub Repository on your Android device. Next, check your device RamDisk, A/B, and SAR. After that, you need to extract the ROM package with your preferred archiver program. If your Android device uses an A-Only Partition scheme, then you can find the “boot.img” within the Firmware ROM package. In the case of A/B partition, you will have the “payload.bin.” You can use Payload-dumper-go to extract a single partition image without requiring to extract the complete payload.bin.

How to install Magisk on your Android Device
  • Use “payload-dumper-go -l payload.bin” to list the partition image inside the payload.bin and then use “payload-dumper-go -p boot payload.bin” with the name of the boot image (known as “Boot”) to extract it.
  • If you already have access to a Fastboot-flashable image, some OEMs like Google and Xiaomi offer Fastboot-flashable factory images for their Android phone. From there, you can extract the raw “Boot.img” from the archive.

For Samsung devices, the traditional method does not work for Fastboot. You can check here for a different method. Unzip the package and then locate the AP tar file on your device, which is named as AP_[device_model_sw_ver].tar.md5.

Patch the Boot Image Once you have obtained a Boot image, you can start working on patching it.
How to install Magisk on your Android Device

Ramdisk – No: In this case, you have to locate the recovery.img file from the factory image instead of the Boot.img file. We need to do this because Magisk requires being installed in the recovery partition, for which you have to reboot your device to recovery mode to access Magisk. Simply copy the recovery image and then press the Install button on the Magisk Card. Next, select and patch a file under Method, and choose the Stock Recovery image since the Magisk app will patch the image to [Internal Storage]/Download/magisk_patched_[random_strings].img. Copy the patched image to your PC with ADB. Now, flash the recovery image to your device and then reboot into Fastboot mode with this command: “fastboot flash recovery /path/to/magisk_patched.img”.

  • Ramdisk – Yes: First, copy the boot image to your device, and then tap on the Install button on the Magisk Card. Under Method, select and patch the file, and choose the Stock boot image. The image will be patched to [Internal Storage]/Download/magisk_patched_[random_strings].img. Now, copy the new image to your PC with ADB by using the command “adb pull /sdcard/Download/magisk_patched_[random_strings].img”. To flash the patched image to your device, simply reboot into Flashboot mode and use this command: “fastboot flash boot /path/to/magisk_patched.img.” That’s it! You have successfully installed Magisk.

Note: You can still patch the boot image on legacy devices having a boot ramdisk via Custom Recovery like TWRP. However, newer devices don’t work with this method. For those devices, you can follow the following instructions:

How to install Magisk on your Android Device

For Samsung devices, copy the extracted AP files to your device and then press the Install button on your Magisk card. If the Ramdisk doesn’t boot, ensure that Recovery mode is checked and then choose Select and Patch a File under Method. Select the AP tar file, and the Magisk app will patch the firmware to [Internal Storage]/Download/magisk_patched_[random_strings].tar. Now, copy the patched tar file to your PC with ADB by using the command “adb pull /sdcard/Download/magisk_patched_[random_strings].tar”. Then, don’t copy over the MTP interface, which is known to corrupt large files.

Next, reboot your device to download mode, open Odin on your PC, and flash magisk_patched.tar as AP, alongside BL, CP, and CSC. You don’t need to choose HOME_CSC to wipe data. Your device will reboot automatically. If it asks, agree to the Factory reset. If your device doesn’t reboot automatically, and once your device gets into reboot, you have to enable Magisk if your device doesn’t have ramdisk. It will show the additional setup, for which you need to install the latest Magisk app, and it will automatically reboot your device. That’s it!

For other devices, there are three major steps as follows:

  1. Power up normally. You will end up with no Magisk.
  2. Use the Recovery key combo, which will take you to the Splash screen, and release all buttons, which will

Verification: This is the last step. We need to check if everything is working properly. To do this, locate the freshly installed Magisk app and open it. If the “Installed” parameter appears, this means you have successfully installed Magisk. Later, you can check for Magisk modules to modify and gain root access to enhance your device. Hopefully, this article has been helpful for you. Thank you for being with us. We would like to know your valuable opinions and feedback. If you have any queries, please share them with us in the comment section down below. Stay tuned for further updates in the future on the same topic.

x
Advertisements