How to get root rights to Xiaomi Mi 9: step-by-step instructions

Modern Xiaomi smartphones have powerful hardware, but software constraints often prevent them from realizing their full potential. Owners of the flagship Mi 9, running on the basis of the Snapdragon 855 processor, often seek super-user rights to remove system debris and fine-tuning. The root-rights procedure opens up access to the file system, allowing you to change parameters that are not available in standard mode.

However, before you start, you need to understand all the risks. Interfering with the system partition can lead to a loss of warranty or, in the worst case, turn the device into a β€œbrick.” Unlocking the bootloader on the Xiaomi Mi 9 automatically erases all data from the device, so creating a full backup is the first and mandatory step. Next, we will consider a detailed algorithm for safe modification of the system.

The process consists of several critical steps, skipping any of which can disrupt the work of the gadget. USB-cable and stable Internet connection, and it is also worth downloading all the necessary files in advance, so as not to search for them in a hurry during firmware.

Device preparation and data retention

Start by carefully preparing the software environment. Go to Settings β†’ About Phone and seven times click on the MIUI build number to activate Developer Mode. Then a new item will appear in the Advanced Settings menu where you need to enable USB debugging and bootloader unlocking.

It's important to link your Mi Account to your device via a mobile network, not Wi-Fi. This is a company security requirement that you can't get around with standard methods. Once tied, you'll have to wait 168 hours (7 days) until the server allows you to unlock, and it's officially impossible to speed up this process.

  • πŸ“± Create a full backup of contacts and photos to the cloud or PC.
  • πŸ”‹ Charge the smartphone battery to at least 70-80%.
  • πŸ’Ύ Download the drivers. ADB Fastboot for your operating system.
  • πŸ“₯ Download the image of recovery TWRP, specially adapted for the cepheus model.

⚠️ Note: If you miss the waiting stage of 7 days after the account is linked, the attempt to unlock through the Mi Unlock utility will end with an error with the code 4001.

πŸ“Š What is the version of Android on Xiaomi Mi 9?
Android 9 (Pie)
Android 10 (Q)
Android 11 (R)
The other one/I don't know/

Unlocking the Bootloader bootloader

After successfully waiting for a period of 168 hours, you can start unlocking. Turn off your smartphone and enter Fastboot mode, holding the power and volume buttons at the same time, and a characteristic image of a hare in a repair hat will appear on the screen.

Connect the device to your computer and start the Mi Unlock Tool. Log in to the same Mi Account that was previously linked. The utility will check the status of the device and, if all conditions are met, prompt you to unlock the bootloader. The process will take a few seconds, after which the phone will automatically restart and clear the data.

β˜‘οΈ Checking before unlocking

Done: 0 / 4

It is worth noting that once unlocked, some security features will stop working, including the fact that banks’ apps may refuse to launch, and Google Pay (now Google Wallet) will not be certified, and additional modules such as Magisk Hide or Zygisk will be required to circumvent these restrictions in the future.

Installation of custom TWRP Recovery

The standard recovery menu does not allow you to make changes to system files. To set the rights of a superuser, we will need Team Win Recovery Project. Find a file with the.img extension that corresponds to the codename cepheus. Do not use versions for other models, even if they come from the same manufacturer.

Put your smartphone back in Fastboot mode again. Open the command line on your computer in the folder with ADB-Enter a command to check the connection:

fastboot devices

If the serial number of the device appears in a line, you can stitch the Recovery.

fastboot flash recovery twrp-3.x.x-x-cepheus.img

An important nuance: immediately after the firmware is completed, you can not let the phone boot in normal mode, otherwise the standard Xiaomi system will overwrite TWRP with its recovery. You need to immediately press the power and volume buttons, holding them until the TWRP logo appears.

What happens if TWRP doesn’t start?
If you run your phone into a cyclical reboot or load into MIUI after you run it, you may not have time to intercept the button load. Repeat the firmware procedure and be careful with the button clamping timing. Also try using the TWRP version with the Android 10/11 patch if you have an updated firmware.

Magisk installation and obtaining Root

Now that we have access to the advanced recovery menu, you can install the License Manager. APK-Magisk file from the official GitHub repository. Rename the file extension from.apk to.zip, as older versions are TWRP It may require an archive to be installed.

