How to root on Xiaomi: unlock, firmware and install 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. MIUI In 2026, successful rooting requires not only unlocking the bootloader, but also competently bypassing new protections such as Anti-Rollback and firmware signature verification.

This article covers current methods of getting root on Xiaomi, Redmi and other devices. POCO β€” from old models MIUI 12 to the latest flagships with HyperOS. We will discuss the official method of unlocking through the Mi Unlock Tool, alternative methods for blocked regions (for example, Russia), as well as solutions to typical errors like Couldn't unlock or Device not connected. How to minimize the risks of a breeze (turning your phone into a brick) and protect your data before the procedure.

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

Before you start unlocking the bootloader, you need to follow a number of critical steps, and neglecting them can lead to data loss, blocking the Mi Account account, or even permanent damage to the firmware.

First, check the status of your Xiaomi account. Make sure that:

  • πŸ“± Account is linked to the device (go to Settings) β†’ Xiaomi account and log in).
  • πŸ”“ Two-factor authentication is disabled on the account (temporarily).
  • 🌍 The region of the account is the same as the region of the device (for example, if the phone is purchased in China and the account is registered in Russia, problems may arise).

Second, backup. Unlocking the bootloader will reset the phone to factory settings.

  • πŸ“ Built-in backup MIUI (Settings β†’ The phone. β†’ Backup).
  • πŸ–₯️ Mi PC Suite to create a backup on your computer.
  • ☁️ Cloud services (Google Drive, Mi Cloud) for synchronizing contacts and photos.

πŸ’‘

If your device is on HyperOS, standard backup may not save the settings of some system applications. ADB backup for full backup:

adb backup -apk -obb -shared -all -f backup.ab

Finally, check the firmware version and compatibility with unlock tools:

Model of the deviceMinimum version MIUI/HyperOSSupport for Mi Unlock ToolAlternative methods
Xiaomi 13/14 seriesHyperOS 1.0+Yeah (with account binding)Fastboot scripts, EDL
Redmi Note 12/13MIUI 14 / HyperOSYes (restrictions for Russia)Telegram bots, patches through TWRP
POCO F5/X5MIUI 13+Yes.Custom ROM unlockless
Xiaomi Pad 6HyperOS 1.0No (required) EDL)Paid services, author firmware

⚠️ Note: If your device was purchased in China (suffix version) CN), You may need a Chinese phone number and a WeChat account to unlock, in which case you may use intermediary services or alternative methods such as: EDL (emergency).

2 Unlock the bootloader through the Mi Unlock Tool

The official way to unlock a bootloader on Xiaomi is to use the Mi Unlock Tool utility, but since 2023, the process has become more complicated due to new restrictions. Consider the current algorithm for 2026.

Step 1. Linking the device to the account

  1. Go to Settings β†’ About Phone and 7 times click on the MIUI version to activate Developer Mode.
  2. Back to Settings β†’ Additionally. β†’ For developers and include: πŸ”§ Debugging by USB πŸ”“ Unlocking OEM (It may not be available on new models) πŸ“± Linking the account to the device (required!)

Connect the phone to the PC and confirm the debugging permission.

Step 2: Installation of Mi Unlock Tool

  • πŸ–₯️ Download the latest version of the utility from the official website (to bypass regional locks use it). VPN with servers in Hong Kong or Singapore).
  • πŸ“¦ Unpack the archive and launch it. miflash_unlock.exe on behalf of the administrator.
  • πŸ”‘ Sign in with the same Xiaomi account as you do on your phone.

Step 3. Unlocking

  1. Turn off the phone and press Volume Down + Power to log into the Fastboot.
  2. Connect the device to the PC and in the utility press Unlock.
  3. Wait until the process is completed (usually) 5-10 The phone will reboot with reset settings.

Link Xiaomi account to device|Enable debugging on USB|Install the drivers ADB/Fastboot|Download the Mi Unlock Tool for the latest version|Disable antivirus on PC-->

⚠️ Note: If the utility is in error, Cann't unlock (10008), It means your account is not tied to the device. 72 To bypass the Telegram bots, use the Telegram bots like @MiUnlockStatusBot.

πŸ“Š What Unlocking Method You Used?
Official Mi Unlock Tool Officially
Alternative scripts
EDL mode
Paid services
I haven't tried it yet.

3. Alternative Unlocking Methods (if Mi Unlock does not work)

