How to get root rights to Xiaomi Mi 9: a safe guide with error analysis

Xiaomi Mi 9 is still a popular flagship among customization enthusiasts, but getting root rights to it in 2026 requires caution. With the release of new versions of MIUI 14/15 and security patches, the process has become more complicated: standard methods often lead to errors such as Anti-Rollback or lock the bootloader. This guide provides current ways to unlock, install TWRP and Magisk, as well as analyzing the typical problems faced by owners of Mi 9 (codename cepheus).

Important: the procedure voids the warranty and can lead to data loss or a โ€œbrickโ€ of the device. We will look at the official method through the Mi Unlock Tool and alternative options for circumventing Xiaomi restrictions. If your goal is simply to remove embedded applications or turn off ads, perhaps enough is enough. ADB-team-less.

Preparation of the device: what to do before unlocking

Before you start the process, make sure your Mi 9 meets the following key requirements:

  • ๐Ÿ“ฑ Version. MIUI: Check in the settings โ†’ For stable firmware, Magisk is the method, for beta versions, only official unlocking.
  • ๐Ÿ”‹ Battery charge: at least 60%. The process can take up to 30 minutes, and discharge during firmware can lead to irreversible damage to the boot partition.
  • ๐Ÿ” Backup: Use Mi Cloud or Adb Backup to Save Contacts, SMS And the applications, the internal memory will be formatted!
  • ๐Ÿ–ฅ๏ธ Computer: Need a Windows PC 7/10/11 (for Mi Unlock Tool or Linux/macOS (Virtual machines are not suitable for fastboot teams.

Pay special attention to the binding of the Mi Account. Since 2021, Xiaomi has tightened the policy: to unlock the bootloader requires an account tied to the device for at least 7 days. If you just dropped the phone or bought it from hand, you will have to wait. Check the binding in Settings โ†’ Xiaomi Account โ†’ Mi Cloud.

โš ๏ธ Attention: On some firmware MIUI 14+ When you unlock the bootloader, Anti-Rollback 4 is activated to block the downgrade. If your goal is to install custom firmware (for example, LineageOS), check compatibility with the current version. MIUI forum XDA Developers.

๐Ÿ“Š Why do you want to root on Xiaomi Mi 9?
Removal of embedded applications
Installation of custom firmware
Overclocking the processor
Modification of system files
Other

Unlock the bootloader through the Mi Unlock Tool

This is the only legal method approved by Xiaomi, but with a number of restrictions.

  1. Download Mi Unlock Tool (version no lower than 5.5.224.30). Install Mi Flash drivers from the archive.
  2. Activate Developer Mode: Go to Settings โ†’ About Phone and 7 times click on MIUI Version. Then to Settings โ†’ Additional โ†’ For developers, turn on USB Debugging and OEM Unlock.
  3. Connect the Mi 9 to your PC and launch the Mi Unlock Tool. Sign in with the same Mi Account as your phone.
  4. Turn the device into fastboot mode: turn off the phone, then press Volume Down + Power. In the tool, press Unlock.

If a Couldn't unlock or Current account is different from the account info on the device occurs, it means:

  • ๐Ÿ”„ The account is not tied to the device 7+ days (decision: wait).
  • ๐Ÿ“ต The phone does not support unlocking (check on the official website).
  • ๐Ÿ”Œ Problems with USB-Cable or port (try another cable).

โ˜‘๏ธ Preparation for unlocking the loader

Done: 0 / 5

Installation of TWRP and obtaining temporary root

Once unlocked, you can install a custom TWRP recavator that allows you to get a temporary root and flash Magisk. For Mi 9 (cepheus), use the version of TWRP 3.7.0+ from the developer mauronofrio (link to XDA).

Instructions:

fastboot flash recovery twrp-3.7.0-cepheus.img


fastboot boot twrp-3.7.0-cepheus.img

If a password request appears in TWRP after the reboot (due to FBE encryption), do:

  1. In TWRP, select Wipe โ†’ Format Data (this will delete all data!).
  2. Reboot back to TWRP (clip Volume Up + Power when booting).
  3. Copy Magisk-v26.4.zip to your phone via MTP (in TWRP, click Mount โ†’ Enable MTP).
  4. Pass Magisk through Install โ†’ Select a file โ†’ Swipe to confirm.

โš ๏ธ Attention: On some firmware MIUI 15 installation TWRP It leads to a bootloop. So, flash. disable_forceencrypt_treble.zip immediately TWRP, But it'll turn off the encryption! TWRP If you are not running a fastboot boot twrp.img The phone reboots to the standard recap, which means the firmware has activated anti-Rollback protection. MIUI via Mi Flash Tool with clean all mark, then repeat the installation TWRP. Continuous root through Magisk: Step-by-step Magisk 26.4+) โ€” The most reliable way to get system root without losing the ability to use banking applications (thanks to MagiskHide). TWRP: Reboot to the system. Install Magisk. APK And open it. The app should show you the status of Installed. In Magisk settings, enable Zygisk and Enforce DenyList (to bypass SafetyNet). Check root health through the Root Checker app or by a team in Terminal: su id If the output contains uid=0(root), root successfully activated. To hide root from banking applications (for example, Sberbank Online or Google Pay): ๐Ÿ›ก๏ธ Add the app to DenyList (formerly MagiskHide). ๐Ÿ”„ Reset the device. ๐Ÿ“ฑ Check SafetyNet status in Magisk (should be) PASS both). ๐Ÿ’กIf Google Pay doesnโ€™t work even after you set up DenyList, try installing Universal SafetyNet Fix via Magisk. You can download it on GitHub. Common bugs and their solutions Even with the exact instructions, Mi 9 owners face problems. Below is a table of typical errors and ways to fix them: Error Reason Fastboot solution: FAILED (remote: 'Flashing is not allowed in Lock State') bootloader Unlocked Repeat the procedure with Mi Unlock Tool, wait 7 Accounts for E: Unknown Command [log] into TWRP Incompatible version TWRP Install. TWRP 3.7.0+ from mauronofrio (see link above) Phone does not turn on after Magisk firmware Damaged boot.img Stitch the original boot.img via fastboot flash boot boot.img, This package is for "cepheus" devices; this is a "". Wrong. ZIP-Download the universal version of Magisk (not for a specific device) SafetyNet does not pass (CTS Profile: FAIL) Root or incorrect props are detected, Install Universal SafetyNet Fix and add the app to DenyList if your Mi is available. 9 stuck on the logo MIUI after-manipulation TWRP, Try: Clutch the Loud up + Food for entry TWRP. Sweep disable_dm-verity_forceencrypt.zip (If encryption is disabled, run Wipe โ†’ Advanced Wipe โ†’ Dalvik/ART Cache, Cache. ๐Ÿ’กIf after installing Magisk phone stopped booting, most likely the problem is in the modified boot.img. The solution is to flash the original boot through fastboot, then repeat the procedure from scratch. Alternative methods: root without unlocking the bootloader For those who do not want to risk unlocking the bootloader, there are workarounds. They give limited root (no ability to modify system files), but allow you to use them: ๐Ÿ—‘๏ธ Remove embedded applications (bloatware) through ADB. ๐Ÿ”ง Change the build.prop settings without full access. ๐Ÿ“ฑ Use Shizuku to manage Android via PC. Method 1: ADB-commands to remove applications Connect your phone to your PC, activate debugging USB and perform: adb shell pm uninstall -k --user 0 com.miui.analytics A list of removal packages can be found at XDA. This method does not require root, but after a reboot, some applications can recover. 2: Shizuku + Tasker Install Shizuku and connect via ADB: adb pair {port}:{key} This allows you to manage some system functions without full root, but with limitations (e.g., you can not modify). /system). What to do after root: Root optimization and security are great opportunities, but it requires a responsible approach: ๐Ÿ”’ Turn off automatic updates MIUI: They can overwrite modified files. Do it in Settings. โ†’ The phone. โ†’ Updating the system โ†’ โ‹ฎ โ†’ Settings โ†’ Auto-update. ๐Ÿ›ก๏ธ Install Magisk modules for optimization: BusyBox for many root applications. ViPER4Android โ€” App Systemizer - to transfer applications to the /system. ๐Ÿ“Š System Monitoring: Use Kernel Auditor to configure the kernel or Greenify to manage background processes. For security: Regularly update Magisk and modules. Do not install modules from unreliable sources (bootloop risk). Create a backup copy boot.img and recovery.img Fastboot: Quickboot Getvar Product 2>&1 | findstr "product" fastboot dump boot boot.img fastboot dump recovery recovery.img โš ๏ธ Note: Some Magisk modules (e.g., Xposed Framework) conflict with the MIUI 14/15 You can use the download loop to check compatibility on the forum before you install it. XDA or 4PDA. FAQ: Answers to Frequent Questions: Can I Get a Root on Mi? 9 No, full root requires an unlocked bootloader. Alternatives (e.g. Shizuku or Shizuku) ADB-commands) give limited capabilities, but not complete control of the system. Will I lose data when I unlock the bootloader? Yes, unlocking resets the device to factory settings. TWRP before unlocking and backup through it, the data can be restored (except for internal storage if it is encrypted). Does Google Pay work after getting root? Yes, if you configure MagiskHide (or DenyList in newer versions) correctly and install the Universal SafetyNet Fix module. Before setting up, remove all banking apps, then add them to exceptions and reinstall them. Can you get your warranty back when you unlock it? Theoretically, yes, if you return the device to its original state: Swipe the official firmware through the Mi Flash Tool with the clean all option; Lock the bootloader with the command fastboot oem lock; Reset the unlock counter (possibly not on all devices). However, Xiaomi can detect traces of modifications by logs, so warranty repairs are not guaranteed. MIUI After getting root? Update through OTA It canโ€™t be done, it will cause root loss. Alternatives: Download full firmware (.tgz) with Xiaomi Firmware Updater and stitch them through TWRP prepatched boot.img Use custom firmware on the base. MIUI (for example, MIUI EU), supportive OTA-Update with root. Always backup your update before you update. TWRP!