How to get root access on Xiaomi Mi 9: from unlocking the bootloader to Magisk

Xiaomi Mi 9

cepheus

Mi 9

Anti-Rollback

Many users experience bugs like Fastboot: Unknown command or logo getting stuck after a failed firmware. This guide provides current methods for the Mi 9 for 2026, including bypassing Xiaomiโ€™s new restrictions, choosing between Magisk and SuperSU, and how to restore the system when it crashes. We wonโ€™t convince you that you need a root (each has its own reasons), but we will warn you that the warranty will burn, and the risk of โ€œbrickingโ€ the device is ~5% if you donโ€™t follow the instructions.

If you are willing to sacrifice official support for the sake of full control of your smartphone, letโ€™s get started. For beginners, we recommend that you read the section on the risks and alternatives to rut first.

Preparation of the device: what to do before unlocking

Before you touch the system partitions, make sure your Xiaomi Mi 9 is ready for the procedure. First and foremost, unlock the bootloader. Without this, no method of getting the root will work. Xiaomi officially lets you unlock the bootloader, but the process takes up to 7 days of waiting SMS-code.

Here's what you have to do:

  • ๐Ÿ“ฑ Check the model and version MIUI: Go to Settings. โ†’ About the phone. 9 current firmware based on Android 10/11 (MIUI 12โ€“14). On older versions (Android) 9) There may be problems with the anti-Rollback.
  • ๐Ÿ”‹ Charge the battery to 80%+. Interrupting the process due to discharge is almost guaranteed to lead to a "brick".
  • ๐Ÿ’พ Make a full backup: use Mi Mover or TWRP (Xiaomi cloud backups do not store application settings and data of some games.
  • ๐Ÿ–ฅ๏ธ Prepare a PC: Install Android SDK Platform-Tools (or a minimum package with fastboot and adb). Windows will also require Xiaomi drivers.

Pay special attention to the binding of the Mi Account. Without a confirmed account, unlocking the bootloader is impossible. If you bought the phone with your hands, make sure that the previous owner untie your device in Settings โ†’ Xiaomi Account โ†’ Security โ†’ Devices.

โš ๏ธ Note: Mi 9 with newer firmware MIUI 13.0.4 Xiaomi has tightened account verification.If you recently reset your phone to factory settings, wait 24 hours before unlocking - otherwise the system will block the attempt with the Couldn't verify device error.

๐Ÿ“Š Why You Need to Root on Xiaomi Mi 9?
Removal of embedded applications
Installation of custom firmware
Core configuration (CPU/GPU)
Game modifications (GameGuardian)
Other

Unlock the bootloader: the official way from Xiaomi

The process of unlocking the bootloader on the Mi 9 consists of three stages: linking the account, waiting for permission and directly unlocking through fastboot. Xiaomi requires you to confirm ownership of the device, so without any restrictions. SIM-Cards or Wi-Fi are not enough.

Step-by-step:

  1. Activate Developer Mode: Go to Settings โ†’ About Phone and 7 times click on the MIUI Version. Return to the main settings, the Developer Item will appear.
  2. Enable USB debugging: In the developer menu, activate USB debugging and OEM unlocking (an important item!).
  3. Link Mi Account: in the same menu, find Unblock Status โ†’ Add account and device. The system will send a request to the Xiaomi server.
  4. Expect SMS: usually comes in 3-7 days (sometimes faster) and will link to the unlock page.
  5. Unlock via Mi Unlock Tool: download the utility from the official website, log in and connect the phone in fastboot mode (clamp Volume down + Power).

If the utility gives you a Couldn't unlock or Device not connected error, check:

  • ๐Ÿ”Œ Cable USB (It is better to use the original from Xiaomi).
  • ๐Ÿ–ฑ๏ธ Drivers on PC (reinstall via Mi Flash Tool).
  • โณ Waiting time (if less than 7 days have passed, unlocking will not work).

โš ๏ธ Warning: Some Mi 9 firmware automatically resets to factory settings after unlocking the bootloader. Do not connect to Wi-Fi immediately after unlocking - install first TWRP Magisk, or the system may block the bootloader again when the first update is made.

Linked to Mi Account device | USB debugging and OEM unlocking Enabled Drivers Installed and Mi Unlock Tool| Phone charged at 80%+| There is a backup of data-->

Installation of custom TWRP Recovery: why it is necessary

The standard Mi 9 recap is not available. ZIP-files with root rights or custom firmware, so you need to flash the bootloader when you unlock it. TWRP โ€” Modified recovery with support for sensor control and data encryption.

For Xiaomi Mi. 9 (cepheus) current version TWRP โ€” 3.7.0_12-0 You can download it from the official website, and it's installed via fastboot:

fastboot flash recovery twrp-3.7.0_12-0-cepheus.img


fastboot boot twrp-3.7.0_12-0-cepheus.img

After rebooting to TWRP, do not allow modification of the system partition (swipe to change firmware) - this can lead to a freeze on the logo.

  1. In TWRP, go to Wipe โ†’ Format Data.
  2. Enter yes to confirm (this will delete all data!).
  3. Reboot back to TWRP.

You can now use Magisk or other ZIP-If, after installation, TWRP phone does not load into the system, check the firmware version - on some assemblies MIUI 14 requires a patch to bypass the bootloader check.

What if TWRP doesnโ€™t see internal memory?
After installation TWRP internal memory is displayed as 0 MB, that means the data partition is encrypted: 1. Download. Disable_Dm-Verity_ForceEncrypt and sew ZIP through TWRP. 2. Re-execute Format Data in TWRP. 3. Reset. The memory should be visible.

Getting root rights through Magisk: a step-by-step process

Magisk is the most popular root rights tool without the SafetyNet trigger (which is important for banking apps and games to run).The latest stable version as of 2026 is Magisk v26.4. The Mi 9 will also require a patch to bypass Anti-Rollback if you upgraded through OTA.

Installation instructions:

  1. Download Magisk: Official ZIP-We're taking the file from GitHub. Don't use modified builds, they may contain malicious code.
  2. Move the file to your phoneโ€™s memory: connect the Mi 9 to your PC in MTP mode (via TWRP) and copy Magisk-v26.4.zip.
  3. Swipe through TWRP: In TWRP, click Install. Select Magisk-v26.4.zip. Swipe to confirm.

Reboot.

Reboot System

The first download after Magisk firmware can take up to 10 minutes. If the system has been hanging on the logo longer, try:

  • ๐Ÿ”„ Re-flash Magisk again through TWRP.
  • ๐Ÿ“ฑ Install Universal SafetyNet Fix to pass Google certification.
  • ๐Ÿ”ง Check the firmware version - on MIUI 14 may require a rollback to MIUI 13 before installing the root.

โš ๏ธ Attention: On Mi 9 newer-stitched MIUI 13.0.6 Magisk may not work because of the kernel lock, in which case you will have to cross-stitch the custom kernel (for example, Perseus Kernel) or use an alternative root method through fastboot with a patch. boot.img.

๐Ÿ’ก

If after installing Magisk, banking applications (Sberbank, Tinkoff) stop working, install the MagiskHide Props Config module and activate root hiding for specific applications in the Magisk settings.

Alternative methods of obtaining root rights

If Magisk is not suitable (for example, due to incompatibility with firmware), consider alternatives. Each method has pros and cons:

MethodPlusesConsDifficulty
SuperSUEasy installation, compatibility with old firmwareSafetyNet is not supported, outdated supportโญโญ
Patched boot.imgWorks without TWRP, minimal system changesRequires manual image patching, risk of errorsโญโญโญโญ
Brushing Firmware (LineageOS, Pixel Experience)Clean Android, regular updates, built-in rootLoss of function MIUI (for example, IR-blaster, possible bugsโญโญโญ
EDL Mode (Qualcomm 9008)Recovery after the "brick", firmware without unlockingThe risk of total data loss requires an authorized accountโญโญโญโญโญ

For the Mi 9, the most reliable alternative is to run a custom core firmware with pre-integrated root, such as Perseus Kernel or FrancoKernel, which supports cepheus and incorporates performance optimizations, and installs via TWRP after Magisk firmware.

If you have chosen patched boot.img, follow this instruction:

    ๐Ÿ’ก

    On Mi. 9 Android 11+ patchy boot.img It might not work because of the signature verification, and it requires firmware to run the full system image with the verification disabled (avb_disabled).

    Solving common errors and restoring the system

    Even if you follow the instructions accurately, Mi 9 can cause errors, and here are the most common problems and solutions:

    • ๐Ÿšจ Hanging on the logo MI: Reason: Magisk incompatible with the firmware version or damaged boot.img. Solution: to re-seal the original boot.img via fastboot, then repeat the Magisk installation.
    • ๐Ÿ”“ Error "This device is locked" after unlocking: Reason: Xiaomi server did not confirm unlock (for example, due to a change in the device's location) SIM-Solution: Wait 24 hours and repeat the process in the Mi Unlock Tool.
    • ๐Ÿ“ฑ Touch doesn't work. TWRP: Reason: Wrong version TWRP Solution: Download RedWolf Recovery, the alternative TWRP better-supported sensor.
    • ๐Ÿ”‹ Fast battery discharge after root: Reason: background activity of Magisk or modules Solution: disable unnecessary modules in Magisk Manager and check kernel settings via Kernel Adiutor.

    If the device has turned into a โ€œbrickโ€ (does not turn on, does not respond to buttons), try to recover using EDL Mode:

    1. Turn off the phone, press Volume up + Volume down and connect to the PC.
    2. Install the Qualcomm HS-USB QDLoader 9008 driver.
    3. Sweeve the full firmware image through the Mi Flash Tool (select clean all and lock for a full reset).

    โš ๏ธ Attention: Use EDL Mode on Mi 9 with a blocked bootloader requires an authorized Xiaomi account (usually provided by service centers). IMEI communication module.

    Risks and alternatives to root rights: is it worth it?

    Root access offers limitless possibilities, but has a downside. Here are the key risks for the Xiaomi Mi 9:

    • ๐Ÿšซ Loss of warranty: Xiaomi does not officially support devices with unlocked bootloader.
    • ๐Ÿ›ก๏ธ Security vulnerabilities: root gives applications access to system files, which increases the risk of viruses.
    • ๐Ÿ“ต Problems with OTA-updates: after the root updates "over the air" can break the system.
    • ๐ŸŽฎ Blocking in games: Google Play Protect and anticheats (for example, in the game) PUBG Mobile or Genshin Impact will be found.

    Before you get root, evaluate whether you can achieve the goal in alternative ways:

    • ๐Ÿ—‘๏ธ Removing embedded applications: Use ADB without root: adb shell pm uninstall -k --user 0 com.miui.analytics
    • โšก System Acceleration: Turn off animations in Developer Settings or use Greenify.
    • ๐Ÿ”’ Ad Blocking: Set Up Ads DNS-filter (e.g. 1.1.1.3 or dns.adguard.com).

    If you want a root exclusively for custom firmware, consider Xiaomi.EU โ€“ a modified MIUI with advanced settings, but without the need to unlock the bootloader (installed via TWRP).

    ๐Ÿ’ก

    On the Mi 9 with Android 12+, some Magisk features (like MagiskHide) are unstable. If you want SafetyNet for banking applications, youโ€™d better stay on Android 11 or use custom firmware with Google Pay certified.

    FAQ: Frequent questions about root on Xiaomi Mi 9

    Can I get root without unlocking the bootloader?
    No. On the Xiaomi Mi 9 (as on all modern Xiaomi smartphones), unlocking the bootloader is a must, and any โ€œcircumventโ€ methods (for example, through vulnerabilities) either do not work or lead to data loss.
    How to check if root is received?
    Install the Root Checker app from Google Play or execute the command in the terminal: su If a superuser rights request appears, the root is installed successfully.
    Why are banking applications not working after the root?
    Banks use SafetyNet to verify system integrity. Solutions: Install Universal SafetyNet Fix in Magisk. Enable MagiskHide for specific applications. Use alternative clients (e.g. Sberbank Online via browser).
    Can I get my official firmware back after the rue?
    Yes, but with nuances: Download the original firmware for the Mi 9 from xiaomifirmwareupdater.com. Sweat it through the Mi Flash Tool (select clean all). The bootloader will remain unlocked - you need to use the official Xiaomi service to block it. Attention: when you return to stock firmware, the data will be deleted!
    How to update MIUI after getting a root?
    OTA-Update through Settings โ†’ Update system will not work. Alternatives: Download full ZIP-File Files and Switch Through TWRP. Use it. OFOX Recovery โ€“ It supports installation OTA Reverse to the stock firmware, upgrade, then re-root.