How to get Root rights to Xiaomi Mi 9: detailed instructions

The modern flagship Xiaomi Mi 9, based on the powerful Snapdragon 855 processor, even years after its release remains a popular device among enthusiasts. However, the standard shell MIUI, despite its functionality, often limits the capabilities of advanced users, hiding access to system files and fine kernel settings. It is in such situations that it becomes necessary to obtain Root rights that give full control of the Android operating system.

The procedure for obtaining administrator rights on this device is not a trivial task and requires a clear understanding of all the steps, from unlocking the bootloader to implementing specialized patches. Incorrect execution of instructions can lead to software errors or complete inoperability of the gadget, so before starting work you need to carefully study the theoretical part and prepare all the necessary tools. In this article, we will discuss each step in detail to minimize risks and successfully modify the software of your smartphone.

It’s worth noting that getting full access to the system is a process that will forever change the state of the software part of your phone: you will be able to uninstall system applications, install specialized modules and completely control power consumption, but in return you will lose the guarantee and access to some banking services.

Preparation of the device and necessary tools

Before you start taking action, you need to make sure that your device is fully ready for modification. USB-A cable that can transmit data, not just charge the battery, because an unstable connection can interrupt the critical firmware process. ADB Fastboot or the use of universal platform tools from Google.

The most important step in preparation is to create a full backup of all data, since unlocking the bootloader, which is a prerequisite for obtaining Root, will lead to the complete removal of all information from the internal storage. Synchronize contacts, photos and important documents with cloud services or copy them to an external medium to avoid irretrievable loss of personal information. After reset, it will be impossible to recover data without a backup.

You will also need to download the current firmware version for your model, which should exactly match the one installed on the smartphone at the moment. Version mismatch can lead to errors when patching the image, so carefully check the build number in the Settings β†’ About Phone. All necessary files, including the Mi Unlock utility and the archive with Magisk, should be placed in the root folder on the C disk for easy access through the command line.

β˜‘οΈ Preparation for modification

Done: 0 / 5

Make sure that your Mi Account is connected to your device and has device search and two-factor authorization enabled, as this may be required to confirm your actions during the unlocking process. A stable Internet connection on your PC is also critical to successfully validating Xiaomi servers.

Unlocking the Bootloader bootloader

Xiaomi has implemented strict security measures that prevent you from modifying the system partition without officially unlocking the bootloader. β†’ About phone and quickly press seven times on the item Version MIUI, until the activation notification appears, and then the menu β†’ New management points will be available for developers.

In the developer menu, look for the β€œMi Unlock Status” item and click β€œAdd Account and Device” to make sure the smartphone is connected to mobile internet, not Wi-Fi. This is a security requirement that is often overlooked, leading to anchor errors. Once successfully linked, you need to wait for a certain period of time, which is usually between 7 and 168 hours, during which the Xiaomi server checks the device for theft.

⚠️ Warning: Waiting for unlock cannot be accelerated or circumvented by legal means. Repeated attempt at binding will reset the waiting timer, so do the procedure correctly the first time.

After the waiting time, turn off your phone and enter Fastboot mode, holding the power and volume buttons at the same time. Connect the device to your computer and launch the Mi Unlock Tool utility by logging into the same account that was previously linked. Press the Unlock button and wait for the process to be completed, after which the phone automatically restarts and clears all data.

What to do if the timer is not going?
If the unlock timer is stuck or not running, try logging out of your Mi Account on your phone, turning off Wi-Fi and mobile internet, then logging back into your account via the Mi Unlock menu in the developer settings, sometimes cleaning up the Security and Settings app data before re-assigning.

Installation of custom TWRP Recovery

Once successfully unlocked, the standard recovery mode will not allow the superuser to be set, so a modified recapvere, such as a recap, is required. TWRP. Download the recovery image specifically for the Xiaomi Mi 9 model (codename cepheus), as using files from other devices will lead to a system brick. ADB on your computer.

Put your smartphone into Fastboot mode and connect it to your PC, then open the command line in the tool folder and type a command to check the connection. Make sure that when you request fastboot devices, you see your device's serial number. If the device is displayed, you can move to the temporary loading of the image of the Recovery with the fastboot boot command. twrp_image_name.img.

It is important to note that after the first download to TWRP, the system may suggest selecting a partition modification mode, and here you need to be extremely careful. For the Xiaomi Mi 9, it is critically important not to format the Data partition into F2FS format if you plan to use encryption, otherwise access to the data will be lost.

Fastboot TeamDescription of actionRisk of error
fastboot devicesChecking the device connectionLow.
fastboot boot image.imgTemporary loading of the recaveriMedium.
fastboot flash recovery image.imgPermanent recavery firmwareHigh-pitched
fastboot rebootRebooting the deviceLow.

If you plan to use it TWRP constantly, after the first boot in recovery mode, execute the command fastboot flash recovery twrp_image_name.img, While the phone is in Fastboot mode, however, it is often enough to temporarily download the Root rights, which is a safer method to keep the regular Recovery in case you need to return to the drain state.

