How to get root rights on Xiaomi: from unlocking the bootloader to installing Magisk

Getting root rights on Xiaomi smartphones is a challenge that scares newcomers, but opens up endless possibilities for power users, from removing system applications to fine-tuning performance. In 2026, the process was complicated by the tightening of MIUI security policies and the introduction of the new HyperOS firmware, but the workarounds remained. This article will not just list the steps, but explain why each step is important, how to avoid common mistakes and what to do if something goes wrong.

It's important to understand that unlocking the bootloader and installing root is an irreversible system change that takes away warranties, increases the risk of a device being hacked, and can lead to a "brick" when you make mistakes. However, for risk-averse enthusiasts, root gives you control of the hardware at the kernel level: overclocking the processor, blocking ads at the system level, backing up data applications, and even installing custom firmware like LineageOS or Pixel Experience.

Why Xiaomi is blocking root rights and how to get around it

Xiaomi is actively fighting against unauthorized access to system files, and for this reason:

  • πŸ”’ Data security: Root access allows you to bypass protection MIUI, What makes it easier to steal personal information when you lose your device.
  • πŸ“± Stability: Incorrect changes in system files often lead to β€œlagging”, overheating or complete inoperability of the smartphone.
  • πŸ›‘οΈ Warranty obligations: Any manipulation of the bootloader will automatically void the warranty (even if the problem is not root related).

However, the security circumvention is possible due to two key vulnerabilities in Xiaomi’s architecture:

  1. Unlock the bootloader through the official Mi Unlock Tool (requires Mi Account binding and waits 7-168 hours).
  2. Exploitation of temporary loopholes in firmware (e.g., the DirtyCOW vulnerability in older versions of MIUI, but it is closed in new builds).

Since 2023, Xiaomi has tightened the rules: now, SMS confirmation is required to unlock, and on some models (for example, Xiaomi 13 Ultra or Redmi Note 12 Pro+), the process takes up to 7 days of waiting instead of the previous 72 hours.

πŸ“Š What kind of smartphone you Xiaomi?
Redmi Note Series Series Series
POCO F/X series
Xiaomi 12/13/14 series
Redmi K Series Series
Other

Preparation of the smartphone: what to do before unlocking

Before you start unlocking, follow the mandatory steps, and omitting any of them may result in data loss or inability to complete the process:

Make a backup copy of all data (photos, contacts, messages)

Charge your phone to at least 60%

Make sure that the MIUI/HyperOS version supports unlocking

Disable Find My Device and sync with Mi Cloud

Download the latest version of the Mi Unlock Tool from the official website-->

Pay special attention to backup. Even if you're confident in your actions, unlocking the bootloader resets the device to factory settings.

  • πŸ“ Local copying on PC through MTP Xiaomi PC Suite.
  • ☁️ Cloud services (Google Drive, Mi Cloud), but remember: once unlocked, access to Mi Cloud will be limited.
  • πŸ”„ Third-party utilities like Swift Backup (require root, but you can make a copy before unlocking on another device).

⚠️ Note: If your smartphone is purchased in China (the domestic version), unlocking the bootloader may not be possible without additional manipulation. β†’ The phone. β†’ Version. MIUI. Chinese firmware usually has the letter C at the end (for example, the letter C, V14.0.3.0.TMBCNXM).

Also make sure that your PC has:

  • πŸ–₯️ Xiaomi drivers (download automatically when connecting your phone or manually from the official website).
  • πŸ”Œ ADB Fastboot (part of Google’s Platform Tools).

Unlocking the bootloader: step-by-step instruction 2026

This is the most critical stage. Errors here can lead to a complete loss of the device's performance ("hard brick"), so follow the instructions carefully.

Step 1: Linking your Mi Account to your device

  1. Go to Settings β†’ Xiaomi Account β†’ Mi Cloud.
  2. Turn on sync and make sure the device is linked to your account.
  3. In the Settings β†’ About phone tap 7 times on the MIUI version to activate the Developer Mode.
  4. Return to Settings β†’ More β†’ For Developers and Enable: Debugging over USB OEM Unlock (may be absent on some models)

Step 2: Request Unlocking via Mi Unlock Tool

  1. Download the latest version of the Mi Unlock Tool from the official website.
  2. Launch the utility on behalf of the administrator.
  3. Sign in with the same Mi Account as you do on your phone.
  4. Connect your phone in Fastboot mode (turn off the device, then press Volume Down + Power).
  5. In the utility, press Unlock and confirm the action.

Step 2 Patching boot.img via Magisk

  1. Copy boot.img from firmware to your phone.
  2. Install Magisk APK and open it.
  3. Click Install β†’ Select and Patch a File and select boot.img.
  4. After patching the file magisk_patched.img It will appear in the Download folder.

Step 3: Firmware patch boot via fastboot

  1. Connect your phone in Fastboot mode.
  2. Move it. magisk_patched.img to the Platform Tools folder.
  3. Command: Fastboot Flash boot magisk_patched.img
  4. Reboot the device: fastboot reboot

If Magisk does not appear in the list of applications after the reboot, install Magisk APK manually. To check root access, use the command in the terminal:

su

If you have a request for rights, everything went well!

πŸ’‘

If after installing Magisk, banking applications (Sberbank, Tinkoff) stopped working, turn on the Magisk option in the Magisk settings and add the applications to the hide list.

Common Mistakes and How to Fix Them

Even with the correct following of the instructions, problems can arise, and here are the most common ways to solve them:

