Getting the root rights to the Xiaomi Mi 9 (codenamed cepheus) is a task that requires attention to detail. This smartphone, released in 2019, remains popular among customization enthusiasts thanks to its powerful hardware (Snapdragon 855) and active developer community.
In this article, we will discuss the current 2026 The method of obtaining root rights, taking into account all the pitfalls: from the official unlocking of the bootloader to the installation of Magisk and bypassing the antirollback. 9, β for example, Anti-4 Or a brick after a vendor fails to firmware. If you're a beginner, be prepared: the process will take time. 2β4 It takes an hour to get a computer ADB/Fastboot.
β οΈ Note: Unlocking the bootloader and obtaining root rights will void the Xiaomi warranty and may result in data loss or device failure. On some firmware (such as Chinese or global stable) Widevine will stop working after unlocking. L1, What reduces the quality of streaming in Netflix/Disney+ before 480p.
1.Preparation: What to do before unlocking
Before you start manipulating the bootloader, make sure that your Xiaomi Mi 9 meets the key requirements. First, check the version of MIUI in Settings β About the phone. Any official firmware (stable or developer) will suit you for successful unlocking, but it is better to use the world or European one - on the Chinese versions, Xiaomi servers are more likely to have problems.
Secondly, it is imperative that:
- π Charge your phone to at least 60% β the unlocking process can take up to an hour.
- π± Make a full backup of data through Mi Cloud or ADB Backup β After unlocking the phone will be reset.
- π» Prepare a computer with Windows 10/11 Linux (macOS is not recommended due to problems with Fastboot drivers).
- π Use the original. USB-Cheap cables often cause waiting for device errors.
Also check if the bootloader has been unlocked before. To do this, turn off the phone, then press Volume Down + Power to log into Fastboot. If you see Unlocked at the bottom of the screen, the bootloader is already unlocked, and you can go to TWRP installation. If not, read on.
2 Unlock the bootloader through the Mi Unlock Tool
Xiaomi officially lets you unlock the bootloader, but the process is complicated by account checks and waiting.
1. Link your Mi Account to your phone:
Go to Settings β Xiaomi Account and log in.
- Enable Settings β Additional β For developers β Linking Mi Account (if there is no item, tap 7 times on the MIUI version to activate the developer mode).
Connect your phone to the Internet via mobile data (Wi-Fi may not work!) and wait for SMS to confirm the binding.
2 Download the Mi Unlock Tool:
- Official utility: https://en.miui.com/unlock/ (version no lower than 5.5.224.30).
- Unpack the archive and launch it. miflash_unlock.exe on behalf of the administrator.
3. Launch unlock:
- Transfer the phone to Fastboot (Loudness down + Power).
- Connect to the PC and in the utility press Unlock.
If a Couldnβt unlock error appears, it means that the account is not tied or the phone has not passed the waiting check (usually 72-168 hours).
Linked to Mi Account on phone|Download the latest version of the Mi Unlock Tool|Phone in Fastboot mode|Antivirus on PC is disabled|Used by the original USB-cable-->
β οΈ Warning: If you see this device is locked.Connect this device to Mi Unlock with the same account, but it doesn't start unlocking, try changing your account region to China in the Mi Account settings.
3. Installation of custom TWRP Recovery
After unlocking the bootloader, you need to install TWRP - custom recavers, which will allow you to flash Magisk to obtain root rights. For Xiaomi Mi 9 (cepheus), an unofficial version of TWRP from the developer mauronofrio (it supports FBE encryption and dm-verity).
Download the latest release:
- π₯ TWRP for Mi 9: XDA Developers (seek out the file) twrp-3.7.0_12-0-cepheus-mauronofrio.img).
- π₯ Magisk (Last Version): GitHub (download) Magisk-v26.4.zip).
Install TWRP via Fastboot:
- Place the downloaded twrp.img in the folder with the platform-tools (where adb.exe and fastboot.exe lie).
- Open the command line in this folder and execute: fastboot flash recovery twrp-3.7.0_12-0-cepheus-mauronofrio.img fastboot boot twrp-3.7.0_12-0-cepheus-mauronofrio.img
- The phone will reboot to TWRP. Don't reboot to the system! Go straight to Magisk firmware.
π‘
If after the command fastboot boot phone is stuck on the MI logo - press Volume up + Power for 10 seconds for a forced reboot, then repeat the command.
4. Magisk firmware and obtaining root rights
In TWRP, follow the following steps:
- Click Install β select downloaded Magisk-v26.4.zip β swipe for firmware.
- Once completed, press Reboot System. If TWRP asks you to install the TWRP App, refuse (no need for it).
- The first download can take 5-10 minutes β do not interrupt the process!
After downloading the system, check for root rights:
- Install the Magisk app from the Play Market.
- Open it if you see a green tick and the words Installed: 26.4, root is successful.
- Check the operability through the terminal by entering the command: su If there is a request for rights, everything works.
β οΈ Attention: On some firmware MIUI 14/15 After Magisk is installed, the mobile network may disappear. RIL. Decision:
- Install the Mi 9 RIL Fix module in Magisk (search for XDA).
- Or run a vendor from the old version of MIUI through Fastboot: fastboot flash vendor.img
5. Solving common mistakes
The process of obtaining root rights to Xiaomi Mi 9 is often accompanied by errors.
| Mistake. | Reason. | Decision |
|---|---|---|
| Anti-4 / Anti-rollback | Firmware of the newer version of MIUI over the old one without updating anti-flags. | Swipe the full firmware package through the Mi Flash Tool with the clean all tick. |
| This package is for "cepheus" devices; this is a "" | TWRP or Magisk are for a different model. | Download files for cepheus (not for Mi 9 SE or Mi 9T!). |
| The phone does not boot after Magisk firmware | Module conflict or the wrong version of Magisk. | Download to TWRP and swipe Magisk-uninstaller.zip, then re-install. |
| Fastboot: unknown command 'flash' | An outdated version of platform-tools. | Update ADB/Fastboot to the latest version from the official website. |
If after unlocking the bootloader, the phone stopped seeing SIM-The map is likely damaged by the modem partition:
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbnThe NON-HLOS.bin and fsg.mbn files can be extracted from the full firmware for your model.
What if Mi Unlock Tool says β50%β and freezes?
6. How to hide root from applications (SafetyNet)
Many apps (banking, gaming, streaming) block access on root devices, and to get around this, you need to pass SafetyNet.
1. Install modules in Magisk:
- Universal SafetyNet Fix (by kdrag0n).
MagiskHide Props Config (to change the print of the device)
2. Set up MagiskHide:
Open Magisk β Settings β turn on MagiskHide.
In the MagiskHide section, tick the apps that need to hide root (for example, Sberbank Online or Google Pay).
3. Check SafetyNet status:
Install the SafetyNet Test application.
If ctsProfile status is false, restart your phone and check again.
β οΈ Attention: MIUI 14/15 Android 13+ Some banking applications (such as Tinkoff) can detect root even with MagiskHide enabled, in which case only removing Magisk completely or using Work Profile (via Island app) will help).
π‘
Without going through SafetyNet, you wonβt be able to use Google Pay, Netflix in HD, and most banking apps. MagiskHide is a must-have step after you get root rights.
7. Alternative methods of root production
If the standard method with TWRP and Magisk didnβt work, consider the alternatives:
- π§ Patched Boot Image: Sweep through modified boot.img with already built-in Magisk (suitable for devices with a locked bootloader, but requires unlocking) OEM).
- π¦ Custom firmware: Install firmware with pre-sewn root (like LineageOS or Pixel Experience). MIUI (for example, the themes of design).
- π EDL Mode: Emergency Firmware Mode via Qualcomm 9008.A risky method, requires an authorized Xiaomi account and a special cable.
For the Xiaomi Mi 9, the most reliable alternative is OrangeFox Recovery firmware instead of TWRP. This recaveri has better FBE support and is less likely to cause errors when working with the vendor.
8 How to get it all back (reversed)
If you need to return your phone to its original state (for example, for warranty repairs), follow the following steps:
1. Delete Magisk:
In the Magisk app, click Delete β Complete Delete.
Or run the Magisk-uninstaller.zip file through TWRP.
2. Restore the stock Recovery:
Download the official firmware for your model from the Xiaomi website.
- Remove the recovery.img file from the archive and run it through Fastboot:
fastboot flash recovery recovery.img3. Lock the loader:
Go to Fastboot and do:
fastboot oem lock- β οΈ Warning: This command will completely reset the phone and delete all data! Once the bootloader is locked, it will be impossible to restore root without re-unlocking.
4. Sweep through the full stock firmware:
Use the Mi Flash Tool with the clean all and lock option to return to factory condition.
π‘
A rollback to stock firmware does not guarantee a warranty recovery. Xiaomi can determine whether a bootloader has been unlocked from the deviceβs logs even after locking.