Root rights to Xiaomi: the complete guide from unlocking the bootloader to installing Magisk

Getting Root rights on Xiaomi smartphones opens up access to hidden Android features, from removing system applications to fine-tuning performance. However, the process requires carefulness - a mistake at any stage can turn a device into a brick. In this article, we will discuss all the steps: from preparation to installation of Magisk, taking into account the features of firmware MIUI model Redmi/POCO.

It’s important to understand that Xiaomi doesn’t officially support rooting, but it does provide a tool to unlock the bootloader. This is a semi-official path that we’ll look at. Alternative methods (such as through vulnerabilities) are risky and can violate the warranty. If your goal is simply to remove ads from MIUI, try alternative methods first.

This article is relevant for MIUI 14/15 and HyperOS (2026).If your smartphone is older than 2018, check the support for unlocking the bootloader on the official website - some models (for example, Redmi Note 4X) are no longer supported.

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

Before you start unlocking, follow the mandatory steps:

  • πŸ“± Check the device model: go to Settings β†’ The phone. β†’ Models: Some models, for example, POCO F1) have features of unlocking.
  • πŸ”‹ At least 60 percent battery charge. When unlocked, the bootloader resets the device, and the low charge can interrupt the process.
  • πŸ” Unlock your Mi Account (if you plan to sell the device) and once unlocked, the reset to factory settings will link your phone to your last account.
  • πŸ’Ύ Create a backup through Settings β†’ Additionally. β†’ Backup. Root will delete all data!

Pay special attention to the firmware version. On Xiaomi with HyperOS (2026+), the unlocking process has not changed, but some tools (such as the Mi Unlock Tool) may require an update. Check the current version on the download page.

⚠️ Note: If your device was purchased in China (the firmware version ends in China) CN), Unlocking requires a Mi Account with a Chinese phone number tied to it.

πŸ“Š Why You Need Root on Xiaomi?
Removal of advertising in MIUI
Installation of custom firmware
Game cheats
Overclocking the processor
Other

2 Unlock the bootloader: the official way through the Mi Unlock Tool

Xiaomi’s official tool, the Mi Unlock Tool, is the only safe way to unlock the bootloader, and it takes at least 7 days to wait (since 2023, Xiaomi has extended the deadline for new accounts).

  1. Link your Mi Account to your device: πŸ“± Go to Settings. β†’ Xiaomi account and log in. πŸ”— Enable data synchronization and confirm email/phone.

Activate the Developer Mode

Settings β†’ About Phone β†’ MIUI version (click 7 times)


Settings β†’ Additional β†’ For developers β†’ Unlock OEM (enable)

Connect the device to the PC

  • πŸ–₯️ Install Mi Unlock Tool (Windows version).
  • πŸ”Œ Use the original cable USB β€” Cheap cables can cause errors.

Once connected, the Mi Unlock Tool will show a waiting timer (usually 168 hours), which cannot be legally circumvented, and attempts to use bypass methods (such as changing the region of the account) lead to the device being blocked.

β˜‘οΈ Preparation for unlocking the loader

Done: 0 / 5

⚠️ If the Mi Unlock Tool gives you a "Couldn't unlock" error after waiting, check it out: πŸ”Ή Mi Account is tied to device for more than 7 days. πŸ”Ή Mobile Internet is enabled (Wi-Fi is not enough). πŸ”Ή You are using the latest version of the Mi Unlock Tool.

3. Install custom recovery (TWRP) after unlocking

Once the bootloader is unlocked, the next step is to install custom recovery (usually TWRP), which will allow you to install Magisk and other modifications. The process is different for different models, but the general scheme is as follows:

  1. Download. TWRP for your model: πŸ” Official builds: twrp.me. πŸ› οΈ New devices (such as Xiaomi 13) may require informal build from the forum. XDA Developers.

Install ADB and Fastboot

Installation on Windows (PowerShell)


winget install Google.AndroidSDK.PlatformTools

Download the device to Fastboot mode

adb reboot bootloader

Or manually: turn off the phone β†’ press Volume down + Power.

Please TWRP.

fastboot flash recovery twrp.img


fastboot boot twrp.img

