The Xiaomi Mi 5, released in 2016, is still popular among Android enthusiasts thanks to its powerful hardware (Snapdragon 820, 3/4 GB of RAM) and strong support for custom firmware. However, root rights are required to fully control the device β from removing system applications to installing modified cores. In this article, we will discuss current ways to obtain root rights to the Mi 5 in 2026, given the changes in Xiaomi policy and model features.
Important: the procedure for unlocking the bootloader and obtaining root rights voids the warranty and can lead to the inability to use official MIUI updates through the OTA. In addition, improper actions are fraught with a βbriefβ (complete inoperability) of the device. If you are a beginner, follow the instructions carefully and do not miss the steps.
Why do you need root rights to Xiaomi Mi 5?
Root access offers features not available in standard firmware:
- π§ Remove embedded software: remove unnecessary system applications (Mi Browser, Mi Music, Mi Video) that cannot be uninstalled without root rights.
- β‘ Optimizing Performance: Turn off background processes MIUI, Overclock the processor or limit battery consumption for individual applications.
- π± Install custom firmware: flash LineageOS, Pixel Experience or other AOSP projects for pure Android.
- π System-level Ad Blocking: Use AdAway or Blokada to remove ads completely across all apps.
- π Nandroid Backup: Create Full System Backups Through TWRP, including application data and settings.
However, there are downsides: some banking applications (such as Sberbank Online or Tinkoff) refuse to work on rooted devices due to SafetyNet, and the risk of malware infection increases if you install applications from unreliable sources.
Preparation of the device: what to do before unlocking
Before starting the procedure, follow the mandatory steps:
- Back up your data. Use Mi Cloud or adb backup to save contacts, SMS and files. TWRP will be installed later, so you can't do a full backup yet.
- Check out the MIUI version. Go to Settings β About Phone β MIUI version. Any version will do the job, but youβd better use a global stable firmware (e.g. MIUI 12.5) to install Magisk.
- Turn on USB debugging: Settings β About Phone β MIUI Version (click 7 times to become a developer) Settings β Additional β For Developers β Debugging over USB (enable)
- Link your Mi Account. Without a Xiaomi account, you canβt unlock the bootloader. Make sure the account is confirmed by email and phone.
Also prepare:
- π» Windows PC 10/11 Linux (MacOS is not recommended due to driver issues).
- π Original. USB-cable (a faulty cable may interrupt the process!).
- π Battery charge of at least 70%.
Linked to the Mi Account to the device
USB debugging enabled
Backup of important data is made
Installed ADB/Fastboot drivers on PC
Battery charge β₯ 70%-->
Unlock the bootloader on Xiaomi Mi 5
The bootloader is locked by default on all Xiaomi devices, and unlocking it is a mandatory step before obtaining root rights. In 2026, Xiaomi tightened the rules: it now requires waiting 72-168 hours after linking an account to the device.
Instructions:
- Download Mi Unlock Tool from the official website en.miui.com/unlock (version no lower than 5.5.224.24).
- Sign in to Mi Unlock under the same account as your phone. If the program gives an error "Account not bound", double-check the binding in the phone settings.
Once successfully unlocked, the phone will automatically reset to factory settings!
What if the Mi Unlock Tool canβt see the device?
β οΈ Attention: If you interrupt the unlocking process (e.g., disconnect the cable or exit the Fastboot), the timer will reset and you will have to wait again. Do not try to speed up the process using bypass methods - this can lead to hard-brick (irreparable damage).
Installation of custom TWRP Recovery
Once you unlock the bootloader, you need to install TWRP (Team Win Recovery Project) - a custom Recovery that will allow you to flash Magisk and other modifications. For Xiaomi Mi 5 (codename gemini), use the official TWRP build from twrp.me.
Step-by-step:
- Download the image TWRP for Mi 5 (file twrp-3.7.0_9-0-gemini.img Or newer. Rename it in recovery.img convenienceally.
- Move the file to the folder with ADB (for example, C:\platform-tools\).
- Launch your phone in Fastboot mode (as in the previous section) and connect to your PC.
- TWRP command: fastboot flash recovery.img fastboot boot recovery.img After the second command, the phone will automatically reboot to TWRP.
If the TWRP does not start after the reboot and the phone is loaded into a standard MIUI recavator, do:
fastboot flash recovery recovery.img
fastboot oem reboot-recoveryπ‘
To avoid automatic replacement TWRP on the stock Recovery when loading, after the first installation immediately flash Magisk or any other ZIP-file-through TWRP. This will prevent the system from rolling back.
Install Magisk for root rights
Magisk is a universal tool for obtaining root rights without changing the systemless root, and it also allows you to bypass SafetyNet checks, which is critical for banking applications.
Installation instructions:
- Download the latest version of Magisk (Magisk-v26.4.zip or later) from the official GitHub repository.
- Move it. ZIP-file on the phone (internal memory or SD-map).
- Boot in TWRP: adb reboot recovery Or turn off your phone and pinch Volume Up + Power.
- In TWRP, select: Install β Select Magisk-v26.4.zip β Swipe to Confirm Flash.
- Reboot the system (Reboot System).
After the reboot, check for root rights using the Magisk Manager app (sets automatically) or the Root Checker from Google Play.
| Problem. | Reason. | Decision |
|---|---|---|
| Magisk is not installed, the error is "Failed to mount /system". | Incompatible version of TWRP or damaged image | Sweep through another version of TWRP (e.g. 3.6.2 instead of 3.7.0) |
| The phone is loaded into bootloop (cyclic reboot) | Magisk module conflict or incorrect firmware | Download to TWRP and delete files from /data/adb/modules |
| SafetyNet is not working (bank applications are not working) | Universal SafetyNet Fix is not available. | Install the module via Magisk (download on GitHub) |
| No network after Magisk firmware | Damaged modem or EFS-section | Switch to modem.img via Fastboot |
β οΈ Note: If you are using Xiaomi Mi 5 firmware MIUI 13/14, Magisk may not work due to changes in the core, in which case you first roll back to the core. MIUI 12.5 Or install custom firmware based on Android 10.
Checking the efficiency and eliminating errors
After installing Magisk, perform a diagnosis:
- Check root rights: adb shell su If the #-root symbol appears after the su command.
- SafetyNet Test: Open Magisk Manager β Settings β SafetyNet β Press Check. If Status Passed, banking apps will work.
- Check the modules: In Magisk, go to Modules, where you should see the installed add-ons (e.g. SafetyNet Fix).
Typical errors and decisions:
- π¨ Bootloop after Magisk firmware: Delete files /data/.magisk through TWRP and re-set.
- π¨ No Internet: Switch the stock modem.img for your version MIUI.
- π¨ Magisk Manager does not open: Install APK hand-held.
1. Squeeze the stock firmware command fastboot flash all [firmware file].zip.
2. Re-unlock the bootloader (timer will reset!).
3. Install. TWRP Magisk again, but with errors in mind.-->
Alternative ways to obtain root rights
If the standard method with Magisk doesnβt work, consider alternatives:
- π Patched Boot Image: Download stock firmware for Mi 5 from xiaomifirmwareupdater.com. boot.img Process it through Magisk Manager ("Patch Boot Image"). boot.img Fastboot: Fastboot Flash boot magisk_patched.img
Custom firmware with pre-installed rue
Firmware like LineageOS for MicroG or Havoc-OS already includes Magisk, which can be installed via TWRP after unlocking the bootloader.
ADB Root (temporary root)
For one-time tasks (for example, removing system applications), a temporary root through ADB will suit:
adb shell
su -c "pm uninstall -k --user 0 com.miui.browser"The rights are valid until the reset.
Power users can also use KernelSU, an alternative to Magisk that is built into the core, but the Mi 5 requires a KernelSU-enabled custom core, which complicates the process.