Rooting a Xiaomi smartphone opens up access to hidden Android capabilities, but it requires caution. Without proper preparation, you risk turning the device into a brick or losing your warranty. This guide will help you understand the process from A to Z: from unlocking the bootloader to installing Magisk to manage root rights.
It is important to understand that the procedure is different for different models of Redmi, POCO and Mi. For example, on Xiaomi 13 Pro with MIUI 15 the algorithm will be different than on Redmi Note 10 with MIUI 12.
Before you start, check out: starting in 2023, Xiaomi has tightened its bootloader unlock policy โ now requires a Mi Account to be linked to the device for a minimum of 168 hours (7 days) before applying.
What does rooting Xiaomi give and what are the risks?
Root rights allow:
- ๐ง Remove system applications (MIUI Bloatware without consequences
- ๐ Install custom firmware like LineageOS or Pixel Experience
- ๐ Optimize battery life with Greenify or Battery Charge Limit
- ๐ฎ Use game console emulators with full support
- ๐ฑ Modify system fonts, animations and interface
But there's a downside.
- โ ๏ธ Loss of warranty โ official service centers will refuse repairs
- ๐ก๏ธ Malware vulnerability (root access bypasses Google Play Protect protection)
- ๐ Problems with OTA-Updates (you will need to install the firmware manually)
- ๐ต Banking applications inoperability (due to SafetyNet trigger)
โ ๏ธ Note: On devices with MediaTek processor (e.g. Redmi) 9A or POCO M3) Unlocking the bootloader can lead to hardware locking IMEI. Before the procedure, save a backup copy of the nvram partition via SP Flash Tool.
Preparation of the phone: unlocking the loader
The first step is unlocking the bootloader. Without that, you can't install custom recovery or firmware. Xiaomi uses its own unlock system through the Mi Unlock Tool app.
Algorithm of action:
- Activate Developer Mode: Go to Settings โ About Phone and click on MIUI Version 7 times.
- Back to Settings โ Additionally. โ For developers and include: ๐ Unlocking OEM (It may not be available on new models) ๐ Debugging by USB
Mi
Settings โ Xiaomi Account โ Mi Cloud
Mi Unlock Tool
Then connect your phone to your PC in Fastboot mode (click Volume Down + Power When the device is off) and start the Mi Unlock Tool. The program will check if you can unlock. If you see the message "Couldn't unlock. Wait 168 hours" - you will have to wait 7 days from the moment of the account's attachment.
โ๏ธ Checking before unlocking
โ ๏ธ Note: On HyperOS devices (e.g. Xiaomi 14 or Redmi) K70) The standard Mi Unlock Tool may not work, but alternative methods may be used. EDL-Mode (requires an authorized Xiaomi account).
Installation of TWRP Recovery: version selection and firmware
TWRP (Team Win Recovery Project) is a custom recovery required to install Magisk or custom firmware. For Xiaomi, there are official and informal builds.
Where to download the correct version:
- ๐ฑ Official website: twrp.me (look for the exact model, for example, davinci for Redmi) K20 Pro)
- ๐ง Informal assemblies: forum XDA Developers (check reviews!
- ๐ฆ Telegram channels: @XiaomiTWRP or @MIUIUpdates
Installation instructions:
- Rename the downloaded.img file to twrp.img and place it in the folder with the platform-tools (where the fastboot is located).
- Connect your phone in Fastboot mode and execute the command: fastboot flash recovery twrp.img
- Immediately after the firmware, go to TWRP, holding Volume Up + Power. If the regular MIUI loads, recovery will restart!
For some models (e.g, POCO F5 Xiaomi 12T) patchy vendor_boot. In this case, use the command:
fastboot flash vendor_boot vendor_boot.img
fastboot flash boot magisk_patched.imgWhat to do if TWRP does not start?
Installation of Magisk for root rights management
Magisk is a root-rights tool that allows you to bypass SafetyNet checks, which is important for banking applications.
Step-by-step:
- Download the latest Magisk ZIP (version 26.4+ for Android 13/14).
- Transfer the file to your phone or flash drive.
- Download to TWRP and click Install โ select the downloaded file.
- After installation, run Wipe โ Format Data (this will delete all data, but it is necessary for correct operation!).
- Reboot to the system. When you first start, install the Magisk App from the file (download the APK from the same GitHub).
To check root rights, install Root Checker from Google Play, and if you see the message "Root access is properly installed" - it was successful.
If banking applications (e.g. SberBank or Tinkoff) have stopped working after installing Magisk, activate the following settings in Magisk:
- ๐ MagiskHide (Hidden Root from Apps)
- ๐ก๏ธ Zygisk (to bypass new checks)
- ๐ฑ DenyList (add banking applications to exceptions)
1. Download to TWRP and reinstall Magisk.
2. delete the file `/data/adb/magisk.db` through the file manager in TWRP.
3. Sweep the original boot.img fastboot.-->
Solving Typical Problems After Rooting
Even with the right installation, there can be difficulties.
| Problem. | Reason. | Decision |
|---|---|---|
| Phone not switched on (brick) | Wrong firmware TWRP or Magisk | Swipe the official firmware through the Mi Flash Tool in EDL mode |
| Banking applications are not working | SafetyNet or Play Integrity Trigger | Activate Zygisk + MagiskHide and add the app to DenyList |
| No net (IMEI reset) | Nvram section is damaged (relevant to MediaTek) | Recover the nvram backup via the SP Flash Tool or Maui META |
| MIUI not updated | System partition changed | Updates only via TWRP (.zip files) |
If Google Pay or Netflix stop working after rooting, check SafetyNet status in Magisk. If you see "CTS profile: fail," install modules:
- ๐ Universal SafetyNet Fix (by kdrag0n)
- ๐ก๏ธ MagiskHide Props Config (to change the print of the device)
โ ๏ธ Note: On Dynamic Partition devices (all Android 10 models)+) You cannot change the size of the sections through TWRP. This will result in data loss and the need for a complete flashing through fastboot.
How to return the phone to its original state?
If you need to give up your phone under warranty or sell it, you need to remove all traces of rooting.
- Uninstall the Magisk menu (Uninstall โ Complete Uninstall).
- Stitch the original boot.img Fastboot: Fastboot Flash boot boot.img
- Return standard recovery: fastboot flash recovery recovery.img
- Fastboot: fastboot erase userdata fastboot erase cache
- Lock the bootloader back (optional, but recommended for warranty): fastboot oem lock
For complete cleanliness, run the official firmware through the Mi Flash Tool with the clean all and lock option, which will return the phone to factory status, but delete all data.
๐ก
Even after removing Magisk, some banking apps can remember that the device has been rooted, in which case only a complete firmware reflash with the bootloader locked will help.
Alternative Rooting Methods Without TWRP
For some models (such as the Xiaomi 13 Ultra or POCO F5 Pro), TWRP installation may be difficult due to AVB 2.0 protection.
Method 1: Patch boot.img via Magisk
- Download the original boot.img for your firmware (can be extracted from the official ROM).
- Transfer it to your phone and open it in Magisk (Install โ Select and Patch a File).
- Squeeze the result. magisk_patched.img fastboot.
Method 2: Root through ADB (Temporary)
For one-time tasks (for example, removing system applications), you can use a temporary root:
adb shell
su
mount -o rw,remount /system
rm /system/app/Analytics/Analytics.apk
mount -o ro,remount /systemThis method does not require unlocking the bootloader, but the rights will disappear after the reboot.