How to Unlock the Root Rights to Xiaomi: The Complete Guide

Xiaomi’s current smartphones, which run MIUI or HyperOS shells, have the widest functionality out of the box. However, many advanced users face system limitations that prevent them from installing specialized software, deep customizing the interface, or removing undeletable system debris, and require access to a super-user level known as root rights.

Getting administrator rights on Xiaomi devices is not the easiest process, but it is quite real, with all the technical nuances. You will need not only the desire to modify the system, but also an understanding of the risks associated with loss of warranty and possible blocking of banking applications. In this article, we will discuss in detail each step from the official unlock of the bootloader to the final installation of Magisk.

Before you take action, you should realize that you are responsible for the health of the device. Any interference with the system partition /system can lead to the failure of the gadget if you act carelessly. However, proper preparation and availability of backups allow you to minimize the risks and successfully complete the procedure.

Preparation of the device and necessary tools

The foundation of a successful procedure is the quality preparation of the workplace and the smartphone itself. You can not just take the phone and start typing commands into the console without first adjusting the developer's settings. The first thing you need to do is activate the hidden menu by going to Settings β†’ About phone and quickly pressing 7-10 times on the MIUI version (or OS version).

Once the developer mode is activated, a new section will appear on the menu where you need to enable USB debugging, which is a critical parameter that allows your computer to send commands to your device via the ADB interface. You also need to allow the installation of applications from unknown sources if you plan to use third-party file managers or APK installers.

  • πŸ”‹ Charge your smartphone to a minimum 60-70%, Avoid turning off at a critical moment.
  • πŸ’Ύ Make a full backup of all important data to a cloud service or PC.
  • πŸ”Œ Use the original. USB-cable or quality analogue with data transmission support.
  • πŸ’» Install the drivers. ADB and Fastboot to your computer with Windows operating system.

The Mi Account must be tied to the device for at least 7 days (168 hours) to be officially unlocked. If the account is recently attached, the system will issue an error when you try to unlock, and you will have to wait for the timer to expire.

β˜‘οΈ Checklist for training for root rights

Done: 0 / 5

Official Unlock Bootloader (Unlock Bootloader)

The most difficult and important step is unlocking the bootloader. Without this step, obtaining root rights to Xiaomi is impossible, since the bootloader blocks the modification of the system partition. The process requires the use of the official Mi Unlock Tool, which can be downloaded from the MIUI site.

⚠️ Attention: The bootloader unlock procedure will completely remove all data from the smartphone's internal drive.The device will be reset to factory settings at the time of unlocking.

To get started, start the Mi Unlock utility on your computer and log in to your account. Then turn your smartphone into Fastboot mode, holding down the Volume Down + Power buttons at the same time when the device is off. Connect your phone with a cable to your PC and press the Unlock button in the program. If all the conditions are met, the unlock process will begin.

In some cases, the system may require a period of time (from 7 to 360 hours) before allowing unlocking, a device-theft-protection mechanism, which must be repeated after the timer has expired, and successful unlocking is confirmed by the appearance of the android-fixing hare icon on the device screen when booting.

What if Mi Unlock can’t see the phone?
If the utility does not respond to the connection, try installing drivers manually through the Device Manager or replacing them. USB-It also helps to reconnect to another cable. USB-port, preferably USB 2.0, and use of the original cable from the kit.

Installation of custom TWRP Recovery

Xiaomi’s standard Recovery menu doesn’t allow you to install modified files or patch system images. To obtain superuser rights, we’ll need a third-party recovery, and the best choice here is TWRP (Team Win Recovery Project), which supports file systems, creating full backups and installing zip archives.

Finding the right version of TWRP is a big challenge. You need to find an image (.img) that's designed specifically for your CPU and device model. Installing an inappropriate version can lead to a brick or a broken touchscreen in the recave menu. You should only download files from trusted sources, such as the official XDA Developers forum or Telegram developer channels.

The firmware process is carried out through Fastboot mode. After connecting the phone in this mode to the PC, open the command line in the folder with ADB tools and enter the command to download the image:

fastboot flash recovery twrp_image_name.img

An important nuance for Xiaomi owners: after the firmware TWRP can not immediately boot into the Android system. If you do, the stock recavator will overwrite TWRP, and all efforts will be in vain. Immediately after the firmware is finished, you need to go to the Recovery menu (volume Up + Power) and only from there download the system or patch files.

πŸ’‘

Use the command fastboot boot twrp_image_name.img temporary-launch TWRP without firmware to check the operability of the touchscreen and functionality before permanent installation.

Install Magisk and get Root rights

When TWRP is successfully installed and launched, the final step is to install the Magisk rights manager, a modern solution that is embedded in the boot.img and provides system access while remaining as undetectable as possible for the systemless root.

