How to install the root rights to Xiaomi: a safe way to unlock the bootloader

Getting root rights on Xiaomi smartphones opens up access to hidden Android features, but requires care. Without proper preparation, the device can turn into a β€œbrick” – an inoperable device that does not turn on even in Fastboot mode. In 2026, the process became more complicated: the company tightened its policy of unlocking the bootloader, and some models (for example, Xiaomi 13 Ultra or Redmi Note 12 Pro+) require additional steps to bypass the protection of the Mi Anti-Rollback.

This article will be suitable for owners of devices based on MIUI (including POCO And Black Shark, released after 2018, will be divided into two main methods: official (through unlocking the bootloader and Magisk) and alternative (for devices with locked bootloader). The procedure voids the warranty and may result in data loss on the internal drive – be sure to back up via Mi PC Suite or adb backup.

What is the root of Xiaomi and what are the risks?

Root rights allow:

  • πŸ”§ Remove built-in apps like Mi Browser, Mi Music or GetApps.
  • ⚑ Increase productivity through nuclear tweaks (e.g., scheduler change) CPU performance).
  • πŸ“± Install custom firmware (LineageOS, Pixel Experience) or modified cores.
  • πŸ”’ Block ads at the system level through AdAway or Blokada.

But there is a downside:

  • 🚨 Loss of warranty – Xiaomi service centers refuse repairs when unlocked bootloader is detected.
  • πŸ›‘οΈ Malware vulnerability – some banking applications (such as SberBank Online or Tinkoff) stop working due to SafetyNet trigger.
  • πŸ”„ Risk of β€œbrick” in case of firmware error – especially on models with A/B-sections (Xiaomi) 12T, Redmi K50).

⚠️ Attention: On devices with MIUI 14+ and Snapdragon processors 8 Gen 2/3 (for example, Xiaomi 14) Unlocking the bootloader can lead to hardware locking of the module 5G or NFC. Before you start, check the compatibility of your model in the forum. XDA Developers.

πŸ“Š Why You Need to Root on Xiaomi?
Removal of embedded applications
Installation of custom firmware
Processor/GPU overclocking
Blocking ads
Other

Preparation of the device: unlocking the loader

The first step is to unlock the bootloader. Xiaomi requires confirmation of the Mi Account account and waiting 7-15 days (up to 30 days on new models).

  1. Tie it up. SIM-Card to Mi Account (required!).
  2. Activate debugging by USB in Settings β†’ About Phone β†’ MIUI version (click 7 times).
  3. Enable OEM Unlock in Settings β†’ Additional β†’ For developers.
  4. Connect your phone to your PC, install Mi Flash Tool drivers, and run Mi Unlock.

If the utility gives you a "Couldn't unlock" error, check:

  • πŸ”Œ Cable - Use the original cable USB Type-C (cheap cables may not transmit data).
  • πŸ–₯️ The Mi Unlock version - for MIUI 14 You need version 6.5.224.24 or later.
  • πŸ“± Account Region – If the device is purchased in China, link it to your global account.

⚠️ Note: On the Redmi Note 11 Pro+ 5G and POCO F4 GT After unlocking the loader, the settings are automatically reset. IMEI. Save them in advance through the app MTK Engineering Mode (for MediaTek) or QCN Rebuilder (for Snapdragon).

Create a backup in Mi Cloud|Tie it down. SIM-card|Install drivers ADB/Fastboot|Download Mi Unlock latest version|Disable antivirus on PC-->

The choice of root method: Magisk vs. SuperSU

In 2026, Magisk (the author of topjohnwu) remains the only reliable solution for getting root on Xiaomi. The alternative - SuperSU - is outdated and does not support Android 13/14.

  • πŸ”„ SafetyNet support (you can hide root from banking applications).
  • πŸ“¦ Modular system (e.g. MagiskHide Props Config for changing device fingerprint).
  • πŸ› οΈ Regular updates (current version at the time of writing – 26.4).

The installation will require:

  1. Castomic recovery (TWRP or OrangeFox)
  2. Magisk-v26.4.zip file (download only from official GitHub)
  3. Patch boot.img (if you install without TWRP).
Method of installationPlusesConsSuitable for
Through TWRPSimplicity, support for A/B-partitionsRisk of data corruptionXiaomi 11T, Redmi K40, POCO X3 Pro
Patch boot.imgSafety, no need for custom recoveryHarder for beginners.Xiaomi 12, 13 Lite, Redmi Note 10 Pro
Fastboot (for A/B)It works on new devices.Requires an unlocked bootloaderXiaomi 13 Ultra, Redmi K60 Pro
What is it? A/B-section?
On devices with A/B-partitions (e.g. Xiaomi) 12S Ultra uses two sets of partitions: active ( a) and backup ( b). When you update, the firmware is installed on the inactive partition, and after restarting, you switch. This makes it difficult to install Magisk, as you need to patch both partitions or use special scripts like AB-Patcher.

Step-by-step: Install Magisk via TWRP

This method is suitable for most Xiaomi devices on Android 11-14. Before you start, make sure that:

  • πŸ”‹ Battery charge > 60%.
  • πŸ“₯ Downloaded. TWRP for your model (for example, twrp-3.7.0_12-0-lmi.img for POCO F2 Pro).
  • πŸ“ File. Magisk-v26.4.zip lies in the inner memory.

