How to Get Root Rights on Xiaomi: A Complete Guide to Unlocking bootloader and Installing Magisk

Getting root rights on Xiaomi smartphones opens up access to hidden Android features, allows you to remove system applications, optimize performance and install modified firmware. However, the process requires care: wrong actions can lead to a device lock or loss of warranty. In this article, we will discuss current ways to obtain root rights to Xiaomi in 2026, including unlocking the bootloader, installing Magisk and solving typical errors.

It is important to understand that Xiaomi has tightened security policy: since 2023, many models (such as the Redmi Note 12 or Xiaomi 13) require a mandatory binding Mi Account before unlocking.In addition, some devices based on HyperOS can block access to fastboot after unsuccessful attempts.

If you are a beginner, we recommend you to first familiarize yourself with the basics: what is a bootloader, why you need it. TWRP, Magisk is different from SuperSU. For power users, go straight to unlocking the bootloader or installing Magisk.

Preparing the phone for root rights

Before starting the process, several critical steps must be taken, and skipping any of them can result in a device blink (completely inoperable) or an inability to recover data.

First, check your Xiaomi model and firmware version. To do this, go to Settings. β†’ About the phone. Write down the data:

  • πŸ“± Device model (e.g. Redmi Note 11 Pro)+ 5G or POCO X5 Pro)
  • πŸ”’ Version. MIUI/HyperOS (for example, HyperOS 1.0.5.0)
  • πŸ”‘ Assembly number (e.g, TKQ1.221114.001)

This data will be needed to select the correct version. TWRP Magisk.

Second, back up all your important data. Root rights erase user settings and can damage files. Use Mi Cloud or third-party solutions like Swift Backup (requires you to use the same file). ADB). Note: Backups via Mi Cloud do not store data from some apps (such as WhatsApp or banking programs).

⚠️ Note: If your phone has Find My Device enabled, you need to turn it off before unlocking the bootloader, otherwise, after resetting, the phone may lock up with a password from the previous Mi Account.

Also make sure that:

  • πŸ”‹ Battery charge exceeds 60% (process can take up to 2 hours)
  • πŸ”Œ You have the original. USB-cable (cheap cables often cause errors in data transmission)
  • πŸ’» Drivers are installed on the PC ADB Fastboot (you can download from the official website of Xiaomi or through Minimal) ADB and Fastboot)
  • πŸ“₯ Download the latest versions of Mi Unlock Tool, Magisk and TWRP (See references in the relevant sections)
πŸ“Š What Xiaomi model do you use?
Redmi (Note, K-series)
POCO (F, X, M-series)
Xiaomi (11, 12, 13 series)
Black Shark
Another model

Unlock bootloader on Xiaomi

Unlocking the bootloader is a mandatory step before obtaining root rights. Xiaomi blocks the bootloader on all devices released after 2016.

Since 2023, Xiaomi has made it mandatory to link your Mi Account to your device before unlocking.Without this step, the Mi Unlock Tool tool will refuse to work, even if you previously unlocked the bootloader on that phone.

Instructions for unlocking:

  1. Link your Mi Account to your phone: πŸ“± Go to Settings. β†’ Xiaomi account πŸ”— Click "Access to your device" (confirmation may be required by SMS) ⏳ Wait 7 days (a mandatory requirement for new accounts) Older accounts (created before 2022) can unlock the bootloader immediately.
  2. Enable the Developer Mode and Debugging by USB: πŸ”§ Go to Settings. β†’ About the phone and 7 times click on "Version" MIUI" πŸ”“ Back to Settings β†’ Additionally. β†’ For developers πŸ”Œ Activate "Debugging by" USB" and β€œUnlocking” OEM"
  3. Connect your phone to your PC and start the Mi Unlock Tool: πŸ–₯️ Download the latest version of Mi Unlock Tool from the official website πŸ”— Sign in to the tool under the same Mi Account as on your phone πŸ“± Transfer the phone to fastboot mode (turn off, then pinch the power). + Loudness down) πŸ”“ Click Unlock and wait until it is completed (usually takes a lot of time). 1-3 minute)

⚠️ Note: If the Mi Unlock Tool shows a "Couldn't unlock" or "Device not supported" error, it may mean that your phone model does not support unlocking through the official tool, EDL), which we will consider below.

Linking your Mi Account to your device|Enable the developer mode|Activate debugging by USB unlock OEM|Download the Mi Unlock Tool for the latest version|Prepare original USB-cable-->

Unlocking errorReason.Decision
Couldn't verify deviceMi Account is not tied to the device or has not been 7 daysWait 7 days or use an old account (created before 2022)
Current account is different from the account info on the deviceDifferent accounts are used on the phone and in Mi Unlock Tool.Sign out of your phone account and log in again, then restart the Mi Unlock Tool
Device not supportedThe phone model does not support official unlockingUse alternative methods (EDL, exploit)
Mi Unlock Tool doesn't see the deviceDrivers not installed or cable is faultyInstall drivers manually through Device Manager or try another cable

