How to get root access on Xiaomi: unlock the bootloader and install Magisk

Xiaomi is one of the few manufacturers that officially allow unlocking a bootloader, but the process of obtaining root rights remains multi-step and requires attention. Unlike most brands where unlocking the bootloader leads to loss of warranty, Xiaomi provides the Mi Unlock Tool, but with strict restrictions: binding to the account, waiting 168 hours and the risk of a brick if errors.

In this article, we will analyze all the current ways to get root on Xiaomi in 2026: from the official unlock of the bootloader to install Magisk and bypass the restrictions. MIUI. We will pay special attention to models on Qualcomm Snapdragon (for example, Redmi Note 12 Pro).+, POCO F5) and MediaTek (Redmi) 12C, POCO M6 Pro, where the process is different, and how to avoid common bugs like Fastboot Error 0x80004005 or hanging on the Mi logo.

Warning: Root access is disabled OTA-Updates, resets Widevine L1 (no HD into Netflix/Disney+), And it can lead to a ban on your Mi Account if you use modified firmware carelessly, if your goal is to simply remove ads in your account. MIUI, Consider alternatives like ADB-commands or transition to Custom ROM (For example, the Pixel Experience).

πŸ“Š Why You Need to Root on Xiaomi?
Remove ads in MIUI
Install Custom ROM
Overclock the processor
Use Magisk modules
Other

1. Preparation for unlocking the bootloader: requirements and limitations

Before you start unlocking, check out 4 key conditions:

  • πŸ”Ή Device model: Not all Xiaomi smartphones support unlocking. e.g. models for the Chinese market (China) ROM) Frequently blocked at firmware level. Clarify version through Settings β†’ The phone. β†’ Version. MIUI β€” if there is CN, process will be more difficult.
  • πŸ”Ή Mi Account Link: The account must have been created at least 30 days ago and have a confirmed phone number. Otherwise, the Mi Unlock Tool will give you a Couldn't verify device error.
  • πŸ”Ή Version. MIUI: On devices with MIUI 14+ HyperOS unlocking may require additional steps (e.g. rollback to older firmware).
  • πŸ”Ή Uploader status: If you have previously tried to unlock it and received Locked (Relocked) status, you will have to wait 30 additional days.

Also prepare:

  • πŸ“± Charged smartphone (at least 60%) and original USB-cable (cheap cables can cause connection errors).
  • πŸ’» Computer on Windows 7/10/11 (on macOS/Linux Mi Unlock Tool doesn’t work officially, but there are workarounds through virtual machines).
  • πŸ”§ Drivers: Install the Mi PC Suite or manually add drivers for Fastboot and ADB via the official website of Xiaomi.

⚠️ Note: If your device was purchased on credit or under contract from an operator (for example, MTS, Beeline, MegaFon), unlocking the bootloader may violate the terms of the contract. IMEI When changes are detected in the firmware.

2. Official unlocking of the bootloader via Mi Unlock Tool

This is the only way Xiaomi supports, but it requires patience.The process takes a minimum of 7 days due to the mandatory waiting period.

Step 1: Linking your account to your device

1. Go to Settings. β†’ Xiaomi account β†’ Mi Cloud and log in.

2. Enable Settings β†’ Additionally. β†’ For developers β†’ Unlocking OEM (If there is no item, tap 7 times on the version MIUI, activate the developer menu).

3. Connect the phone to the computer and confirm the permission to debug by USB.

Step 2: Launch the Mi Unlock Tool

1. Download the latest version of the Mi Unlock Tool from the official website (avoid third-party sources - viruses are often planted there).

2. Run the program on behalf of the administrator and log in under the same account as on the phone.

3.Put the phone into Fastboot mode: turn it off, then press Volume down + Food before the appearance of a hare in a hat-eared.

β˜‘οΈ Preparation for unlocking the loader

Done: 0 / 4

4. Connect your phone to your PC. The Mi Unlock Tool will have a wait message, which is usually 168 hours (7 days), but for some models (e.g. Xiaomi). 13T) The time limit can be reduced to 72 hours.

⚠️ If you see an error, please add your account in MIUI, So the account is not tied properly. Repeat step 1 and make sure that the Settings β†’ Xiaomi account is displayed by your email.

Step 3: Final Unlocking

After the waiting period has expired:

  1. Start the Mi Unlock Tool again and connect your phone in Fastboot mode.
  2. Press Unlock. It takes 10 to 30 seconds.
  3. Upon completion, the phone will automatically restart with the unlocked bootloader (Unlocked status in Fastboot).

You can now start installing Magisk or Custom Recovery.

πŸ’‘

Officially unlocking the bootloader via the Mi Unlock Tool is the only safe way, but requires a mandatory wait of 7 days and a Mi Account binding.

3. Install Magisk for root rights

Magisk is a universal root access tool that allows you to hide root from applications (such as banking) and install modules to modify the system.

Step 1: Download the required files

