Root on Xiaomi: from unlocking the bootloader to Magisk – the full guide

Getting root rights on Xiaomi smartphones is a process that opens up hidden Android features but requires care and understanding of risks. In 2026, the procedure was complicated by the tightening of the security policy of MIUI and the new HyperOS, but remains feasible even for beginners, this guide covers all the steps from unlocking the bootloader to installing Magisk while maintaining the health of banking applications.

It’s important to understand that starting with MIUI 13, Xiaomi blocks the ability to unlock the bootloader on devices younger than 7 days from the first activation, which means that if you just bought a smartphone, you will have to wait or use workarounds (about them below).

In this guide, we will discuss:

  • πŸ”“ How to officially unlock the bootloader via the Mi Unlock Tool (including bypassing the time limit)
  • πŸ“± Choosing a custom Recovery: TWRP OrangeFox for different Xiaomi models
  • πŸ› οΈ Install Magisk and configure DenyList to work with banking applications
  • ⚠️ Typical Errors and How to Avoid Them (from Fastboot Mode to Anti-Rollback)

If you're willing to take a risk for total control of the device, let's get started, but first check if your model is suitable for rooting.

1.Preparation: Compatibility check and backup

Not all Xiaomi smartphones can be flashed the same way, for example, devices on HyperOS (such as Xiaomi 14 or Redmi Note 13 Pro+) require a different approach than the older models on MIUI 12.

  • πŸ“‹ Find out the exact model and code name of your device. β†’ The phone. β†’ Version. MIUI and tap 7 times on the kernel version line. In the Developer menu that appears, look for the device code name (e.g., raphael for Redmi). K20 Pro).
  • πŸ” Check the support on the official website TWRP or in thematic chats (for example, 4PDA). Devices with MediaTek processor (e.g. Redmi) 10C) Often have problems with custom recavers.
  • πŸ’Ύ Make a full backup through Mi Cloud or ADB Backup.Root erases data, and recovery via Mi Account after unlocking the bootloader may not work.

Critical information: Anti-Rollback devices (such as the Poco F3 or Mi 11) cannot be flashed onto an older version of MIUI/HyperOS. Trying to do so will result in hard-brick (irreparable damage). Check the current firmware version in Settings β†’ About Phone β†’ MIUI version and compare it to supported versions on the forums.

πŸ“Š What Xiaomi model do you want to root out?
Redmi Note 12/13
Poco F4/F5
Xiaomi 13/14
Redmi K50/K60
Another model

⚠️ Note: On HyperOS devices (e.g. Xiaomi 14), unlocking the bootloader can lead to Widevine blocking L1 β€” This means that Netflix, Disney+ Other services will only work in 480p. Before you start, check if this restriction is critical to you.

2 Unlock the bootloader through the Mi Unlock Tool

The official way to unlock is Xiaomi's Mi Unlock Tool, but since 2023, the company has tightened the requirements:

  1. Link Mi Account to your device in Settings β†’ Xiaomi Account. Make sure your account is confirmed by phone and email.
  2. Activate OEM Unlock and USB Debugging in the Developer Menu (see Section 1 for how to open it).
  3. Connect your phone to your PC, confirm debugging over USB and follow the command: Adb devices The device should appear in the list.
  4. Download the Mi Unlock Tool (at least 5.5.224.30 for HyperOS) and log in under the same Mi Account as you do on your phone.

If the utility gives you a Couldn't unlock or Wait 168/72 hours error, it means your device is under 7 days.

How to get around the time limit of 7 days
The method does not work for all models! 1. Reverse to the old version MIUI via Fastboot (for example, with HyperOS on the MIUI 14). 2. Use the Mi Unlock Tool (see below) 4PDA). 3. Change the date to the engineering menu ADB: adb shell am broadcast -a android.provider.Telephony.SECRET_CODE -d android_secret_code://4636 Then, in the engineering menu, change the date to an earlier one and restart.
Mistake.Reason.Decision
Couldn’t unlockDevice under 7 daysBypassing a patched utility or rolling back firmware
Mi Account not boundThe account is not tied to the deviceRe-link the account in the settings
Network errorProblems with Xiaomi serversUse a VPN (for example, Japan)

