How to Root on Xiaomi: A Complete Guide to Unlocking and Superuser Rights

Owning a Xiaomi device gives users a lot of power, but a standard MIUI or HyperOS shell often restricts access to system files. Many enthusiasts want to gain full control of the gadget to remove pre-installed software, overclock the processor or install custom modifications, which requires a procedure known as β€œrooting,” which gives the owner super-user rights.

The process of obtaining root privileges on modern smartphones is radically different from the methods of five years ago. If you used to have one program on a PC, today it is a multi-step process that requires attention and preparation. In this article, we will discuss the current methods relevant to models 2026-2026 release.

It is worth noting that interference in the system partition carries certain risks. Incorrect firmware of the modified bootloader can lead to loss of warranty or software errors. However, by following a clear sequence of actions and using proven tools like Magisk, you can safely expand the functionality of your device without losing stability.

Preparation of the device and necessary tools

Before you start modifying the software part, you need to assemble a full arsenal of tools. Without a high-quality cable and an installed driver, further manipulation is impossible. USB-driver ADB Fastboot and Fastboot, which can be found in Android SDK Platform Tools.

The second critical step is to create a full backup of the data. The process of unlocking the bootloader, which is a prerequisite for rooting, leads to the complete removal of all files from the internal drive.

  • πŸ”Œ Original. USB-cable or quality analogue with support for data transfer, not just charging.
  • πŸ’» Computer or laptop running Windows, macOS or Linux with Internet access.
  • πŸ“± Charge at least 60% to avoid turning off at critical time.
  • πŸ”“ Mi Account with a linked phone number that has been used on a smartphone for at least 7 days.

You also need to download specialized software. The official Mi Unlock Tool is often used to work with the bootloader, although experienced users can use the command line. Be sure to include USB debugging mode in the Developer menu, hiding which, you can tap seven times on the build number in the About Phone section.

⚠️ Note: Once the developer mode is enabled and the device is linked to the Mi Account, the system may require a wait of 168 hours (7 days) until the release is authorized.

Unlocking the bootloader (Bootloader)

The key step, without which the installation of superuser rights is impossible, is unlocking the bootloader. Bootloader is a program that runs to the operating system and checks the digital signature of the downloaded software. By default, Xiaomi blocks the download of unsigned images, which prevents the installation of custom recovery.

To start the procedure, you need to switch the smartphone to Fastboot mode. This is done by turning off the device and then pressing the volume button when you connect the cable to the PC. The screen will show an image of a hare in a hat-earch, repairing the android, which indicates a successful transition to the desired mode.

Then Mi Unlock starts. After you log in, click Unlock. If you haven't had enough time since you linked the device, the utility will report the error and tell you how long it's been, and if the time is up, the unlock process will begin, which will take from a few seconds to a couple of minutes.

β˜‘οΈ Checking before unlocking

Done: 0 / 4

It’s important to understand that when you unlock the bootloader, a warning will appear on the power screen that the device is not checked, which is normal behavior that can be ignored, and it’s also worth noting that some banking applications and services like Google Pay (now Google Wallet) may stop working as standard, requiring additional manipulation to hide root rights.

Installation of custom TWRP Recovery

The standard Recovery menu that the manufacturer installs is extremely limited in functionality and does not allow you to make changes to system partitions, and is replaced by TWRP (Team Win Recovery Project), the gold standard in the world of Android modification, and it is through TWRP that we will install the file with superuser rights.

The first thing you need to find an image of the recovery, adapted specifically for your model of the device. Using a file from another smartphone can lead to the "bricking" of the gadget. You should look for current builds on profile forums such as 4PDA or XDA Developers, paying attention to the Android version and the type of processor.

The firmware process is done via the command line. After connecting the smartphone in Fastboot mode, the command is entered in the terminal:

fastboot flash recovery twrp_image_name.img

However, on many modern Xiaomi devices with a partition A/B This command can be replaced by fastboot boot. twrp_image_name.img, It's going to run the Recovery temporarily, without memory, so that, right after you load it, you can start the Recovery. TWRP patch that prevents the return of the stock recapverie at the first reboot.

  • πŸ“₯ Download the image TWRP For your specific model (.img file).
  • πŸ’» Connect your phone in Fastboot mode to your computer.
  • ⌨️ Run a firmware or temporary start command through ADB.
  • πŸ”„ Right after the entrance to TWRP install a Disable Force Encryption patch or similar for your model.

⚠️ Attention: If after installation TWRP If you just reboot your phone as normal, the stock system can automatically rewrite the custom recaveri back to the factory.

Obtaining Super User Rights through Magisk

Magisk is now the leader in rooting, and unlike the old (SuperSU) methods, Magisk is systemless, which means it doesn't modifies the system partition directly, but loads its modules when it boots, allowing security checks and banking applications to be used.

First you will need the original firmware file (fastboot) ROM), It's the exact version you've got on your smartphone. boot.img (or init_boot.img for new Android models 13/14). This file is transferred to the phone and patched through the Magisk Manager app.

The algorithm of actions is as follows: install APK-Magisk file on your smartphone, open the app, click "Install" next to the Magisk version, and select "Select and Switch File." boot.img. After the process is completed, a file with a name like magisk_patched_[random].img.

What to do if there is no boot.img file?
On new Xiaomi devices with the introduction of virtual A/B-sectional boot.img file may be required init_boot.img. It also needs to be removed from the stock firmware. If you're not sure which image to patch, refer to your device's branch in the forum. 4PDA, where enthusiasts post direct links to the desired files.

The image you get patched up needs to be transferred back to your computer, and then, in Fastboot mode, you run it with the command:

fastboot flash boot magisk_patched.img

For partition devices init_boot The command will be similar, but with this section indicated. After successfully recording, restart the device. If the Magisk icon appears in the list of applications and the installed version is displayed when you open, congratulations, you have received superuser rights.

Comparison of Rooting Methods and Risks

The world of Android modification is constantly evolving, and the methods that were relevant yesterday may not be useful today. It is important to understand the differences between approaches to choose the best one for your situation. Below is a comparative table of the main characteristics of the various stages and methods of intervention in the system.

CharacteristicsUnlocked.Unlocked BLMagisk (Systemless)Old Methods (SuperSU)
Security of dataTall.Medium (reset risk)Tall.Low.
BankingWork.Requires settingsWorking (with cover-up)Often not working.
Opportunity for OTAYes.No (needs manual patch)No (needs manual patch)No.
DifficultyLow.MediumTall.Low (but outdated)

The main risk with Magisk is the ability to upgrade the system "over the air" (OTA). Trying to update the firmware on a rooted device without first returning to the drain boot often leads to a cyclic restart (bootloop).