Installation of custom recovery (TWRP)

After unlocking the bootloader, the next step is to install custom recovery, such as TWRP (Team Win Recovery Project is an alternative recovery environment that allows you to install modified firmware and obtain root rights.

It is important to choose the right version. TWRP Universal builds often don't work! Download recovery only from the official website twrp.me or verified sources (for example, XDA For popular Xiaomi models, there are separate discussion branches:

  • πŸ“± Redmi Note 12 Pro+: branch XDA
  • πŸ“± POCO X5 Pro: branch on XDA
  • πŸ“± Xiaomi 13: branch on XDA

Instructions for installing TWRP:

  1. Download the recovery image for your model (file with.img extension)
  2. Rename the file to twrp.img And put it in a folder with fastboot.
  3. Transfer the phone to fastboot mode (turn off, then pinch the power). + Loudness down)
  4. Connect your phone to your PC and execute the command: fastboot flash recovery twrp.img
  5. Launch it. TWRP: πŸ”§ Turn off the phone, then press the power. + Loudness up πŸ”“ If the phone is loaded into standard recovery, repeat the command fastboot boot. twrp.img

In some cases, after installation TWRP Xiaomi can overwrite custom to avoid this, immediately after the first download in the TWRP perform the following actions:

  1. Go to Advanced. β†’ Flash Current TWRP
  2. Confirm the swipe action
  3. Reboot back to the TWRP (off-the-shelf!)

πŸ’‘

After installation TWRP The phone doesn't boot into the system, try flashing the stock firmware through the Mi Flash Tool, and then repeat the process.

Install Magisk for root rights

Magisk is the most popular root-rights tool on modern Xiaomi devices. Unlike the outdated SuperSU, it supports Magisk Modules (modules for modifying the system without changing the system partition) and can hide root from banking applications.

The latest version of Magisk can be downloaded from the official repository on GitHub. For Xiaomi on HyperOS, it is recommended to use Magisk Delta (fork with additional features).

Installation instructions:

  1. Download Magisk (Magisk-v26.4.zip or newer)
  2. Move the archive to the phone’s internal memory or SD-map
  3. Boot in. TWRP (as described in the previous section)
  4. Click "Install" and select the downloaded Magisk archive
  5. Confirm the swipe installation and wait for completion
  6. Reboot to the system.

After the reboot, the Magisk Manager app will appear on the phone. Open it and make additional settings:

  • πŸ” Check root status in the "Superuser" section"
  • πŸ”„ Update Magisk to the latest version through the Updates section"
  • πŸ›‘οΈ Enable MagiskHide (or Zygisk in newer versions) to hide root from banking apps
  • πŸ“¦ Install modules (e.g. Universal SafetyNet Fix) to pass SafetyNet)
What to do if Magisk is not installed?
If you install Magisk, you have a file to mount error. /system" or "Invalid" ZIP file, it could mean: 1. Incompatibility of the Magisk version with your firmware (try Magisk Delta). 2. Damaged system partition (you need to reflash the stock firmware). 3. Incorrectly installed TWRP (In some cases, installing Magisk through a boot image patch helps: - Download stock boot.img Open your own firmware. - Open Magisk Manager β†’ Install β†’ Select and Patch a File. - Sweat the resulting file through fastboot: fastboot flash boot magisk_patched.img

⚠️ Note: On HyperOS devices (e.g. Xiaomi 14 or Redmi) K70) The standard Magisk installation method may not work due to the changed system partition structure, and in this case, you will need to use special patches or alternative recovery methods such as OrangeFox.

Alternative methods of obtaining root (EDL, exploit)

If the official unlock of the bootloader is not available (for example, on Xiaomi). 12T or POCO F5), You can use alternative methods. They're more risky, but sometimes they're the only way to get root.

EDL (Emergency Download Mode)

This is a service mode that allows you to flash the device directly through the Qualcomm port. HS-USB QDLoader 9008. For activation EDL need:

  • πŸ”§ Special cable (EDL cable) or circuit of the circuit board
  • πŸ’» Mi Flash Tool or QFil
  • πŸ“₯ Firmware in.mbn or.elf format

The process requires soldering skills or buying ready-made EDL-cable (nearly) 500-1000 Detailed instructions are available for 4PDA or XDA specific models.

Exploits (vulnerabilities)

Some Xiaomi models have vulnerabilities that allow you to get root without unlocking the bootloader.

  • 🐭 DirtyCow (works on older versions) MIUI)
  • πŸ”“ CVE-2022-20465 (vulnerability in the Linux kernel, patch released in 2023 year)
  • πŸ“± MTK-su (for devices running MediaTek processors)

Using exploits requires technical knowledge and often leads to unstable system operation, and we do not recommend this method for beginners.

πŸ’‘

Alternative methods (EDL, exploit) should only be used if official unlocking is not possible, they require in-depth knowledge and may cause the device to break down.

