Xiaomi’s current smartphones have powerful hardware and functional shells like MIUI or HyperOS, but standard features often limit advanced users. Obtaining superuser rights opens up hidden sections of the file system, allowing you to remove system debris, overclock the processor, and install specialized modules. This is a fundamental change in the level of access to the Android operating system.
The procedure requires carefulness and careful follow-up to the algorithm, because incorrect actions can lead to software failures, you will go through unlocking the bootloader, installing a custom recovery and final firmware patch image, we will analyze each step in detail to minimize risks and ensure a successful result.
It is worth considering that after modifying the system files, the manufacturer’s warranty may be lost, and some banking applications will cease to work without additional security settings. However, the ability to fully control the device is worth it for enthusiasts. Below is the current methodology for most models of the brand.
Preparation of the device and necessary tools
Before any manipulations begin, it is critical to create a full backup of data, since the process of unlocking the bootloader will inevitably entail a complete reset of the smartphone to the factory settings. Save contacts, photos and documents to the cloud storage or external drive. Without this step, the risk of losing important information becomes one hundred percent.
You will need quality. USB-cable, preferably original, and Windows computer with drivers installed ADB You also need to download the Mi Unlock Tool from the official website and register a Mi Account account, which must be linked to the device for at least 7 days (168 hours) for new models.
⚠️ Warning: Make sure your smartphone battery is at least 60% so that the device doesn’t turn off at the critical moment of flashing the bootloader.
The work will also require recovery image files (such as OrangeFox or TWRP) and an archive with Magisk, which we will use to obtain superuser rights.All files must be downloaded from trusted sources such as the 4PDA forum or XDA Developers to avoid malicious code being introduced.
- 📱 Xiaomi, Redmi or Poco smartphone with less than 40% battery drain (for safety, it is better to charge).
- 💻 Computer or laptop with Windows 10/11 and a stable Internet connection.
- 🔌 Original or certified USB-data-line.
- 📂 Installed drivers ADB/Fastboot The Mi Unlock Tool program.
Unlocking the Bootloader bootloader
The first and mandatory step is to unlock the bootloader, which by default blocks changes to the system partition. To do this, activate the developer mode by clicking on the build number several times in the About Phone menu. Then, in the advanced settings, enable "Debugging by USB" and "Unlocking the bootloader."
Once these features are enabled, you need to link the device to your Mi Account via mobile Internet (Wi-Fi must be disabled at the time of binding). The bootloader unlock menu will show an anchor status. If the status is "Successful", you can go to the computer, if not, wait for the specified time or check the connection to the network.
Launch the Mi Unlock Tool on your PC, log in to your account and put your smartphone into Fastboot mode, holding both the power and volume buttons. Connect the cable and press the Unlock button in the program. The process can take anywhere from minutes to an hour, after which the device will restart and clear all data.
fastboot oem unlockThis command is analogous to what the utility's GUI does, but using Xiaomi's official software is more reliable for beginners. Once successfully unlocked, an open padlock icon or the words Unlocked will appear on the boot screen. Now the path to modifying the system is open.
💡
Without an unlocked bootloader, installing custom recovery and obtaining root rights are technically impossible on modern Xiaomi devices.
Installation of custom Recovery (TWRP)
Standard recovery MIUI Recovery has limited functionality and does not allow you to install unsigned images, so it must be replaced with custom, for example, TWRP or OrangeFox. Download the image file (.img), corresponding to your smartphone model, as there are no universal versions.
Put your smartphone into Fastboot mode and connect it to your computer. Open the command line in the ADB tool folder and type a command to run the recovery firmware. It's important to keep the device from rebooting immediately after you've run the firmware, otherwise the standard bootloader will replace the custom recovery back with the stock one.
fastboot flash recovery twrp_image_name.imgImmediately after you execute the command, press the combination of power buttons and increase the volume to force you to enter the TWRP just installed. If you see a menu with the Install, Wipe and Backup buttons, then the stage is successfully completed. The interface may be in English, but it is intuitive.
- 🔍 Find the exact model of your device (codename, for example, guacamole).
- ⬇️ Download the current assembly TWRP Or OrangeFox for your model.
- 💻 Connect your phone in Fastboot mode and run the image through the PC.
- 🚫 Don’t download to Android right away, sign in to Recovery with buttons.
What to do if TWRP asks for a password?
Magisk firmware to obtain Root rights
The current standard for obtaining superuser rights is Magisk, which works on the principle of a system fileless patch without directly changing the /system partition, which allows you to hide the presence of root rights from banking applications and games, which was impossible with old methods like SuperSU.
There are two main ways to install it. One is through TWRP itself: copy the Magisk.zip or.tar installation archive to your phone, select Install and specify the path to the file. The second, more versatile for devices with A/B partitions, involves patching the bootable image of the stock firmware.
If you choose the patching method, download the full firmware for your model, extract the file. boot.img And you can flip it to your smartphone. In the Magisk app, select "Install» → «Select and patch the file, specify boot.img. After completion, a file will appear in the Download folder magisk_patched.img.
⚠️ Note: Using outdated versions of Magisk can lead to a cyclic bootloop.Always use a stable version from the official GitHub repository.
The resulting patched image must be returned to the computer and flashed through Fastboot by the fastboot flash boot command. magisk_patched.img. After this procedure and reboot, the Magisk application will appear in the system, confirming the existence of superuser rights.
Comparison of Privileges
The table below compares different approaches to modifying the system so you can choose the one that is most suitable for your purposes. Each method has its advantages and disadvantages depending on the device model and Android version.
| Method | Difficulty | Security | Hiding from banks |
|---|---|---|---|
| Magisk (Patch Boot) | Tall. | Tall. | Yes (via Zygisk) |
| Magisk (Install in TWRP) | Medium | Medium | Yes (requires settings) |
| KernelSU | Very high. | Very high. | Yeah (core level) |
| Old Methods (SuperSU) | Low. | Low. | No. |
The most recommended option at the moment is to use Magisk with the Zygisk module enabled and set up the exception list, which provides a balance between functionality and the ability to use everyday applications.
💡
After installing Magisk, turn on the “Zygisk” and “Enforce DenyList” apps in your settings, then select the banking apps in the DenyList list for their correct operation.
Possible problems and solutions
In the process of system modification, users often face a number of typical problems, such as a cyclical reboot or module failure. If the smartphone goes to bootloop, you need to boot into TWRP and clean the Dalvik / ART Cache cache, as well as delete the newly installed modules through the file manager or terminal.
Another common problem is the broken (fingerprint scanner) or camera after installing a patched image, which indicates that boot.img was not taken from the firmware version installed on the device, in which case you need to reflash the stock boot.img and repeat the patching procedure with the correct file.
- 🔄 Bootloop: Get in there TWRP Remove the Magisk problem modules.
- 📷 The camera is not working: check the version boot.img firmware.
- 🔒 bootloader not unlocked: check Mi Account status and binding time.
- 📉 Battery Sits Down: Disable Unnecessary Modules or Use Energy-Saving Cores.
It is important to always have stock firmware on hand for your model, so that in the event of a critical failure, the device is returned to its original state via Emergency Download (EDL) or Fastboot mode. This is the only way to restore operability in case of serious partition markup errors.