Magisk Module WebsiteTelegram

Xiaomi Phone Magisk Installation Guide with Patching init_boot.img

Xiaomi Phone Magisk Installation Guide (Patching init_boot.img)

This guide is only applicable for Android Kernel version 13 and above (this refers to the kernel version, not the system’s Android version). For instance: 5.15.xx-android13-xxx, 6.1.xx-android14-xxx, 6.6.xx-android15-xxx.

Checking Kernel Version

To check your kernel version: Settings > My Device > All Specs > Kernel Version. Typically, devices with kernel versions 5.15.XX – 6.X.XX and above are supported. If not, please refer to mi-boot.

Common Models

For devices released with Android 13, the common ramdisk has been removed from the boot image and placed in a separate init_boot image. For more details, refer to the Android Documentation.

Demonstration Environment

Installation Steps

1. Unlock Bootloader: Xiaomi-unlock

If your phone cannot unlock the bootloader, we recommend using Speedy Virtual Machine to experience ROOT without unlocking the bootloader.

2. Download System Package: rom

Ensure to download the system package that matches your phone’s system version.

3. Extract init_boot.img: payload-dumper-go-init-boot

If the system package already contains an init_boot.img file, you can skip this step.

4. Transfer init_boot.img to Phone

Connect your phone to the computer in file transfer mode and copy init_boot.img to the Download directory on your phone.

5. Download Magisk App: Magisk-download

Install the Magisk app on your phone.

6. Patch init_boot.img with Magisk

  1. Open Magisk

  2. Select “Install”

  3. Choose init_boot.img

  4. Start patching the file

  5. Once completed, the patched file (magisk_patched-xxx.img) will be in the Download directory.

7. Download adb-fastboot: adb-fastboot

Extract the downloaded file.

8. Transfer magisk_patched.img to Computer

Connect your phone to the computer in file transfer mode and copy magisk_patched.img to the adb-fastboot directory on your computer.

9. Enter FastbootD Mode on Phone

Enable USB Debugging in Developer Options, open the command line (CMD) in the adb-fastboot directory and enter the following command to restart to FastbootD mode (not Bootloader):


adb reboot fastboot

10. Flash Patched init_boot.img

Enter the following command to flash the patched file (replace magisk_patched.img with the actual file name):


fastboot flash init_boot magisk_patched.img

11. Reboot the Phone

If you see the following lines, it means the flash was successful. Use the command fastboot reboot to restart your phone.


Sending 'init_boot' (8192 KB) OKAY [ 0.195s]

Writing 'init_boot' OKAY [ 0.003s]

Finished. Total time: 0.240s

12. Restart the Phone

Wait patiently for the phone to restart. If the Magisk version is displayed, the installation was successful.

Helpful Tips

If your phone cannot boot after flashing magisk_patched.img, you can restore the original init_boot.img using the command:


fastboot flash init_boot init_boot.img

Keep a copy of init_boot.img on your computer to recover if needed. For system updates, download the full package and repeat the above steps to continue using Magisk.

For more detailed information and the latest updates on Magisk Modules, visit our website at magiskmodule.gtitlab.io.

Magisk installation on your Xiaomi phone is just a few steps away, and this comprehensive guide is here to hold your hand through the process, leading you to a world of rooting freedom.

Redirecting in 20 seconds...