First, download the actual APK-Magisk file from the official GitHub repository. Rename the file extension from.apk to.zip (in some older versions) TWRP It was necessary, but modern versions are often able to put APK directly, but the method through zip remains universal. Download the file to the phone, go to the TWRP, Select Install and point the way to the archive.

Once you have confirmed the installation of the slider, you will start patching the partitions. When you have finished the process, click the Reboot System button. Once you download Android, you will see the Magisk icon. When you open the app, you will see the installation status; if everything has been successful, the version bar will say "Installed".

ComponentFunctionStatus of necessity
BootloaderLoader OSMust be unlocked.
TWRPRecovery environmentIt is necessary for installation
MagiskRoot rights managerI'll be sure.
ADB/FastbootDebugging toolsI need a PC.
πŸ“Š What is your main purpose of obtaining root rights?
Removal of advertising in the system
Installation of modified applications
Full data backup
Customization of the interface
Nuclear experiments

Magisk setup and hiding rights from banks

After successful installation, many users face a problem: banking apps, Google Pay (Wallet), and some games refuse to work, claiming that the device is compromised. This is because Magisk is open to detection scanners by default. To get around this, you need to activate the Zygisk feature and configure the exception list.

Open the Magisk settings and turn on the Zygisk switch. After the reboot, the menu will see "Set up DenyList." This list will include all applications that require no rights (banks, payment systems, anticheat games), which will hide the root rights and modified bootloader.

⚠️ Attention: Continuous updates to DenyList and Magisk modules are required after each update to Magisk or Android, and ignoring this rule will result in renewed locks on banking applications.

It is also recommended to install the Play Integrity Fix module (formerly known as MagiskHide Props Config) that helps emulate a certified device.This is especially true for newer versions of Android, where system integrity verification has become stricter.

πŸ’‘

Activation of Zygisk and proper configuration of DenyList are key conditions for the operation of banking applications on a rooted Xiaomi.

Possible problems and ways to solve them

The firmware modification process rarely goes perfectly smoothly for all users. The most common problem on Xiaomi is a cyclic reboot after installing a module or patch. If the phone is stuck on the logo, don't panic. Boot back to TWRP, go to Advanced β†’ File Manager, and remove the problem module folder from the /data/adb/modules directory.

Another common difficulty is losing a broadband module (IMEI, Wi-Fi, Bluetooth) after improper firmware. To avoid this, never format a persist or modem partition unless you are 100% sure of your actions. Before any experiments, back up these partitions via TWRP.

  • πŸ“± Bootloop: Removes modules through TWRP Adb wait-for-device reboot bootloader.
  • πŸ“Ά Missing. IMEI: Requires restoration of a backup copy of the persist partition or flashing of a stock image.
  • πŸ”’ bootloader blocked: Re-attempting to unlock via Mi Unlock from another account is impossible, binding is on the Internet ID device.

If nothing helps, the final argument remains – full firmware of the device through the program Mi Flash Tool in Clean All mode. This will return the phone to factory state, remove root rights and close the bootloader (if you do not choose the option unlock), but guaranteed to save the device from software failure.

How to save data when reflashing?
Unfortunately, Clean All removes all data, and the only way to save information is to backup photos and documents on a PC or cloud before starting the procedure.
Will the guarantee fly after obtaining root rights?
Formally, obtaining root rights and unlocking the bootloader are a violation of the warranty. However, if you can return the device to a stock state (close the bootloader and install the original firmware) before contacting the service, it will be difficult to visually determine the interference.
Can I get root without unlocking the bootloader?
On modern Xiaomi devices with Snapdragon and MediaTek processors, as well as on new versions of Android, obtaining root rights without unlocking the bootloader (Unlock Bootloader) is almost impossible. Methods using vulnerabilities ( exploits) are extremely rare, work on specific older versions of software and carry high risks.
Is it safe to use banking apps with Magisk?
When set up correctly (Zygisk enabled, DenyList configured, hideout module installed), banking applications are safe to use. However, the risks remain always: updates to banking applications may temporarily disrupt the concealment operation until you update Magisk configuration. Be prepared for the fact that sometimes the application may stop opening before your reaction.
What is A/B partitioning and how does it affect firmware?
Many new Xiaomi smartphones use the scheme A/B-It means that you have two sets of system partitions (slot A and slot B). TWRP Or Magisk, it's important to know which slot you're writing data to. TWRP automatically determines the active slot, but when manually interfering through fastboot, you need to be careful with partition suffixes ( a, b).
Do I need to re-unblock the bootloader after resetting?
No, the bootloader unlock status is stored in a secure memory area and is not reset when you reset your settings (Wipe Data) or flash the stock version of MIUI/HyperOS. However, if you completely drink the device through Mi Flash with the "Clean All and Lock" option, the bootloader will lock back and the procedure will have to be repeated.