You'll need:

  • πŸ“± Magisk APK: Download the latest version from GitHub (file) Magisk-v26.4.apk or newer).
  • πŸ–₯️ Platform Tools: Archive with Google’s adb and fastboot (link).
  • πŸ“„ Stock firmware for your model: Download it from Xiaomi Firmware Updater (choose the Fastboot version) ROM).

Step. 2: Extraction boot.img and his patching

1. Unpack the downloaded firmware (.tgz or.zip) and find the file boot.img (It's usually in the image folder).

2. Copy. boot.img phone-on.

3. Install Magisk. APK Open it and press Install. β†’ Select and Patch a File. Select copied boot.img.

4. After patching in the folder Download will appear file magisk_patched-[random_string].Copy it onto a computer.

Step 3: Firmware patch boot.img

1. Transfer the phone to Fastboot mode (Loudness down) + Nutrition).

2. Connect it to the PC and open the command line in the folder with the platform-tools.

3. execute the command:

fastboot flash boot magisk_patched-[random_string].img

4.Reset the phone:

fastboot reboot

After you boot, open Magisk – if everything goes well, you will see a green tick and Installed status.

⚠️ Note: On some models (POCO X5 Pro, Redmi K60) post-fix boot.img You may need an additional patch through Direct Install in Magisk itself. If root doesn't appear, repeat the step. 3, Instead of flash boot, use fastboot boot. magisk_patched-[random_string].This will temporarily load the patch image, after which you can make a permanent installation in Magisk.

4. Alternative Unlocking Methods (for Power Users)

If the official method does not work (for example, due to an error) 0x80004005 Or locking at the firmware level, you can try workarounds. They're more risky, but sometimes they're the only option.

Method 1: Unlocking with EDL (Emergency Download Mode)

EDL β€” It's a service mode that allows you to flash through a device even with a locked bootloader:

  • πŸ”§ Authorized Xiaomi Account (or bypassing through the EDL Cable – a special cable with closure of contacts).
  • πŸ’Ύ Firmware in.mbn format (can be extracted from Fastboot) ROM using the Mi Flash Tool).

Process:

  1. Transfer the phone to EDL: Turn it off, press the volume up. + Volume down and connect to PC (screen will remain black).
  2. In the Mi Flash Tool, select the firmware and press Flash.
  3. After the firmware, the bootloader will be unlocked, but all data will be erased.
What is it? EDL Cable and where to buy it?
EDL Cable is a modified version of Cable. USB-cable, which when connected automatically puts the device into mode EDL. It can be found on AliExpress (search for "Xiaomi"). EDL Cable" or make yourself by closing contacts 4 and 5 on USB-The cost is from 300 to 800 rubles.

Method 2: Use of vulnerabilities (Exploits)

For older models (Redmi) 4X, Mi A1) There are exploits that allow you to unlock the bootloader without waiting:

  • 🐱 DirtyCOW (for devices on devices on the MIUI 8–9).
  • πŸ”“ CVE-2020-0041 (The vulnerability in Qualcomm was working on MIUI 10–11).

However, most of the exploits are already closed in new versions. MIUI Current vulnerabilities are discussed on XDA-Developers forums or in telegram channels like @miuirom.

⚠️ Note: Using exploits can result in complete data loss or blocking IMEI. For example, on Xiaomi Mi 11, incorrect use of DirtyCOW led to an error Invalid. IMEI, which could only be corrected through a service center.

5. Solving common root errors

Even with the correct following of the instructions, there can be problems, and let's look at the most common ones and how to fix them.

Mistake.Reason.Decision
Cann't verify device in Mi Unlock ToolAccount is not tied to device or phone is not in Fastboot modeRepeat account binding in settings and reconnect the phone
Fastboot Error 0x80004005Xiaomi server temporarily unavailable or account blockedTry it in 24 hours or use it. VPN (Hong Kong, for example)
phone is stuck on startup Mi logo after firmwareIncompatible boot.img or patching errorStitch the original boot.img Fastboot or reset via Mi Flash Tool
Magisk does not specify root after installationIncorrectly patched boot.img or conflict with modulesRepeat patching or remove conflicting modules in Magisk
This device isn’t certified by GoogleResetting Widevine on L3 modificationInstall MagiskHide Props Config and change your fingerprint to a certified one.

If none of the methods worked, check:

  • πŸ” Firmware version: On some models (e.g, POCO F4 GT) root only works on specific versions. MIUI.
  • πŸ”§ Uploader status: If it is in Relocked status, you will have to wait another 30 days.
  • πŸ“‘ Internet connection: Mi Unlock Tool requires stable connection to verify your account.

πŸ’‘

If after unlocking the bootloader, the phone stopped seeing SIM-maps, check the cards. IMEI If he dropped on 000000000000000000000, restore him through Maui META or SN Write Tool (instructions are available on the 4PDA).

6.What to do after getting root: setup and security

Now that you have root access, it’s important to set up the system properly to avoid performance and security issues.

Step 1: Set up Magisk

1. Open Magisk and go to Settings:

  • πŸ”„ Turn on MagiskHide (hiding root from apps).
  • πŸ”’ Activate Zygisk (replaces Riru for modules).
  • πŸ“₯ Enable Automatic response for installation requests (simplifies installation of modules).

