Rooting Android Phones Using Magisk

Preethi Rao
4 min readJun 18, 2023

--

Rooting solutions for Android provides users with multitude of advanced control and customization options for certain business use cases, therby unlocking the full potential of their devices.

One popular method for rooting Android phones is by using Magisk which is kind of similar to SuperSU developed by popular XDA developer topjohnwu.
In this article, we will explore how to install Magisk and gain root access, its benefits, and guide you through the process of rooting your Android device using this powerful tool. Moreover list some of the useful Magisk modules available

Intro:
Magisk is a systemless rooting tool designed for Android devices. Unlike traditional rooting methods, Magisk works by modifying the boot image from the firmware and system partition, without tampering with the system files. This “systemless” approach allows for seamless integration with system updates and ensures compatibility with various apps that may otherwise detect root access and triggering security applications like Samsung Knox.

Benefits:

Systemless Root: Modify only the boot image to gain root access without tampering the system files.
Magisk Modules: Library of add on modules. These scripts or modules enhance functionality, enable customizations, and even provide additional security features.
Root Hide: Hide the fact the device is rooted to avoid any policy that may block certain apps to work in rooted device.
SafetyNet Compatibility: SafetyNet is a Google service that verifies the integrity of your device’s software. Magisk hides the props config file to hide the detection.

Steps to Root:
Note: The process of rooting your Android device may vary depending on the specific device model and Android version. Please backup your data and understand the risks involved.

Step 1: Unlock Bootloader — Unlocking the bootloader is the first step in rooting your device. Please follow instructions specific to your manufacturer. For eg in Samsung its
Go to Settings -> About phone > Software information.
Tap on Build number 7 times to enable the developer options.
Go to Settings -> Developer options -> OEM unlocking (Toggle Enable)

Step 2: Install Custom Recovery — Install a custom recovery, such as TWRP. Please find the suitable TWRP build for your device. But for my Samsung Tab, I skipped this step as it does not add any necessity because the tool used to flash the custom boot image in Step 3 was Samsung Odin.

Left TWRP for all Android devices / Right side Odin for Samsung

Step 3: Download Magisk — Visit the official Magisk website or download the latest Magisk Manager APK to your device. Magisk Manager is an app that helps manage the rooting process and modules.

Samsung Devices:
Step 4: Download Firmware — If you are a samsung user, download the Samsung official firmware specific to your device using frija or samtool and extract the boot.img from the AP file.

Step 5: Patch Magisk boot img —Install and Open the magisk app and select this boot.img in the Magisk app and tap “Lets Go” to get the modified boot image. Rename this to boot.img

Patch the firmware boot image

Step 6: Odin Flash — Restart your Samsung device in the Download mode using device specific instruction. Then Use this modified boot.img in the Odin software in the “AP” slot. Leave the other slots blank and press start.

Flash patched boot image in AP slot of Odin tool

Generic Android devices:

Step 4: Flash Magisk — Boot your device into the custom recovery mode (check device specific instruction)in TWRP, then locate the Magisk ZIP file you downloaded in Step 3

Step 5. Flash the Magisk ZIP file using the custom recovery.

Step 6: Reboot and Verify — After successfully flashing Magisk, reboot your device. Once the device restarts, you can verify the root status by checking for the presence of the Magisk Manager app and Super user Tab enabled.

Superuser tab enabled in Magisk

You can checkout more magisk modules in this link: https://themagisk.com/category/magisk-modules/

Adding the modules or creating your own modules take some steps to be followed carefully. So please be mindful on changing the system files using magisk. Some of the good ones include AdBlocker and Advanced Charging Controller.

Do not forget to follow me on Linkedin for more such articles

Happy rooting!

--

--