Getting root rights on Xiaomi smartphones opens up access to hidden Android features, but it requires caution: wrong actions can turn a device into a brick. In 2026, the process was complicated by the tightening of the security policy of MIUI and the new HyperOS, but remains feasible. This article will detail all the steps from unlocking the bootloader to installing Magisk and TWRP, taking into account the features of the latest firmware.
Itβs important to understand that on devices with MediaTek processors (such as the Redmi Note 12 or POCO M6 Pro), the unlocking algorithm is different from the Snapdragon, and for some models, it requires waiting 168 hours after an account is tied. Weβll look at both scenarios, as well as alternative methods for devices where official unlocking is not available.
Preparation of the device: what to do before unlocking
Before you start unlocking the bootloader, follow the mandatory steps:
- π Battery charge of at least 60% β the process can take up to 2 hours.
- π± Create a backup of data through Settings β The phone. β Backup or Mi Cloud. Once unlocked, all data will be erased.
- π Link your Mi Account to your device (in Settings) β Accounts. Unblocking is impossible without this.
- π₯οΈ Install the Mi Unlock Tool (no lower version) 5.5.224.30) Windows-based 10/11.
Pay special attention to drivers: if the Mi Unlock Tool does not see the device in Fastboot mode, install ADB and Fastboot drivers from Google or use Xiaomi Driver Installer.
fastboot devicesIf you see the serial number of the device, the drivers are installed correctly. On models with HyperOS (for example, Xiaomi 14 or Redmi). K70) Additional confirmation of unlocking may be required through SMS-code.
Unlock the bootloader: the official method through Mi Unlock
The official unlock method works for most devices, but has limitations:
| Conditions | Snapdragon | MediaTek |
|---|---|---|
| Waiting time after account link | 72 hours | 168 hours (7 days) |
| Support for HyperOS | Yes (with SMS confirmation) | Yes (Requires the latest version of Mi Unlock) |
| Max: Number of Unlocks Per Month | 1 | 1 |
Step-by-step:
- Activate Developer Mode: Go to Settings β About Phone and click on MIUI Version 7 times.
- Enable OEM unlocking and USB debugging in Settings β Additional β For developers.
- Turn off the phone and press Volume Down + Power to log into the Fastboot.
- Connect the device to your PC and launch the Mi Unlock Tool. Sign in with the same account you have on your phone.
- Press Unlock and wait until the process is completed (usually 10-30 seconds).
β οΈ Note: On devices with HyperOS after pressing Unlock may appear a request for input SMS-The code sent to the number associated with the Mi Account is valid for 5 minutes.
The device rebooted automatically|Fastboot has a sign on it. UNLOCKED|When turned on, a warning appeared about the unlocked loader|B Settings β The phone. β Device status bootloader: Unlocked-->
Installation of custom recovery (TWRP)
Once the bootloader is unlocked, you need to install TWRP, an alternative recovery that allows you to flash modified images. Official TWRP builds are available on twrp.me, but new models (such as the Xiaomi 13T or Redmi Note 12 Turbo) may require unofficial versions from developer Telegram channels.
Download the correct version of TWRP for your model (note the encoding, for example, vili for Xiaomi 12 or rubens for Redmi Note 12 Pro+).
fastboot flash recovery twrp-3.7.0_12-0-vili.img
fastboot boot twrp-3.7.0_12-0-vili.imgIf, after rebooting, the TWRP system offers to enter a password (due to data encryption), format the Data partition in the Wipe menu β Format Data (all data will be deleted!).
What happens if TWRP is not installed?
Getting root rights through Magisk
Magisk is a universal root-rights tool that is systemless root, with Magisk 26.4 being the most recent stable version as of 2026, but HyperOS may require a beta version (27.0+).
Installation instructions:
- Download Magisk APK and install it on your phone (you can use it directly from TWRP).
- Download the same file Magisk-v26.4.apk, but rename it to Magisk-v26.4.zip (this is the flashable image).
- In TWRP, select Install β Select Magisk-v26.4.zip β Swipe to Confirm Flash.
- After the firmware is restarted, Magisk will offer additional settings when you first start up.
To check access rights, install the Root Checker app from Google Play. If Root Access: Available status is successful, it was successful.
β οΈ Note: Mi Pay and some banking applications may stop working on HyperOS devices after Magisk is installed.
π‘
If after firmware Magisk phone fixated on the logo, try flashing Disable_Dm-Verity_ForceEncrypt.zip (available XDA). This patch disables system integrity checks, which can block booting.
Problem Solving: Frequent Errors and Corrections
Even if you follow the instructions accurately, you can get errors.
- π Fastboot: FAILED (remote: 'Flashing is not allowed in Lock State' - bootloader not unlocked. Repeat process in Mi Unlock Tool.
- π± The device does not turn on after firmware TWRP β It's probably the wrong version of recovery. boot.img Fastboot: Fastboot Flash boot boot.img
- π Apps donβt see root β activate MagiskHide in Magisk settings and add apps to the exclusion list.
- π Fast battery drain after root - disable Magisk modules associated with the change CPU/GPU (KernelSU or Performance Mode).
For devices on MediaTek (e.g. Redmi 10C or POCO M5), an additional step may be required β disabling SLA (Secure Boot) via the command:
fastboot oem disable-slaWithout this, TWRP will not be able to access the partitions.
π‘
If the phone doesnβt turn on after all the manipulations, try flashing the full stock ROM through the Mi Flash Tool in Clean All mode. This will return the device to factory state, but delete all data.
Alternative methods of obtaining root without unlocking the bootloader
For some models (such as the Xiaomi 11T Pro or Redmi K50 Gaming), there are exploits that allow you to get a temporary root without unlocking the bootloader. The most famous is DirtyPipe (CVE-2022-0847), but it only works on Android 12 and below.
A more reliable way is to use ADB backup to extract boot.img, modify it through Magisk, and reverse firmware.
- USB debugging enabled.
- Installed Android SDK Platform Tools.
- Knowledge of the command line for working with adb and fastboot.
Detailed instructions:
adb backup -f boot.ab -apk -obb -shared -all -system
Remove boot.img from boot.ab archive (use 7-Zip)
Open boot.img in Magisk and get patched_boot.img
Squeeze the modified boot:
fastboot flash boot patched_boot.imgThis method does not require unlocking the bootloader, but has limitations: root will be lost after the system update, and some features (such as changing system files) will remain unavailable.
Security after root: how not to lose your warranty and data
Getting root rights voids Xiaomi's warranty, but it can be returned by restoring stock firmware to minimize the risks:
- π Regularly create backups through TWRP (Backup section. Save copies on PC.
- π‘οΈ Do not uninstall system applications without checking (e.g. MiuiDaemon is responsible for updates).
- π± For banking applications, use the MagiskHide Props Config module and set up root hiding.
- π Before the update MIUI/HyperOS Temporarily remove Magisk (uninstall option) β Complete Uninstall in the appendix).
If you need a service center, return the device to stock state:
- Sweep the original boot.img through Fastboot.
- Install stock recovery: fastboot flash recovery recovery.img
- Log in to Fastboot and execute: fastboot oem lock (β οΈ This will block the bootloader and delete all data!)
After that, the service center will not be able to determine that the device has been unlocked.