Linked to Mi Account|On. OEM Unlock|Drivers installed ADB|Download Mi Unlock Tool 5.5.224.30+|PC connected to the Internet-->

3. Installation of custom recaveri (TWRP/OrangeFox)

After unlocking the bootloader, you need to install custom recavators for further Magisk firmware. TWRP is suitable for most devices, but for new models (for example, Xiaomi 13T), it is better to use OrangeFox - it works better with HyperOS.

Instructions for TWRP:

  1. Download the image of the recap for your model from the official website (for example, twrp-3.7.0_9-0-raphael.img for Redmi K20 Pro).
  2. Reboot your phone in Fastboot mode (turn off, then press Power + Vol Down).
  3. Fastboot flash recovery twrp.img fastboot boot twrp.img (replace twrp.img with your file name).

For OrangeFox, the process is similar, but you have to download the image from their website.

  • πŸ”„ Don't reboot to the system! immediately go to the newly installed Recovery (via Reboot) β†’ Recovery in fastboot).
  • πŸ“ Copy the file. Magisk-v26.4.zip (the latest version) for internal memory or SD-map.
  • βš™οΈ In RecavΓ©re, select Install β†’ Magisk.zip β†’ Swipe to confirm.

⚠️ Note: On devices with Dynamic Partition (e.g. Poco) F4) Before you run Magisk, you have to manually resize the system partition. TWRP Go to Advanced. β†’ Resize System and reduce the size of the system 100-200 Otherwise, Magisk won't stand up!

4.Install Magisk and set up DenyList

Magisk is not just a root tool, but also a module management system that allows you to hide the root from banking applications.

  • πŸ“± Reboot to the system and open the Magisk app (it will appear in the menu).
  • πŸ”§ Go to Settings. β†’ Hide Magisk (DenyList) and add apps that shouldn’t see root (e.g. Sberbank Online, Google Pay).
  • πŸ”„ Reboot the device. Check the status of the root through the Root Checker app.

If the banking applications are not working:

  1. Install MagiskHide Props Config module via Magisk β†’ Modules β†’ Install from storage.
  2. In the Magisk terminal, execute the commands: su props 1 β†’ Edit device fingerprint Select a print of a device without a root (e.g., Pixel 7).
  3. Clear the data of the problem application and restart.

πŸ’‘

If after installing Magisk phone is fixated on the boot, press the Power + Vol Up to enter the Recovery and stitch the module Disable_Dm-Verity_ForceEncrypt.zip. This will disable the integrity check.

5. Typical errors and their solutions

Even with the correct instructions, there are some problems that can go wrong, and here are the most common problems and ways to fix them:

Problem.Probable causeDecision
The phone does not turn on after the firmwareIncompatible version of TWRP or MagiskSweep the original firmware through the Mi Flash Tool
Invalid IMEI error after the rootNvram section damagedRestore the nvram backup with TWRP or use the SN Writer Tool
The mobile network is not workingNo modems are stitched after changing the firmwareScroll down vendor and firmware from stock firmware

The Anti-Rollback error is especially dangerous on Qualcomm Snapdragon devices, and if you see this package is for "xxx" devices, this is a "yyy," you're trying to flash the firmware with a lower Anti-Rollback number.

  1. Under no circumstances do not turn off the power!
  2. Find firmware with Anti-Rollback not lower than the current one (checked through fastboot getvar anti).
  3. Swipe it through the Mi Flash Tool with a clean all and lock tick.

πŸ’‘

If the phone doesn’t respond to buttons after a failed firmware, try pressing Power + Vol Up + Vol Down for 20-30 seconds to force the reboot to EDL mode. In this mode, the device can be restored via QFil or Mi Flash Tool.

6. Alternative rooting methods without unlocking the bootloader