In some cases, the official Mi Unlock Tool may not work, such as for devices purchased in Russia after 2023 or HyperOS models where unlocking is locked at the firmware level, and alternative methods will help in such situations.

Method 1: Fastboot scripts (for the MIUI 12-14)

This method is suitable for devices where unlocking through Mi Unlock gives a 72-hour latency error or Device not connected.

fastboot oem unlock-go


fastboot flashing unlock




fastboot oem unlock




fastboot reboot

Scripts run through cmd in a folder with platform-tools. for some models (for example, Redmi Note). 11) You need to pre-shoot the patch boot.img.

Method 2: EDL-mode (emergency firmware)

EDL (Emergency Download Mode is a device recovery mode that allows you to flash any files, including custom firmware, without unlocking the bootloader. However, the method is risky: wrong actions can lead to hard-brick (irreparable damage).

  • πŸ”Œ Put the phone in. EDL (Hold the volume up + Loudness down + USB-plug-in).
  • πŸ–₯️ Use the Mi Flash Tool or QFil to Firmware Patch.
  • ⚠️ For new models (Xiaomi 14, Redmi) K70) Authorized EDL-Account (can be purchased from trusted sellers).
List of devices with locks EDL
Xiaomi 13T/13T Pro, Redmi Note 12 Turbo, POCO F5 Pro, Xiaomi Pad 6S Pro. For these models EDL-The mode requires a special key from Xiaomi, which is issued only to authorized service centers.

Method 3: Telegram bots and paid services

If independent methods do not work, you can use the services of intermediaries:

  • πŸ€– Bots, sort of. @XiaomiUnlockBot or @HyperOSUnlockBot β€” Automate unlocking for a nominal fee (from the 50 before 300 ruble).
  • πŸ’° Paid services (for example, UnlockJunky, DC-Unlocker) - guarantee unlocking even for new models, but are more expensive (from 1000 rubles).

Installation of custom recaveri (TWRP) Getting root through Magisk

After unlocking the bootloader, the next step is to install a custom Recovery (TWRP) And getting root rights through Magisk, which is different for devices on the Internet. MIUI hyperos.

Step 1: Installation of TWRP

For most Xiaomi devices, there are unofficial builds TWRP. Download the appropriate version for your model from twrp.me or forum XDA Developers.

fastboot flash recovery twrp-3.7.0_12-0-redmi_note_12.img


fastboot reboot recovery

If, after the reboot, TWRP It does not start, and the phone is loaded into a standard Recovery, please disable_forceencrypt.zip through ADB sideload.

Step 2: Magisk firmware

  1. Download the latest Magisk.apk from GitHub and rename it to Magisk.zip.
  2. Move the file to your phone or flash drive.
  3. V TWRP Choose Install β†’ Magisk.zip and confirm the firmware.
  4. Reset the device.

Step 3: Checking root rights

After the reboot, install Magisk Manager (or use the built-in module in Magisk on newer versions) and check root status:

  • πŸ“± Open the Magisk app and make sure all modules are installed.
  • πŸ” Launch the terminal and enter su – if a permission request appears, root works.

πŸ’‘

On HyperOS devices, the standard Magisk may not work due to new security mechanisms. Use modified versions like Magisk Delta or KernelSU.

⚠️ Note: On some models (Xiaomi 13 Ultra, Redmi) K60 Pro) after installation of Magisk stops working Widevine L1 (descend L3), What is the impact of streaming on Netflix and Disney?+. Use the Universal SafetyNet Fix module to recover.

5. Solving Typical Problems After Rooting

Even when root rights are successfully installed, users often face bugs and limitations, and let's look at the most common problems and their solutions.

Problem 1: The phone doesn't pass SafetyNet

Many banking applications (SberBank, Tinkoff) and games (PokΓ©mon GO) require a successful SafetyNet test if the test fails:

  • πŸ”§ Install Universal SafetyNet Fix in Magisk.
  • πŸ”„ Hide root with MagiskHide (new versions – DenyList).
  • πŸ“± HyperOS may require additional HyperOS SafetyNet Patch patch.

Problem 2: It doesn't work. OTA-update

After rooting, standard air updates are no longer installed.

  • πŸ”„ Manually download firmware with Xiaomi Firmware Updater and sew through TWRP.
  • πŸ“¦ Use OrangeFox Recovery – it supports the OTA custom-fix.
  • ⚠️ Before updating, always make a backup through TWRP, As the firmware can be wiped root.

Problem 3: The device overheats or discharges quickly