Mistake.Reason.Decision
Couldn't unlock the Mi Unlock ToolWaiting time is not completed or the account is not tiedWait for the specified time, check the binding account in Mi Cloud
The phone is stuck on the MI logoImproperly stitched boot.img module conflictSweep the original boot.img through fastboot flash boot.img
SafetyNet failed in MagiskChanges to system files detectedEnable MagiskHide and Enforce DenyList, upgrade certificates
No network after unlockingIMEI reset or damage to the modem partRestore your IMEI via QCN or reflash modem.img

Error: This device is locked after restart

If the phone is locked again after all the manipulations, then boot.img's firmware has failed.

  • πŸ”Ή Correctness of the chosen boot.img (Must be consistent with the current version MIUI/HyperOS).
  • πŸ”Ή File integrity (download the firmware if the file is corrupted).
  • πŸ”Ή Magisk Version (HyperOS requires version 26.4)+).

Error: Banking applications are not working

Since 2023, banks have tightened root screening.

  • 🏦 Use Magisk with Universal SafetyNet Fix.
  • πŸ”„ Rename Magisk via Configure DenyList β†’ Rename Magisk.
  • πŸ“± Install alternative clients (e.g. Sberbank Online via Island or Shelter).
What to do if your phone turns into a brick?
If the smartphone doesn’t turn on, doesn’t respond to buttons, and isn’t detected by a PC, try: 1. Hard reset: Press Volume Up + Power for 20-30 seconds. 2. EDL-Mode: Connect your phone to your PC with the Volume Up button pressed + Volume down (requires an authorized Xiaomi and Mi Flash Tool account). 3. Call service: If nothing helps, maybe damaged memory (eMMC.

Alternative ways to get root without unlocking the bootloader

If unlocking the bootloader seems too risky, there are workarounds, but they don’t work on all MIUI/HyperOS models and versions:

1. Exploitation of vulnerabilities in the kernel (only for old devices)

  • 🐞 DirtyCOW (CVE-2016-5195) β€” worked MIUI 8–10, now closed.
  • πŸ”“ CVE-2019-2215 β€” Vulnerability in Binder, fixed in 2020 year.
  • πŸ“± MTK-su – for devices running MediaTek processors (e.g., Redmi) 9A), But it requires manual patching.

2. Temporary root via ADB (without unlocking)

On some firmware, you can get a temporary root through adb:

adb shell


su -c "your_command_here"

But this method only works until the first reboot and does not give full access to the system.

3.Using Custom Recovery (TWRP)

If the bootloader is unlocked, but Magisk is not suitable, you can flash TWRP:

  1. Download TWRP for your model from the official website.
  2. Quickboot: fastboot flash recovery twrp.img
  3. Boot to TWRP (Loudness Up + Power) and install Magisk.zip.

⚠️ Attention: HyperOS (new firmware Xiaomi 2026) TWRP It may not work because of a modified recovery partition. Check compatibility on forums before you run the firmware. XDA Developers or 4PDA.

What to do after getting root: helpful tweaks and warnings

Now that you have root, you can optimize your smartphone for your needs, but remember, not all changes are safe.

Useful modules for Magisk

    Dangerous actions that can kill your phone

    • ⚠️ Removing system applications without backup (may result in bootloop).
    • ⚠️ Modifying files in /system or /vendor without knowing the consequences.
    • ⚠️ Firmware of incompatible cores or modems (risk of network loss).
    • ⚠️ Use of utilities for overclocking the processor without cooling (overheating and trottling).

    How to get it back (root rollback)

    If you need to return your phone to stock (for example, for sale or warranty repairs):

    1. Uninstall the Magisk menu (Uninstall β†’ Complete Uninstall).
    2. Sweep the original boot.img through fastboot.
    3. Perform reset via Settings β†’ Reset β†’ Delete all data.
    4. To remove traces completely, use the Mi Flash Tool with the clean all option.

    πŸ’‘

    Even after root rollbacks, some banking apps can β€œremember” the modifications, in which case only a complete flashing through EDL (requires an authorized Xiaomi account) will help.

    FAQ: Answers to Frequent Questions

    Can I get root on Xiaomi without unlocking the bootloader?
    On most modern devices (MIUI 12+ and HyperOS) it is not. The only exceptions are: Outdated models (e.g. Redmi 4X on MIUI 9); Devices with vulnerabilities in the kernel (operated through adb but given a temporary root).
    Why is there no network or camera after unlocking?
    This is a typical problem when running incompatible boot.img or damaging modem/vendor partitions. Solutions: Sweep the original modem.img and vendor.img from stock firmware. Check IMEI (if it resets, restore via QCN or Maui META). Complete reset via TWRP or Mi Flash Tool.
    How to get around the wait of 7 days when unlocking?
    Officially, no. All the bypasses of changing the date/time or changing the Mi Account have been offline since 2022. The only legal ways to speed up the process are to use a Mi Account that has already unlocked other devices (sometimes shortening the time to 24 hours); to contact Xiaomi support to speed up the unlock (does not work always); informal methods (such as partition swapping) can lead to permanent blocking of the account.
    Will Google Pay work after you get root?
    No, unless you take additional measures. Google Pay uses SafetyNet, which detects changes to system partitions. Solutions: Install MagiskHide Props Config module and set up root hiding. Use alternative payment systems (e.g. Samsung Pay via Island). roll back root before using Google Pay (inconvenient but works). Since 2026, Google has tightened checks, so even MagiskHide can have problems.
    Can I update MIUI/HyperOS after root?
    You can, but with caution: πŸ”„ Update through OTA: It usually resets root. You need to resweeve it after the update. magisk_patched.img. πŸ–₯️ Manual firmware: Download the full firmware package, extract a new one boot.img, Patch it through Magisk and stitch it with the update. On HyperOS, updates may break Magisk because of the changed partition structure. Before updating, back up through the TWRP or Swift Backup.