How to grant root rights to an application on Xiaomi: from unlock to Magisk

Getting root rights on Xiaomi smartphones is more complicated than most Android devices, due to the companyโ€™s closed policy of blocking the bootloader by default. However, for power users who need advanced features โ€” from removing system applications to fine-tuning performance โ€” unlocking the bootloader and installing Magisk remain the only legitimate way to gain full control of the device.

In this article, we will discuss the current ways to get root on Xiaomi in the future. 2026 The year, including official unlocking through the Mi Unlock Tool, bypassing restrictions on new models (e.g. Xiaomi) 14 or Redmi Note 13 Pro+), And also alternative methods for those who don't want to risk the guarantee. MIUI 14/15 Compatibility problems with banking applications after rooting.

Before you start, consider that the procedure requires technical preparation, errors in the unlock or firmware stage can lead to a "brick" (inoperability) of the device, and once you get root, you will lose the ability to update "over the air" (OTA) Some features like Mi Pay or Widevine L1 (viewable HD-content).

โš ๏ธ Attention: Starting with MIUI 13, Xiaomi tightened security policies. On new devices (released after 2022), unlocking the bootloader can result in the blocking of the Mi Account when trying to use informal firmware. โ†’ Xiaomi account โ†’ Delete the account.

1.Preparation of the device: what to do before unlocking

The first step is to check that your Xiaomi is compatible with the unlock procedure. Not all models support official unlocking via the Mi Unlock Tool. ROM) Often there are some limitations, and some models are POCO F5 or Redmi K60 Requires a wait of 168 hours (7 days) after the account is linked.

List of mandatory training:

  • ๐Ÿ“ฑ Make sure that the device has a global firmware installed (Global) ROM). Chinese versions (CN ROM) may not support unlocking for international accounts.
  • ๐Ÿ”‹ Charge the battery to at least 60%, interruption of the process due to discharge is fraught with damage to the boot partition.
  • ๐Ÿ” Create a backup of data through Settings โ†’ Additionally. โ†’ Backup and reset. Once unlocked, all data will be erased.
  • ๐Ÿ–ฅ๏ธ Prepare a PC with Windows 7/10/11 (on macOS/Linux Mi Unlock Tool doesn't work officially.Switch off antivirus - it can block Xiaomi drivers.

Also check the status of the loader:

  1. Turn off your smartphone.
  2. Press Volume Down + Power to enter Fastboot.
  3. Connect the device to the PC and type in the command line: fastboot oem device-info
  4. If you see Device unlocked: false in the answer, the bootloader is locked.

โš ๏ธ Attention: On devices with MIUI 15 and later, the fastboot oem device-info command can return the error. In this case, use the alternative command: fastboot getvar anti If the answer contains 3, the bootloader is unlocked; if 0 is blocked.

๐Ÿ“Š What kind of Xiaomi model do you have?
Redmi Note 12/13
POCO X5/F5
Xiaomi 13/14
Redmi K60/70
other

2. Official unlocking of the bootloader via Mi Unlock Tool

The only legal way to unlock a bootloader on Xiaomi is to use the Mi Unlock Tool, a process that involves three steps: linking the account to the device, waiting (if required), and unlocking it.

Step 1. Linking your Mi Account

  • ๐Ÿ“ฒ Turn on your smartphone to debug by USB (Settings โ†’ The phone. โ†’ Version. MIUI โ€” Tap 7 times, then go back to Settings โ†’ Additionally. โ†’ For developers โ†’ Debugging by USB).
  • ๐Ÿ”— Connect the device to the PC and confirm the debugging permission.
  • ๐Ÿ”‘ Sign in to Mi Account on your smartphone and PC (use one account!). Some models require confirmation via a phone. SMS.
  • ๐Ÿ”„ Reboot to Fastboot (Loudness Down) + Power) and connect to the PC.

Step 2: Installation of Mi Unlock Tool

Download the latest version of the utility from the official Xiaomi website (only for authorized accounts!). Install the program and drivers. Run Mi Unlock Tool on behalf of the administrator.

Step 3. Unlocking

In the utility, press Unlock. If you receive a message about the need to wait (for example, Wait 168 hours), turn off the device and wait for the specified time (usually 7 days).

Linked to the Mi Account to the device|Installed drivers Xiaomi on PC|Debugging is on. USB|Data backup made.|Battery charge >60%-->

3. Install Magisk for root rights

After unlocking the bootloader, you need to flash Magisk - a root rights management tool that replaces the outdated SuperSU. Magisk allows you to hide root from banking applications and supports modules to expand functionality.

Step 1: Download files

  • ๐Ÿ“„ Download the latest version of Magisk from GitHub (file) Magisk-v26.4.zip or newer).
  • ๐Ÿ“ฑ Download the original firmware for your model from the Xiaomi Firmware Updater website. It is important to choose the version that matches your current firmware (check in Settings). โ†’ The phone. โ†’ Version. MIUI).
  • ๐Ÿ–ฅ๏ธ Download Platform Tools (includes fastboot and adb) from Android.