In the TWRP menu, select Install and find the downloaded file. Confirm swipe right. It takes a few seconds. Once you're done successfully, press the Reboot System button. The first boot, the system can update longer than usual -- that's okay, it's optimized applications.

ComponentVersion/TypeAppointmentStatus
BootloaderUnlockedAllows modification of sectionsI'll be sure.
RecoveryTWRP 3.x+Software installation environmentI'll be sure.
MagiskStable (26.x+)Root rights managerBasic
BusyBoxBuilt-in.UNIX utility suiteAutomatically.

Once downloaded, look for the Magisk icon in the app menu. If it appears and displays the version when it opens, then root access is successfully obtained. You can check the rights by running any application requiring increased privileges, or through the terminal by the su command.

πŸ’‘

If the Magisk icon didn't appear after the reboot, you may not have seen the module. Try renaming the magisk.apk file to magisk.zip before installing it via TWRP, or using the "Install" function inside the Magisk app itself by selecting "Direct Install".

Set up root rights for applications

Many users face the problem of banking apps or games refusing to work on a rooted device. Xiaomi and Google are actively fighting modified systems.

Open Magisk settings and turn on Zygisk. This is the (new) version of code implementation that works more stable on newer versions of Android. Once turned on, you will need to reboot. It is also recommended to activate the Hide Magisk menu function, renaming the application so that it does not glow in the list of programs.

Next, you need to configure the exception list. In the DenyList menu, check all banking apps, Google Pay, and any services that clamor for super-user rights. Then, in the Android developer settings (the item appears after Zygisk is enabled), make sure that the desired applications do not tick β€œDo not use Zygisk”.

⚠️ Attention: Keeping exception lists updated is critical, and after each update to the banking app, it must be added to DenyList again, otherwise access to the account may be blocked.

Possible errors and methods of their solution

Software modifications rarely go perfectly smoothly for all users. The most common problem is a bootloop (cyclic reboot). If your phone is stuck on the Mi or Android logo, don't panic. Press the power and volume buttons to get back to TWRP.

In the recovery menu, try making Wipe Dalvik/Cache. Often this helps the system start with new rights. If the problem persists, it may be that the Magisk version is incompatible with your Android version, in which case you will have to do a full reset (Format Data) and start the installation again with clean firmware.

  • πŸ” Verification failed: means the system signature is not matched. requires a vbmeta patch or shutdown of fastboot verification.
  • πŸ“‰ Wi-Fi or communication is lost: it often occurs when you install a custom core that is incompatible with your modem version MIUI.
  • πŸ”‹ Fast battery discharge: check if some process is working in the background with root rights constantly.

Another common situation is the loss of a wide-angle camera or the inoperability of the fingerprint scanner, which suggests that the persist or modem partition was damaged when flashing. They can be restored only by having a full backup of these sections made before the experiments, or by reflashing the full dump of stock firmware through the EDL-regime.

πŸ’‘

The most common cause of root problems is that the Magisk version is incompatible with the Android version. Always use a stable channel, not a beta, unless you are an experienced developer.

Frequently Asked Questions (FAQ)

Will the warranty be reset after obtaining the root rights to the Xiaomi Mi 9?
Formally, unlocking the bootloader and obtaining root rights are a violation of the user agreement and lead to a loss of warranty. However, you can always return the device to its original state by blocking the bootloader and reflashing the official stock firmware through the Mi Flash Tool in Clean All mode. Visually, the service center may not notice any signs of interference if you do not conduct a deep diagnostics of the software part.
Will Google Pay (Wallet) work after Magisk is installed?
The default is no. SafetyNet (now the Play Integrity API) will show the bug. However, using the hide-out features in Magisk (Zygisk + DenyList) and sometimes the Play Integrity Fix module, you can successfully bypass these checks and pay for purchases with your phone. Banking apps also require customization of exceptions.
Can I update with OTA after I get root rights?
The standard over-the-air update (OTA) on a rooted phone most often results in installation errors or loss of root rights. It is recommended to disable automatic updates. If you want to upgrade to Android or MIUI, it is better to download the full firmware zip archive and install it manually through TWRP, while retaining the superuser rights (if the Magisk version supports a new version of Android).
Is it dangerous for the average user?
If you don’t understand why you need superuser rights, and you can’t use the command line or restore the device from the brick state, then it is better to refrain from this procedure. For normal use (social networks, messengers, photos) standard access rights are enough, and the risk of losing data or phone is too great.