Getting root rights on Xiaomi smartphones through Magisk gives you access to advanced system settings, the ability to remove embedded software and install modified firmware. However, the process requires care: one error can turn a device into a βbrickβ. In this guide, we will analyze the step-by-step installation of Magisk on Xiaomi, taking into account the features of the device. MIUI 14/15 Android 13/14, including unlocking the loader, firmware custom Recovery TWRP and rounding the antirollback.
The process differs from standard rooting on other brands due to Xiaomiβs policy: the company blocks the bootloader by default and implements protection mechanisms such as Anti-Rollback and the companyβs own software. ARB. This means that it is easy to install Magisk through a boot image patch (boot.img) It might not work. We'll look at three proven methods. TWRP, using fastboot and an alternative method for devices with a locked bootloader.
β οΈ Warning: The procedure voids the warranty, can result in data loss and irreversible system damage. MIUI 13+ Android 12+ high probability of operation ARB 4/5, This will require additional action to restore the.
1. Device Preparation: What to Do Before Installation of Magisk
Before starting the process, make sure your smartphone meets the minimum requirements. Magisk is compatible with most Xiaomi models, but on devices with MediaTek processors (e.g. Redmi Note). 11/12) You may have trouble unlocking the bootloader. MIUI β for MIUI 14/15 You will need an up-to-date version of Magisk Delta (fork of the original project).
List of mandatory training:
- π± Backup: Use Mi Mover or Google Drive to save contacts, photos and apps.
- π Battery charge: Level not below 70%.The unlocking and firmware process can take up to 1 hour.
- π₯οΈ Computer with Windows/Linux: It will be necessary to work with ADB, Fastboot and Mi Unlock Tool.
- π Original. USB-Cable: Cheap cables can cause data transmission errors.
Critical moments:
- π« On devices with Dynamic RAM Expansion (virtual memory) disable this function in Settings β The phone. β Memory.
- π Check the status of the bootloader: go to fastboot (hold Power). + Volβ) Check out the line Device unlocked: false.
- β οΈ If your device supports HyperOS (the new Xiaomi shell), installing Magisk could disrupt branded features like Mi Share or Game Turbo.
2. Unlock the bootloader on Xiaomi: bypassing the restrictions of the Mi Account
The Xiaomi bootloader is locked by default, and unlocking it is a must before installing Magisk.The process requires linking the Mi Account to the device and waiting for confirmation from Xiaomi servers (usually 72-168 hours). New devices (released after 2022) may be required SIM-card with a number linked to the account.
Step-by-step:
- Activate Developer Mode: Go to Settings β About Phone and click on MIUI Version 7 times.
- Enable USB Debugging and OEM Unlocking in Settings β More β For Developers.
- Download the Mi Unlock Tool (the official tool from Xiaomi).
- Connect your phone to your PC in fastboot mode (hold Power + Volβ when turned on).
- Launch the Mi Unlock Tool, log in to the same Mi Account as you do on your phone, and follow the instructions.
β οΈ Attention: On devices with MIUI 14+ Xiaomi server may reject the unblock request if:
- π The Mi Account was created less than 30 days ago.
- π± Device not tied to account for more than 72 hours.
- π You're using it. VPN Proxy (the server determines the region of the account).
What if the Mi Unlock Tool gives you a "Couldn't unlock" error?
An alternative method for devices with ARB 5 (e.g. Xiaomi 13 Ultra or Redmi) K60): Some users successfully circumvent the restrictions EDL-mode (emergency firmware), but this requires an authorized Xiaomi account and special equipment (Qualcomm) HS-USB QDLoader 9008).
Installation TWRP: custom-made recavers for Magisk firmware
TWRP (Team Win Recovery Project is a custom recovery that allows you to sew ZIP-files like Magisk. However, on modern Xiaomi devices, the standard installation is TWRP This can cause a bootloop due to the Anti-Rollback mechanism, and you need to use special builds to avoid this. TWRP supportive ARB.
How to install TWRP Xiaomi:
- Download the current version TWRP for your model from an official website or trusted sources (for example, XDA For Redmi Note 12 will fit the build from mauronofrio.
- Rename the file to twrp.img and place it in the folder with fastboot.
- Connect your phone in fastboot mode and execute the command: fastboot flash recovery twrp.img fastboot boot twrp.img
- After loading into TWRP Make a backup partition persist (important for devices with MIUI 13+).
Important: On devices with a Snapdragon 8 Gen 2 chipset (such as Xiaomi 13 Pro) standard TWRP Use OrangeFox Recovery or PitchBlack.
| Xiaomi model | Recommended Recaveri | Features |
|---|---|---|
| Redmi Note 11/12 | TWRP 3.7.0 (mauronofrio) | Demands a shutdown. AVB 2.0 in fastboot |
| POCO F4/F5 | OrangeFox R11 | Support MIUI 14 and Android 13 |
| Xiaomi 12T/13 | PitchBlack | Works with ARB 4, but may break encryption |
| Redmi K50/K60 | TWRP A12+ | Demands a patch. vendor_boot for HyperOS |
βοΈ Pre-firmware check TWRP
4. Magisk Installation: Method Choice Depending on Firmware
There are three main ways to install Magisk on Xiaomi:
- Through TWRP (Recommended for most devices).
- via fastboot (for devices without work) TWRP).
- Patch. boot.img (alternative for devices with a locked loader).
Method 1: Installation via TWRP
- Download the latest Magisk ZIP (Magisk Delta for Android 14).
- Reboot to TWRP (hold on to the power + Vol+ switch-on).
- Click Install, select the downloaded file and swipe for confirmation.
- After installation, reboot to the system.
Method 2: Installation via fastboot (without the TWRP)
This method is suitable for devices where TWRP Does not work or causes a bootloop:
- Remove boot.img from the firmware for your model (you can download from Xiaomi Firmware Updater).
- Patch. boot.img via Magisk App (click Install) β Select and Patch a File).
- Fastboot: Fastboot Flash Boot magisk_patched.img fastboot reboot
β οΈ Attention: On devices with MIUI 14+ Android 13+ firmware boot.img may cause the operation ARB. In this case, you will need to flash the full firmware image with the avb disabled:
fastboot flash --disable-verity --disable-verification boot magisk_patched.imgπ‘
If after installing Magisk phone fixated on the logo, try flashing the original boot.img via fastboot, and then repeat the process with the DM-verity shutdown.
5. Correction of errors after installation of Magisk
Even with a successful Magisk installation, features-related issues can arise. MIUI. Letβs look at common mistakes and their solutions:
| Mistake. | Reason. | Decision |
|---|---|---|
| The looped reboot (bootloop) | Incompatibility with ARB damaged vendor_boot | Swipe the full firmware through the Mi Flash Tool with the clean all and lock option, then re-install |
| Magisk does not define root rights | Wrongly patched boot.img module conflict | Reinstall Magisk through TWRP or disable conflicting modules in Magisk settings |
| The banking application is not working | SafetyNet or Play Integrity | Install Universal SafetyNet Fix and Play Integrity Fix in Magisk |
| No network after firmware | Modem or persist partition damaged | Restore backup modem and persist through TWRP |
How to get around SafetyNet on Xiaomi:
- π Install the modules in Magisk: Universal SafetyNet Fix (by) kdrag0n) Play Integrity Fix (by chiteroman)
- π± Enable Enforce DenyList in Magisk Settings and add banking apps to the list.
- π Check status through the app YASNAC (Should show GREEN for both CTS and Basic Integrity).
π‘
If Google Pay or Netflix stop working after installing Magisk, the most common reason is Play Integrity. + Play Integrity Fix + Hiding Magisk via DenyList.
6. Alternative methods: Magisk without unlocking the bootloader
On some Xiaomi devices (e.g. Redmi Note) 10S or POCO M4 Pro) you can get root rights without unlocking the bootloader through exploits in the kernel.This method is suitable for devices with Android 11 and below, since on newer versions MIUI vulnerability.
Instructions for devices with locked loader:
- Download exploit for your model (e.g. DirtyPipe or CVE-2021-4034).
- Install Termux from F-Droid (the Play Market version is not suitable).
- Run the exploit using Termux: pkg install wget wget wget https://example.com/exploit.sh chmod +x exploit.sh./exploit.sh
- After receiving the temporary root, install Magisk via Termux: su wget https://github.com/topjohnwu/Magisk/releases/download/v26.4/Magisk-v26.4.zip magisk --install-module Magisk-v26.4.zip
β οΈ Note: This method does not work on all devices and may result in:
- π Data loss in the section /data.
- π¨ Mi Anti-Rollback and Device Lock.
- π Irreversible damage to the system partition that requires complete flashing.
List of Xiaomi devices with known root exploits without unlocking
7. How to Hide Magisk from Applications and Services
Many apps (banking, gaming, streaming) block access on root-righted devices, and to circumvent these restrictions, Magisk offers cloaking mechanisms:
Steps to hide root rights:
- Open the Magisk App and go to Settings β Hide Magisk.
- Enable the Enforce DenyList option.
- Add problematic apps to the list (e.g. SberBank Online, Netflix, PokΓ©mon GO).
- Install the modules: Universal SafetyNet Fix (for SafetyNet) MagiskHide Props Config (for changing device fingerprints)
Reset the device.
Additional measures:
- π Use Magisk Alpha (Canary Channel) β it has improved support for root hiding.
- π± For MIUI 14 may require disabling Miui Optimization in the developer settings.
- π Check the status through YASNAC or adb shell su --check (should return an empty answer).
π‘
If the app still detects root, try renaming the Magisk App to something neutral (like "Manager") through the app's settings. Also delete all Magisk log files in the folder. /sdcard/Magisk.
8.Restore the device after a failed installation
If something went wrong during the Magisk installation and the device doesn't boot, use the recovery manual, and in most cases, firmware on the original image via the Mi Flash Tool helps.
Step-by-step recovery:
- Download the official firmware for your model (choose the Fastboot version).
- Unpack the archive and place the firmware folder in the root of the C: disk (the path should not contain Cyrillic).
- Connect your phone in fastboot mode (hold power). + Volβ).
- Launch the Mi Flash Tool, select the firmware folder and press Refresh (the device must be determined).
- Select Clean All mode and press Flash.
β οΈ Note: If the device does not turn on after firmware:
- π Try clean all and lock mode (lock the bootloader, but return the device to its original state).
- π± For devices with ARB 5 (e.g. Xiaomi 13) may require firmware through EDL logged-in.
- π If the Mi Flash Tool is giving a critical partition error, check the integrity of the firmware file or use another version of the tool.
π‘
When restoring through the Mi Flash Tool, never use the βclean all and lockβ mode if you plan to re-unblock the bootloader β this can lead to an increase in the wait time for unlocking up to 30 days.