Instructions:

  1. Turn your phone into Fastboot (Off β†’ Power + Volβˆ’).
  2. Connect to your PC and execute the command: fastboot flash recovery twrp.img fastboot reboot recovery
  3. In TWRP, select Install β†’ Magisk-v26.4.zip and swipe for installation.
  4. Reboot to the system. If it hangs on the logo, repeat the steps by formatting Data in TWRP.

⚠️ Note: On devices with Dynamic Partition (Xiaomi) 12/13 standard series TWRP Use modified versions of the type TWRP A13 Or the fastboot utility enhances from XDA.

πŸ’‘

If after installing Magisk phone does not boot, try it in the TWRP execute the fastboot command --disable-verity --disable-verification flash vbmeta vbmeta.img. This will disable the integrity check.

Alternative method: boot.img patch without TWRP

If your model does not have a stable TWRP (such as Xiaomi Civi 3 or Redmi Note 12 Discovery), use boot.img patch:

  1. Download the stock firmware for your model from the Xiaomi Firmware Updater website.
  2. Remove boot.img from the archive (use 7-Zip or Payload Dumper).
  3. Move boot.img to your phone and in Magisk, select Install β†’ Select and Patch a File.
  4. Copy the patch file (magisk_patched.img) On PC and run through Fastboot: fastboot flash boot magisk_patched.img fastboot reboot

For devices with A/B-partitions (e.g. Xiaomi) 13 Pro) both files must be patched β€” boot.img and init_boot.img, And then stitch them up:

fastboot flash boot_a magisk_patched.img


fastboot flash boot_b magisk_patched.img




fastboot flash init_boot_a magisk_patched_init.img




fastboot flash init_boot_b magisk_patched_init.img

πŸ’‘

On Android devices 13+ be sure to patch init_boot β€” Without it, Magisk will not work, even if it is not boot.img stitched.

Root check and SafetyNet bypass

After the reboot, install the Magisk App (download the APK from GitHub) and check the status:

  • Open the app and make sure the top reads "Installed: 26.4."
  • Click Check SafetyNet – If you are β€œFAIL” activate MagiskHide and restart.
  • For banking applications, install Universal SafetyNet Fix via Magisk β†’ Modules.

If Google Pay or Sberbank does not work:

  1. Turn on MagiskHide in the settings.
  2. Add the app to the hidden list (MagiskHide β†’ select the app).
  3. Install the Props Config module and change the device’s print to a certified one (e.g. Pixel 6).

⚠️ Attention: MIUI 14 Android 13 MagiskHide may not work due to integrated MiuiOptimization protection. ADB: adb shell settings put global miui_optimization_disabled 1

Frequent mistakes and their solutions

Even with the exact following of the instructions, there can be problems.

Mistake.Reason.Decision
"This package is for... but your device is..."Mismatch of MIUI versionDownload the firmware for your regional version (Global/China/EEA)
Hanging on the MI logoDamaged by vbmeta or dm-veritySwitch stock vbmeta.img with the check turned off
"Invalid IMEI" after unlockingResetting NV-data on MediaTekRestore your IMEI with Maui META or SN Writer
Magisk is not installed on Android 14Lack of support init_bootUse Magisk Delta (fork with support for new devices)

After installing root, the phone stopped seeing SIM-maps, check the cards:

  • πŸ“Ά Correctness IMEI in *#06#.
  • πŸ“‘ Network settings in Settings β†’ SIM-maps and mobile networks.
  • πŸ”§ File integrity modemst1 and modemst2 section /vendor.

1. Download QCN Rebuilder and stock firmware for your model.

2. Remove the nvdata.bin file from the firmware.

3.In QCN Rebuilder, specify your IMEI (printed on the box or under the battery).

4.Sweep the resulting nvdata.qcn via QPST or Maui META (for MediaTek).

⚠️ Wrong. IMEI This can lead to a network blocking!

FAQ: Answers to Frequent Questions

Can I get root without unlocking the bootloader?
No. On all Xiaomi devices after 2016, unlocking the bootloader is mandatory, except for exploits for older models (like Redmi 4X on Android 7), but they don't work on new firmware.
How to hide root from banking applications?
Install the MagiskHide Props Config and Universal SafetyNet Fix modules, then: Enable MagiskHide in the settings. Add an app (like SberBank) to the hidden list. Reboot your phone. If it doesn't work, try changing your device print to Pixel 5 via Props Config.
What if Google Services stopped working after root?
Delete the Google Play Services and Google Play Store app data, then: Turn off MagiskHide. Install Google Services Fix. Reboot and update services through the Play Market. If the problem persists, run the fastboot flash system.img.
How to remove root and return the guarantee?
Completely roll back the changes: Remove Magisk via Uninstall in the app. boot.img and vbmeta.img. Fastboot: fastboot erase userdata fastboot erase cache Block the bootloader with fastboot oem lock command. ⚠️ After blocking the bootloader, all data will be erased, and the device will return to factory settings.
What Xiaomi models can’t be flashed through Magisk?
On devices with a closed unlock program (for example, Xiaomi Mi Mix Fold) 2 or black shark 5 Pro) it is not possible to officially obtain root, and problems arise in the: πŸ“± Xiaomi 13T Pro (HyperOS protection). πŸ“± Redmi K60 Ultra (Fastboot locks at iron level). πŸ“± POCO F5 Pro (requires a special patch for the init_boot). For these models, keep an eye out for updates on XDA Developers.