If after installing TWRP, the device loads into stock recovery, then MIUI firmware overwrites the partition.

fastboot flash vbmeta vbmeta.img


fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

What to do if TWRP does not start?
If you have a fastboot boot twrp.img resetting device MIUI, So the firmware has anti-Rollback protection on: 1. Find a version. TWRP Anti-Rollback support for your model. 2. Use the command fastboot flash recovery_ramdisk twrp.img standard. 3. HyperOS devices may need to be rolled back MIUI 14 before installation.

4.Install Magisk: Getting Root Rights Without SafetyNet Triggers

Magisk is not just a tool for obtaining Root, but also a cloaking system that allows you to use banking applications (like SberBank Online) even with root rights. The last stable version at 2026 is Magisk 26.4.

Installation instructions:

  1. Download Magisk: πŸ“± Official APK: GitHub. πŸ”§ Or download. ZIP-file-installation TWRP.

Install Magisk via TWRP

  • πŸ“ Copy. Magisk-v26.4.zip phone-on.
  • πŸ”„ Boot in. TWRP (Loudness up + Nutrition).
  • πŸ“₯ Choose Install. β†’ Magisk-v26.4.zip β†’ Swipe to confirm.
  • Restart the device and check Root: adb shell su If you see the invitation #, Root installed successfully.

πŸ’‘

If the device is stuck with the MI logo after installing Magisk, the modules are in conflict with the stock kernel. Solution: boot into TWRP, delete the /data/adb/modules folder, and reinstall Magisk without modules.

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

Even with the correct following of the instructions, errors can occur.

Mistake.Reason.Decision
Couldn't unlock (10008)Mi Account is not tied to device for 7 daysWait until the deadline is set or use another account.
Fastboot doesn't see the deviceLack of drivers or faulty cableInstall ADB drivers and try another cable
Bootloop after installing MagiskModule conflict or incompatible version of MagiskRemove modules via TWRP or roll back to Magisk 25.2
SafetyNet does not passUniversal SafetyNet Fix is not available.Install the module and turn on MagiskHide

If the device has turned into a hard brick, don't panic.Most Xiaomi models can be restored through a hard brick. EDL-Emergency Download Mode with the Mi Flash Tool:

  • πŸ–₯️ Windows PC and Qualcomm Drivers installed.
  • πŸ“‚ Firmware for your model in.tgz format.
  • πŸ”Œ Cable USB Type-C with data support (not all cables are suitable!).

⚠️ Attention: Use EDL If you've previously rolled back on an old firmware, the device may lock permanently. Check the current version of Anti-Rollback via fastboot getvar anti.

6. Root alternatives: what can be done without unlocking

If Root is only for ad removal or optimization, consider alternatives:

  • 🚫 Disabling advertising in MIUI: Go to Settings. β†’ Xiaomi account β†’ Advertising β†’ Turn off personal advertising. ADB and execute commands: adb shell pm disable-user --user 0 com.miui.daemon adb shell pm disable-user --user 0 com.xiaomi.midrop
  • ⚑ Optimization without Root: Enable Developer Mode β†’ Limit background processes. Use Greenify (no Root required for newer versions of Android).
  • πŸ”„ Castom launchers: Nova Launcher or Lawnchair to replace stock launcher MIUI. Configure gestures and icons without system restrictions.

For game cheats (e.g. PUBG Mobile or Genshin Impact), Root emulators with pre-installed root (LDPlayer, BlueStacks with Magisk) can be used instead.

πŸ’‘

If your goal is to remove ads or install GCam, Root is optional. Most tasks are done through ADB or alternative applications.

7 Security after receiving Root: how not to lose data

Root rights give you complete control of the system, but they also open up new vulnerabilities.

  • πŸ”’ Turn off Root for unnecessary apps: In Magisk, go to Super User β†’ Settings β†’ Automatic response β†’ Request.Ban Root for banking apps and instant messengers.
  • πŸ›‘οΈ Install security modules: MagiskHide Props Config - masks the device as a Pixel for SafetyNet. AFWall+ β€” Firewall to block network access applications.
  • πŸ”„ Update Magisk regularly: New versions fix vulnerabilities (e.g. DirtyPipe in the Linux kernel.