Step. 2. Extraction boot.img

Unpack the downloaded firmware (.tgz or.zip format) and find the file boot.img. If it's not there, use it. payload_dumper extract payload.bin:

python payload_dumper.py payload.bin

Copy. boot.img on a smartphone and using Magisk (installed as APK) Choose Install โ†’ Select and Patch a File. After processing, you will receive a file. magisk_patched.img.

Step 3. Firmware through fastboot

Restart the device in Fastboot and stitch through the modified boot.img:

fastboot flash boot magisk_patched.img


fastboot reboot

After the reboot, check for root through the Magisk app or the command in the terminal:

su

If the # invitation appears, the root is installed successfully.

๐Ÿ’ก

If after firmware Magisk device fixated on the logo MI, Try to re-sweep the original boot.img back, and then repeat the process with the Magisk modules disabled.

4 Problems and Solutions: What to Do When Something Goes Wrong

Even with the correct following of the instructions, there may be failures. Let's look at the typical errors and how to fix them.

Mistake.Reason.Decision
Fastboot: unknown commandNo drivers or Platform Tools installedInstall drivers via Mi Flash Tool or manually through Device Manager
Anti-rollback check failTrying to flash the old version of MIUIUpdate to the latest version with the Mi Flash Tool
The device does not turn on after firmwareBoot or system partition damagedFlush the full firmware through fastboot flash all (erase data!)
Magisk doesnโ€™t hide root from banking appsMagiskHide not enabled or the app detects changesEnable MagiskHide in the settings and add the app to the Hiding List

If the device is not identified in the Mi Unlock Tool after unlocking the bootloader, try:

  • ๐Ÿ”Œ Use the other USB-cable (preferably original).
  • ๐Ÿ–ฅ๏ธ Reinstall drivers manually through Device Manager โ†’ Update the driver โ†’ Select by hand โ†’ Android Bootloader Interface.
  • ๐Ÿ”„ Reboot your PC and smartphone.
What to do if the Mi Unlock Tool shows "Couldn't unlock"
The problem is often with the mismatch between your firmware and your account, for example, if you have Global. ROM, But the account is tied to the Chinese region. Solution: 1. Change your account region to account.xiaomi.com (select "Global"). 2. Delete your account from your device and re-assign it. 3. Wait 24 hours and try again to unlock.

5. Alternative ways to get root without unlocking the bootloader

If official unlocking is not available (for example, on devices with MIUI China or corporate models, alternatives may be considered, but they have limitations and risks:

1. Temporary root through ADB

Some applications (e.g. Shizuku) allow partial access to system functions without full root.

  • ๐Ÿ“ฑ Install Shizuku from Google Play.
  • ๐Ÿ–ฅ๏ธ Connect the device to the PC and execute: adb shell sh /sdcard/Android/data/moe.shizuku.privileged.api/start.sh
  • โš™๏ธ In Shizuku settings, select the connection method ADB wireless.

This method does not give full root, but allows you to manage some system settings.

2. exploiting vulnerabilities (exploits)

For older devices (e.g. Redmi Note) 8 pro POCO X3) There are exploits like DirtyCow or CVE-2023-21085, They allow you to get root without unlocking it:

  • โš ๏ธ Most of the exploits are closed in new versions MIUI.
  • ๐Ÿ”’ The risk of damage to the system is higher than with official unlocking.
  • ๐Ÿ“ต After a reboot, root may disappear.

3. Custom firmware with pre-installed root

Firmware like LineageOS or Pixel Experience often includes root by default, but they still require an unlocked bootloader to install.

๐Ÿ’ก

Alternative methods are only suitable for power users and do not replace full root, but can disrupt Google services or cause data loss.

6 Risks and Consequences: What You Will Lose After Getting Root

Root rights are a lot of things, but they have a downside, and this is what's going to change after rooting.

1. Security.

  • ๐Ÿ›ก๏ธ Malware Vulnerability: Root-access applications can file system files, including the kernel.
  • ๐Ÿ”‘ Loss of encryption: on some devices, data is no longer encrypted after unlocking the bootloader.

Functionality

  • ๐Ÿฆ Banking applications (Sberbank, Tinkoff) can block work or require the removal of root.
  • ๐ŸŽฎ Google Pay or Netflix will no longer work as it does (Losing Widevine) L1).
  • ๐Ÿ“ก Certain functions MIUI (Second Space or App Lock may not work properly.

3. Warranty and updates

  • ๐Ÿ“„ Xiaomi cancels warranty if unlocked bootloader is detected.
  • ๐Ÿ”„ Updates by air" (OTA) You'll have to install firmware manually.

To minimize the risks:

  • ๐Ÿ”„ Update Magisk and modules regularly.
  • ๐Ÿ›ก๏ธ Use MagiskHide to hide root from banking apps.
  • ๐Ÿ“ฑ Install only verified modules from the Magisk repository.

โš ๏ธ Attention: On devices with MIUI 15 and later MagiskHide may not work with some banking applications due to new detection mechanisms, in which case you will have to abandon root or use a second device for financial transactions.

7 How to hide root from banking apps and games

The main problem after root is blocking banking applications and games (for example, Genshin Impact or the Internet). Pokรฉmon GO). Use a combination of methods to bypass protection:

1. MagiskHide (built into Magisk)

  • ๐Ÿ”ง Open Magisk, go to Settings โ†’ Turn on MagiskHide.
  • ๐Ÿ“ฑ Add problematic apps to the Hiding List (MagiskHide) โ†’ Select applications).
  • ๐Ÿ”„ Reset the device.

2. Modules for Magisk

Install the following modules (download as Magisk) ZIP-file):

  • ๐Ÿ›ก๏ธ Safetynet Fix โ€“ bypasses Google SafetyNet.
  • ๐Ÿฆ Universal SafetyNet Fix for new versions MIUI.
  • ๐ŸŽฎ Play Integrity Fix โ€“ Google Play Games Restores.

3. Change the fingerprint of the device (fingerprint)

Some apps check the firmware print to replace it:

  1. Install the MagiskHide Props Config module.
  2. At the terminal, perform: su props
  3. Select a print of a device with official firmware (for example, Google Pixel).

4.Use of the second user

Create a second user in Android settings (Settings) โ†’ System system โ†’ Multiple users) and use it for banking applications. Root will only be active in the main profile.

๐Ÿ’ก

If the banking app is still detects root, try disabling all Magisk modules, leaving only Safetynet Fix, and clear the application data.

8 How to remove root and return the device to its original state

If you decide to return your device to a stock state (for example, for sale or service), follow the following steps:

1.Magisk removal

  • ๐Ÿ“ฑ Open the Magisk app and select Uninstall โ†’ Complete Uninstall.
  • ๐Ÿ”„ The device will restart, but the bootloader will remain unlocked.

2. Original firmware boot.img

Download the original boot.img For your firmware and run it through fastboot:

fastboot flash boot boot.img


fastboot reboot

3. Complete reset via Mi Flash Tool

For a complete return to stock firmware:

  1. Download the Mi Flash Tool and the original firmware (.tgz) for your model.
  2. Unpack the firmware and launch the Mi Flash Tool.
  3. Connect your device in Fastboot mode and select Clean all and lock (erase data and block the bootloader!).
  4. Press Flash and wait until it is completed.

4. Checking the status of the loader

After the firmware, make sure the loader is locked:

fastboot oem device-info

It should be Device unlocked: false.

โš ๏ธ Note: If you are selling a device, be sure to lock the bootloader back.The buyer can cancel the deal by detecting an unlocked bootloader, even if the root is remote.

๐Ÿ’ก

You can only return the device to a fully stocked state through the Mi Flash Tool with the Clean all and lock option. Simply removing Magisk does not block the bootloader!

FAQ: Frequent questions about root on Xiaomi

โ“ Can I get root on Xiaomi without unlocking the bootloader?
On most modern devices (MIUI 12 and later) โ€” no. Alternative methods (exploits, Shizuku) give limited access and do not replace the full root. 4X or Mi A1), where to exploit the vulnerabilities of the kernel.
โ“ Why Mi Unlock Tool is a 168-hour watch"?
This is Xiaomiโ€™s standard limit for new accounts or devices, with waiting times ranging from 72 to 168 hours (3-7 days), you canโ€™t speed up the process โ€” even changing your account or firmware wonโ€™t help.
โ“ How to update MIUI after rooting?
Updates by air" (OTA) It's not going to be possible: ๐Ÿ“ฅ Download full firmware with Xiaomi Firmware Updater and stitch through TWRP or fastboot. ๐Ÿ”„ Use custom firmware (e.g. LineageOS) that is updated separately. ๐Ÿ”ง Before upgrading, remove Magisk, flash the stock firmware, and then re-install root. Important: When upgrading through fastboot, remember to stitch the modified one. boot.img Magisk, or the root will disappear.
โ“ Why Google Pay and Netflix stopped working after root?
These apps check system integrity through Google SafetyNet and Widevine: ๐Ÿ›ก๏ธ Install Safetynet Fix and Universal SafetyNet Fix in Magisk. ๐ŸŽฌ Netflix may need to change the deviceโ€™s fingerprint to a supported one (e.g., Pixel 5). ๐Ÿ’ณ Google Pay sometimes helps to disable all Magisk modules except Safetynet Fix, and if nothing works, you have to choose between root and these services.
โ“ Can I get root on Xiaomi with a MediaTek processor?
Yes, but the process is more complicated than on Qualcomm devices: ๐Ÿ”ง Unlocking the bootloader on MediaTek is often required SP Flash Tool instead of fastboot. ๐Ÿ“ก Not all MediaTek models support official unlocking via the Mi Unlock Tool (e.g. Redmi). 10A or POCO C40). ๐Ÿ› ๏ธ Magisk may need a modified firmware boot.img We recommend that you look for instructions specifically for your model on forums like XDA-Developers.