πŸ“Š What method of installation TWRP you prefer?
Through Fastboot (PC)
Through the app (no PC)
Automatic installation
I don't use TWRP.

Magisk installation to get a Root

The current standard for superuser rights is the use of the Magisk manager, which is embedded in the systemless method without directly changing the system partition, which hides the fact that Root is from banking applications and Google Pay services. First, download the current one. APK-Magisk file and rename it to.zip if you plan to install it over the recap, or simply install it. APK, If you use the image patching method.

The most reliable way for Xiaomi Mi 9 is a patching of the image boot.img from stock firmware. Copy the file. boot.img From the unpacked firmware to the phone’s memory, launch the Magisk app and select β€œInstallation" β†’ "Select and patch a file. Once the process is complete, a file with a name like, magisk_patched_[random].img that must be copied back to the computer.

Return the phone to Fastboot mode and run the patched image with the fastboot flash boot command magisk_patched.img. This command will replace the standard boot image with a modified one containing Magisk scripts. After the reboot, the Magisk app will appear in the system, which will confirm the successful installation of superuser rights and display the version.

⚠️ Note: When you are running a patchy image boot.img Make sure the kernel version in the image matches the installed system version exactly. Using an image from another firmware version will result in a cyclic reboot).

In some cases, additional configurations may be required within the Magisk app itself, such as enabling Zygisk to run certain modules. Magisk settings allow for flexible configuration of the environment, including randomizing the device ID and hiding the application itself from the installed program list.

πŸ’‘

Save the original boot.img from your firmware version in a safe place and you will need it to return to stock in case of a failed modification or before contacting the service center.

Setup and Hiding Root Rights

Once a superuser has been successfully installed, the user is challenged to hide their rights from applications that can block the work of modifications. In Magisk, activate Zygisk and Enforce DenyList, adding banking applications, Google Pay and other services that require environmental integrity to the exclusion list, creating an isolated space where applications will see the clean system.

For more advanced concealment, you can use the MagiskHide Props Config module, which allows you to change system properties and security certificates. However, it is worth remembering that fighting the Root detector is a constant arms race, and methods may stop working after application updates. Regularly update Magisk itself and its modules to keep the methods of bypassing up to date.

It is also recommended to remove the standard Xiaomi security application or limit its rights, as it may conflict with the work of Magisk and incorrectly display the security status of the device. Xiaomi Mi 9 owners often face false positives of MIUI antivirus on modification files, so adding exceptions to the standard antivirus is a must.

πŸ’‘

Hiding Root rights requires a comprehensive approach: it’s not enough to simply install Magisk, you need to configure DenyList correctly, and possibly use additional modules to bypass complex checks.

Possible problems and solutions

There can be various technical difficulties in the process of modifying the device, the most common of which is getting into the bootloop, when the phone is endlessly restarted. If this happened immediately after the image is firmware, try booting into Recovery mode and making a data vape, or returning the original image boot.img via Fastboot. You should not panic, since with the bootloader unlocked, the device can almost always be restored by software methods.

Another common problem is a broken fingerprint scanner or camera after receiving Root, which is associated with a violation of the integrity of system partitions or driver conflict. In such cases, reinstalling stock firmware through the Mi Flash Tool in Clean All mode helps, which will completely return the device to factory status. Before each manipulation of system files, check the developer forums for specific bugs for your version of Android.

  • πŸ“± Bootloop: The Return of the Original boot.img via Fastboot or reset via TWRP.
  • πŸ”’ Application Lock: Setup DenyList in Magisk and Use of Hidden Modules.
  • πŸ“‰ Performance drop: Disabling unused modules and cleaning the cache Dalvik/ART.
  • πŸ“‘ Problems with VoLTE/VoWiFi: Compatibility check of the firmware region and the modified core.

Do not ignore the error messages when installing modules, as incompatibility of the code can lead to unstable operation of the radio module or sensors. If you notice that the phone has started to discharge quickly or heat up without visible load, check the Magisk logs and remove the newly installed tweaks.

What will happen to the warranty after receiving Root?
Getting Root rights and unlocking the bootloader officially voids the manufacturer's warranty for the software. In the event of a hardware breakdown, the service center may refuse repairs if it finds traces of software interference, although it is not always possible to physically determine the modification of the bootloader without special analysis.
Can I upgrade to OTA with Root rights?
A standard OTA (air) update on a modified device usually does not install or results in the loss of Root rights and the restoration of the stock bootloader. To update the system, you need to manually download full firmware images, save a copy of boot.img before installation, update, and then patch and stitch the boot partition again.
How to remove Root completely and get it back to normal?
To completely remove the superuser rights and return to factory state, you need to download the stock firmware for your model and region, unpack it and flash the boot and recovery sections with original files through Fastboot. It is also recommended to execute the command fastboot oem lock to re-lock the bootloader, but only after a complete data reset and checking the stock system.
Is it safe to use banking apps with Magisk?
Banking applications are possible, but not 100% guaranteed. Despite Magisk's hidden features, banking applications are constantly improving detection methods using environmental checks, debuggers and system integrity. For critical financial transactions, it is recommended to use a separate, unmodified device or be prepared for temporary application failure.