2. Install useful modules:

  • πŸš€ LSPosed – framework for modifying applications (similar to Xposed).
  • πŸ”‡ Universal SafetyNet Fix – SafetyNet (Google Pay).
  • 🎯 MIUI Debloater – Removes system debris and advertising.

Step 2: Optimization of the system

With root access, you can:

  • ⚑ Overclock the processor via Kernel Adiutor (caution is possible - overheating is possible!).
  • πŸ—‘οΈ Remove embedded applications (e.g. com.miui.analytics – statistics collector).
  • πŸ”‹ Extend battery life with Greenify or Battery Charge Limit (restricting charge to 80%).

Step 3: Security

Root access opens up new vulnerabilities:

  • πŸ›‘οΈ Turn it off. ADB Wi-Fi in the developer settings if you don’t use it.
  • πŸ” Install an antivirus (such as Malwarebytes) as some modules may contain malicious code.
  • πŸ”„ Update Magisk regularly – new versions close critical vulnerabilities.

Remember: with root access, you lose your warranty, and some banking applications (like SberBank Online) can block your work. Use MagiskHide or the SafetyNet Fix module to get around the restrictions.

πŸ’‘

After receiving root, be sure to configure MagiskHide and install modules for passing SafetyNet - this will allow you to use banking applications and streaming services (Netflix, Disney).+).

7. How to get it back: root removal and bootloader lock

If you need to return the phone to its original state (for example, for sale or warranty repair), follow the following steps:

Step 1: Remove Magisk

1. Open Magisk and go to Uninstall β†’ Complete Uninstall.

2. The phone will reboot and root access will be deleted.

Step. 2: Original firmware boot.img

1. Download the original boot.img from a stock firmware for your model.

2. Sweat it through Fastboot:

fastboot flash boot boot.img


fastboot reboot

Step 3: Locking the bootloader

1. Transfer the phone to Fastboot.

2. execute the command:

fastboot oem lock

3. Confirm the lock on the phone screen (if a warning appears).

⚠️ Warning: Once the bootloader is locked, all data will be erased and the phone will return to factory settings. ROM, Before blocking, run the original firmware through the Mi Flash Tool.

To check the status of the bootloader, transfer the phone to Fastboot and look at the inscription at the bottom of the screen:

  • πŸ”“ Unlocked – the bootloader is unlocked.
  • πŸ”’ Locked – the bootloader is blocked.

FAQ: Frequent questions about root on Xiaomi

❓ Can I get root without unlocking the bootloader?
No, on all modern Xiaomi devices (starting with the MIUI 10) Unlocking the bootloader is mandatory. There used to be exploits to bypass (for example, through DirtyCOW), but they are closed in newer versions of firmware. The only exception is Android One devices (for example, Mi). A2), where you can use Magisk without unlocking, but there you need to unlock OEM Unlock.
❓ Why does the bootloader not work after unlocking? NFC mobile?
This is a typical problem for models with MediaTek (e.g. Redmi). 10C, POCO M4 Pro. Cause: discharge IMEI or NV-module NFC. Solutions: Restore IMEI via Maui META or SN Write Tool (instructions are available on the 4PDA). For NFC smear the original nfc.img If the problem persists, try flashing the full stock firmware through the Mi Flash Tool with the Clean All tick.
❓ How to update MIUI root-access?
Root-access. OTA-updates don't work - they just won't install: πŸ”„ Manual firmware: Download the full service pack (.zip) and run it through TWRP or Fastboot. πŸ“¦ Installation via Magisk: Some updates can be installed as a module (e.g. via Magisk). MIUI Updater for Magisk). πŸ”’ Temporary root removal: Remove Magisk, update, then re-install root.Important: After the update, always check Magisk compatibility with the new version MIUI. For example, on MIUI 14 Some modules stopped working due to changes in Zygote.
❓ Will Google Pay work with root access?
By default, no, because Google Pay checks SafetyNet. However, this can be bypassed: Install Universal SafetyNet Fix module in Magisk. Activate MagiskHide and add Google Pay to the list of hidden apps. Check SafetyNet status through the app YASNAC β€” must have PASS both-test (CTS Profile and Basic Integrity: Some models (e.g. Xiaomi 12 Pro) may require additional fingerprint settings via the MagiskHide Props Config module.
❓ Can I get a root on Xiaomi with HyperOS?
HyperOS (new firmware from Xiaomi, which replaced the new one) MIUI 2026) supports unlocking the bootloader and installing Magisk, but there are nuances: πŸ”§ The unlock process is the same, but the Mi Unlock Tool may require a newer version. πŸ“¦ Some Magisk modules (e.g., for interface modifications) are not yet adapted for HyperOS. πŸ”’ HyperOS has enhanced protection against modifications – for example, reset Widevine on the L3 Before trying root, make sure that for your model (Xiaomi 14, Redmi) K70 etc.) There are already successful cases in the forums.