If unlocking the bootloader is not possible (for example, on corporate devices), you can try alternative methods:

  • πŸ”§ Local exploit (e.g. DirtyCow or CVE-2023-21036). It runs on vulnerable versions of Android, but requires technical skills. XDA Developers.
  • πŸ“¦ Firmware through ADB Sideload. Some custom firmware (for example, LineageOS) can be installed without TWRP, using the command: adb sideload rom.zip But it only works on an unlocked bootloader.
  • πŸ–₯️ Root emulation via Shizuku or VirtualXposed. It doesn't give you a full root, but it allows you to use some modules (e.g. LSPosed).

For devices on MediaTek (e.g. Redmi 10A), the method through the SP Flash Tool with patched boot.img sometimes helps. However, this is risky - hard-brick is likely.

⚠️ Note: Using exploits to bypass unlocking a bootloader can lead to a ban on Mi Account. Xiaomi actively blocks accounts tied to devices with unofficial rooting methods.

7.What to do after getting root?

Now that you have root, you can optimize the system. Here are some useful things to do:

  • πŸš€ Bloat Removal: Use Debloater or Universal Android Debloater to remove pre-installed Xiaomi apps (e.g. com.miui.analytics).
  • πŸ”‹ Battery Optimization: Install Battery Charge Limit in Magisk to limit charge to 80% and extend battery life.
  • 🎯 Performance setting: Kernelsu module allows you to fine-tune the system core (e.g., change governor for the processor).
  • πŸ”’ Security: Turn off Xiaomi telemetry via ADB: adb shell settings put global send_action_app_data_to_server 0

For advanced users:

  • πŸ“‘ Change of the region of the firmware: with the help of MIUI bootloader can be downloaded from the European (EEA) Global (Global) Version MIUI/HyperOS, Even if your device is originally from China.
  • πŸ–₯️ Linux on Xiaomi: Some models (e.g. Poco) F1) You can install Ubuntu Touch or PostmarketOS as the second system.

πŸ’‘

After you delete your system applications, some features (such as themes or cloud storage) may stop working. Always back up before you make changes!

FAQ: Frequent questions about Xiaomi rooting

Can I get root on Xiaomi without unlocking the bootloader?
Technically, yes, but only on older devices (until 2019) through exploits like DirtyCow. On newer models (like Xiaomi 13 or Redmi Note 12), unlocking the bootloader is mandatory. The alternative is root emulation via Shizuku, but that won't give you full access.
Why are banking applications not working after the root?
Banking applications (e.g. Sberbank Online or Tinkoff) check system integrity through SafetyNet. To get around this: Turn on MagiskHide in Magisk settings. Add the app to DenyList. Install Universal SafetyNet Fix. Change the device's fingerprint through MagiskHide Props Config (select a certified device, like the Pixel 6). If it doesn't work, try Hide My Applist.
How to return the warranty after rooting?
Officially, no. Xiaomi voids the warranty when unlocking the bootloader. However, you can: Swipe the original firmware through the Mi Flash Tool with a clean all and lock tick; Delete Magisk and restore the stock boot.img; Reset the bootloader unlock counter (on some models, this is possible through fastboot oem lock); but even then, the service center can detect traces of the root from the logs or the state of the miscta partition.
Can I upgrade MIUI/HyperOS after rooting?
Yes, but with caution: If the update comes by air (OTA), it can't be installed directly, it will lead to root loss. Instead: Download the full service pack (.zip) with Xiaomi Firmware Updater. Run it through TWRP, disable DM-Verity before you upgrade. After the update, re-sweep Magisk. On HyperOS, some updates block the bootloader. Before you firmware, check the reviews on 4PDA.
What Xiaomi models can not be rotated?
Problems with: Devices on MediaTek Helio G (e.g. Redmi) 9A, Poco C31) β€” They often don't have stability. TWRP. New flagships on HyperOS (e.g. Xiaomi 14 Ultra) – unlocking the bootloader can break Widevine L1. Devices with Anti-Rollback 4+ (For example, Mi 11 Ultra, the firmware of the old version will lead to a breeze, corporate devices with a reference to Mi Enterprise (for example, Xiaomi Mi). A3 Before starting, check the support of your model on the XDA Developers or 4PDA.