Typical problems and their solutions

Even if you follow the instructions accurately, you can get errors, and we've collected the most common problems and ways to solve them.

Problem.Possible causeDecision
The phone does not turn on after TWRP firmwareIncompatible recovery or damaged boot partitionSwitch stock firmware through the Mi Flash Tool in clean all mode
Magisk doesn't give root rightsInactive Magisk or Module ConflictReinstall Magisk, disable all modules in the settings
Banking applications are not workingSafetyNet not passed due to root detectionInstall Universal SafetyNet Fix and enable MagiskHide
Mi Unlock Tool shows '50%' and doesn't go any furtherXiaomi server overloaded or account newWait 24-48 and try again, and try again, VPN
After unlocking the bootloader, the phone asks for a password from the old Mi AccountFind My Device is activeReset your phone with the Mi Flash Tool with full formatting (clean all and lock)

If your problem is not described in the table, check the error logs in the TWRP Often, the solution can be found by a specific error code (e.g., Error 7 in the computer). TWRP usually means incompatibility of the firmware).

It is useful to use teams for diagnosis ADB:

adb logcat | grep -i error

This command will display all system errors in real time. Save the log and search the forums for a solution. 4PDA or XDA.

Safety and Risks in Getting Root Rights

Root rights give you complete control of the system, but they also open the door to potential threats, and here are the key risks and ways to minimize them:

1. Loss of guarantee

Xiaomi officially declares that unlocking the bootloader and getting root voids the warranty.

  • πŸ”§ If the phone fails due to the fault of the user (for example, after a failed firmware), repair will be paid.
  • πŸ› οΈ If the failure is not related to the software (e.g., a broken screen), the warranty may be maintained.
  • πŸ”„ Before contacting the service center, you can return the phone to its original state: Swipe stock firmware through the Mi Flash Tool Close the bootloader with the fastboot oem lock command

Security vulnerabilities

Root rights allow applications to access system files, which is dangerous if:

  • πŸ“± You install applications from unverified sources
  • πŸ”“ Use outdated versions of Magisk or modules
  • 🌐 Connect to unsecured Wi-Fi networks

Recommendations:

  • πŸ›‘οΈ Install AFWall+ for controlling network access of applications
  • πŸ” Regularly check for viruses through Malwarebytes
  • πŸ”„ Update Magisk and modules once in a while 1-2 month

3. System instability

Modified firmware and modules can cause:

  • 🐒 Slowdown of work (lags, friezes)
  • πŸ”‹ Increased battery consumption
  • πŸ“΅ Network problems (calls are not working, mobile Internet)

Decisions:

  • πŸ“Š Use BetterBatteryStats to monitor battery consumption
  • πŸ”§ Disable modules one by one to find the culprit.
  • πŸ”„ Return to stock firmware if instability is critical

πŸ’‘

Root rights are a powerful tool, but they require a responsible approach: always weigh the risks and benefits before modifying a system.

Frequently asked questions

Can I get root on Xiaomi without unlocking the bootloader?
On most modern Xiaomi devices (2019 and later), unlocking the bootloader is mandatory. Exceptions: Devices on MediaTek with vulnerabilities (for example, MTK-su) Older models (until 2016) with exploits in the kernel However, these methods are unreliable and can lead to unstable operation.
How to hide root from banking applications (Sberbank, Tinkoff, VTB)?
Use the combination: Enable Zygisk in Magisk Settings Install Universal SafetyNet Fix Add banking apps to DenyList (formerly MagiskHide) If the app is still Detect root, try: Delete application data and re-enter Use Shamiko module (alternative to MagiskHide)
What if the root phone does not turn on (brick) after receiving the root?
Recovery Methods: Soft-brick (phone vibrates but does not load): Load to the TWRP and run stock firmware or run the command fastboot flash boot stock_boot.img Hard-brick (phone does not respond to buttons): Use EDL-cable and Mi Flash Tool for full flashing Contact the service center (specify that the phone "does not turn on after the update") 90% In some cases, the phone can be restored, but soldering may be required (for example, to activate the phone). EDL).
How to return the phone to its original state (remove root and lock the bootloader)?
Full return to stock status: Download the latest fastboot firmware for your model from the Xiaomi Firmware Updater site Unpack the archive and launch the Mi Flash Tool Connect the phone in fastboot mode and select the clean all and lock option After the firmware bootloader will be blocked and root removed If you need to save data, Pre-repair a backup copy through TWRP.
Does this method work on Xiaomi with HyperOS?
Yes, but with reservations: πŸ”§ HyperOS uses a new partition structure, so a special version is required. TWRP (For example, for Xiaomi 14 or Redmi K70) πŸ”„ Some Magisk modules may not work (e.g, ViPER4Android) πŸ“± New devices (2026 You may need to adjust init.boot instead of boot.img We recommend that you follow the discussions on XDA for your model.