A common cause is incorrectly installed Magisk modules or conflicting cores.

  • πŸ”₯ Disable all modules in Magisk and turn on one at a time to find the culprit.
  • πŸ”‹ Install BetterBatteryStats to monitor charge flow.
  • πŸ› οΈ For HyperOS can help firmware custom core (for example, Perseus for Xiaomi) 12T).

6. Root Alternatives: What You Can Do Without Unblocking

If unlocking the bootloader seems too risky, consider alternative ways to extend Xiaomi’s root-free capabilities.

1. ADB-commands

Many settings MIUI/HyperOS hidden but accessible through ADB. Examples:

adb shell settings put global hidden_api_policy 1 # Unlock hidden API


adb shell pm grant com.android.vending android.permission.INSTALL_PACKAGES # Installation permission APK from Google Play




adb shell settings put global captive_portal_detection_enabled 0 # Disable Internet connection check

2. LSPosed modules (without root)

LSPosed is a framework for modifying system applications without root. Install it through ADB:

adb install lsposed-zipalign-1.8.6.apk


adb install lsposed-manager-1.8.6.apk

Popular modules:

  • 🎨 MIUIBlurs – adds blur in the interface.
  • πŸ”’ HideMyApplist – Hiding applications from system scanners.
  • πŸ“± XiaomiEUizer – porting the functions of Xiaomi.EU ROM stock-stack.

3. Castom launchers and themes

Without root, you can radically change the appearance of the system:

  • πŸ–ΌοΈ Nova Launcher + KWGT desktop-based.
  • 🎭 Hex Installer for Substratum Themes (works on the MIUI 14+).
  • πŸ”§ Tasker: Automating Actions Without Root.

7 Security after root: how not to lose data

Root access gives you complete control of the system, but it also opens up new vulnerabilities.

1.Backup before each change

Use it. TWRP to create full section backups /data and /system:

adb backup -apk -obb -shared -all -f /sdcard/backup.ab


twrp backup data system boot

Store backups on your PC or cloud – if internal memory is damaged, it will be impossible to restore them.

Control of installed modules

Do not install Magisk modules from unverified sources.

  • πŸ” Reviews XDA Developers or 4PDA.
  • πŸ“… Date of last update (older versions may conflict with HyperOS).
  • πŸ›‘οΈ Open source code on GitHub.

3. Protection against malware

With root rights, malicious applications can gain full access to the system, and the following will help to strengthen security:

  • πŸ”’ Installation of AFWall+ to control network traffic of applications.
  • πŸ›‘οΈ Using the Magisk App Systemizer module to transfer applications to the system partition (deletion protection).
  • πŸ” Regular checks through Malwarebytes or Kaspersky.

⚠️ Note: If you use Xiaomi to work with data (e.g. corporate email, banking applications), consider creating a separate user profile without root rights.

FAQ: Frequent questions about root on Xiaomi

❓ Can I get root on Xiaomi without unlocking the bootloader?
No, on modern Xiaomi devices (after 2019), unlocking the bootloader is mandatory. The only exception is temporary vulnerabilities (such as DirtyPipe), but they are quickly closed with updates. ADB-partial-customization.
❓ Why Mi Unlock Tool is a 168-hour error"?
This is a new restriction for Xiaomi for some regions (including Russia), officially requiring 7 days to wait after the account is linked. VPN). Use paid services like UnlockJunky.
❓ How to return the official firmware after rooting?
To roll back to stock firmware: Download Fastboot-ROM for your model from the official website. Unpack the archive and swipe through the Mi Flash Tool with the clean all option. After the firmware, reset to factory settings. Important: If you installed custom firmware with the modified anti-rollback, rollback to the old version may block the device!
❓ Does Google Pay work after receiving root?
No, Google Pay and other payment services (SberPay) are blocking the work on rooted devices due to SafetyNet requirements. Solutions: Use MagiskHide (or DenyList in newer versions) to hide root. Install Universal SafetyNet Fix. Go to alternative payment systems like Revolut or Tinkoff Pay, which are less root-based.
❓ Can I upgrade HyperOS with root rights?
Yes, but with reservations: πŸ“¦ OTA-Updates break root. Before updating, delete Magisk (via Uninstall) β†’ Complete in the annex). πŸ”§ After the update, re-sweep Magisk through TWRP or Fastboot. ⚠️ On some models (Xiaomi) 14) Updating from root can lead to bootloop. boot.img manually.