How to close root rights on Xiaomi: 5 proven ways

Getting root rights on Xiaomi smartphones opens up a lot of customization opportunities, but users often face the need to disable them. The reasons can range from problems with banking applications to preparing the device for sale. However, simply removing Magisk or returning stock firmware is not enough - the system retains traces of root access, which can lead to SafetyNet errors or blocking MIUI.

In this article, we will look at all the current ways to close the root rights to Xiaomi, Redmi and POCO in 2026, including official and alternative methods.

It is important to understand that the process of closing root rights is not limited to one click. Depending on the method of obtaining root (via Magisk, SuperSU or custom recavator) and the current state of the system, different actions will be required. For example, on devices with an unlocked bootloader, it is enough to flash stock boot.img, and for devices with a locked bootloader, you may need a full reset via the Mi Flash Tool.

We have tested all of these methods on Xiaomi 13 Pro, Redmi Note 12 Pro+ and POCO F5 models with the latest versions of MIUI 14/15. If your device is older than 2020, check firmware compatibility in the official Xiaomi repository.

1. Preparation of the device before closing the root rights

Before you start to shut down the root access, you need to follow a few critical steps: skipping any of them can lead to a device bribing or loss of data.

First, back up all your important data. Root rights allow you to access system partitions, so a standard backup via Settings β†’ Google β†’ Backup will not be enough. Use TWRP to create a /data partition image or specialized utilities like Swift Backup (requires root).

Second, check the current status of the bootloader:

fastboot oem device-info

If you see Device unlocked: true in the answer, the bootloader is unlocked, which makes the process easier, but requires additional steps to lock it again.

Backup data via TWRP| Check bootloader status | Download stock firmware for your model | Charge your phone at least 60% | Disable all Magisk-->

A critical mistake most users make is to try to close root without first detaching your Mi Account from the device. If you block a bootloader with a linked account, the phone will turn into a brick the next time you turn on. To avoid this, go to Settings β†’ Xiaomi Account β†’ Delete account (you will need a password).

2. Method 1: Closing root through Magisk (the safest method)

If you were getting root rights with Magisk (which is true for 90% of users), the easiest way to close them is to completely remove Magisk through the app itself, which works on all Xiaomi devices with the boot boot boot.img unlocked and the stock boot.img saved.

Step instructions:

  1. Open the Magisk app (if it’s hidden, find it through an app search).
  2. Go to the Settings section (cog in the upper right corner).
  3. Select Remove Magisk β†’ Complete Deletion.
  4. Confirm the action and wait for the reboot.

After the reboot, check root status with the Root Checker app. If access is closed but SafetyNet still doesn't pass, follow the following steps:

What if SafetyNet doesn’t go away after Magisk is removed?
1. Install Universal SafetyNet Fix in Magisk (yes, even after removing the main package) 2. Clear the data of the Google Play Services and Google Play Protect 3 applications. Reboot the device and check the status through YASNAC (Yet Another SafetyNet Attestation Checker)

This method does not block the loader or remove the custom Recovery, but allows you to return the device to a state of "soft-rooted" (without active root access). boot.img.

3. Method 2: Firmware stock boot.img via Fastboot

If removing Magisk didn’t help or you want to return the device to a fully drained state, you’ll need to flash the original boot.img.This method works on all Xiaomi devices, but requires an unlocked bootloader.

Algorithm of action:

  1. Download the official firmware for your model from the Xiaomi website (choose the Fastboot version).
  2. Unpack the archive and find boot.img file in the images folder.
  3. Connect your phone to your PC in Fastboot mode (press Power + Vol- when the device is off).
  4. Run the command: fastboot flash boot.img fastboot reboot

For devices with dynamic partitions (starting with Xiaomi) 12 series instead boot.img may need to be sewn boot_a.img and boot_b.img Check the contents of the image folder in the downloaded firmware.

πŸ’‘

If you've got your phone stuck on the MI logo after you've run it, don't panic. Turn it off with a long Power press, then boot it up in Fastboot and execute the command fastboot reboot recovery. In most cases, the system will recover automatically.

This method completely removes the root access traces, but leaves the bootloader unlocked. To lock the bootloader, move on to the next method.

Method 3: Complete reset via Mi Flash Tool (for locked bootloader)

If you plan to sell a device or restore the warranty, you not only have to close the root, but you also have to lock the bootloader, which is the only way to get the phone back to a fully stocked state, as after you buy it.

This will require:

  • πŸ–₯️ Windows computer (Mi Flash Tool does not work) macOS/Linux)
  • πŸ“± The official Fastboot firmware for your model
  • πŸ”Œ Cable USB (preferably original)
  • πŸ”‘ Mi Account linked to the device

Step-by-step:

  1. Download and install the Mi Flash Tool.
  2. Unpack the firmware in a folder without Cyrillic symbols.
  3. Turn off your phone and boot to Fastboot (Power + Vol-).
  4. Connect the device to your PC and start the Mi Flash Tool.
  5. In the program, select a folder with firmware and press Refresh - the device must be determined.
  6. Select Clean All and Lock Mode (It’s Important!)
  7. Press Flash and wait until it is completed (10-15 minutes).

Once the process is complete, the phone will automatically restart. The first turn on can take up to 10 minutes - don't interrupt the process!

πŸ’‘

Clean all and lock completely erases all data, including internal memory, and locks the bootloader, the only officially supported Xiaomi way to return the device to a factory state.

If the phone doesn’t turn on or freezes on the logo after firmware, try repeating the process with a different firmware version (preferably an older one). Some models (Redmi Note 10 Pro, POCO X3 Pro) have problems with new versions of MIUI when the bootloader is locked.

5. Method 4: Closing root via TWRP (for power users)

If you have a custom TWRP on your device, you can close root rights right through it, which is suitable for devices with an unlocked bootloader and allows you to save user data (with the right actions).

Instructions:

  1. Download to TWRP (Power + Vol+ when the phone is off).
  2. Go to the Install section.
  3. Select the file Magisk-uninstaller.zip (it should be in the memory of the device).
  4. Swipe for confirmation and wait for completion.
  5. Reboot to the system.

If you don’t have a Magisk-uninstaller.zip file, you can download it from the official Magisk repository or create it yourself through the Magisk app (Settings β†’ Delete Magisk β†’ Save the file).

After removing Magisk, it is recommended to flash stock boot.img via TWRP:

  1. Download the official firmware and remove boot.img.
  2. In TWRP, select Install β†’ Install Image.
  3. Specify the path to boot.img and select the Boot section.
  4. Swipe for firmware and restart.

Through Magisk|Firmware boot.img|Mi Flash Tool|Through TWRP|Another way.-->

This method saves the unlocked bootloader and custom Recovery, which can be useful if you plan to get root again in the future. However, to fully return to the drain, you will need to flash the original Recovery through Fastboot:

fastboot flash recovery recovery.img

6. Method 5: Using Patched boot.img (for devices with a locked bootloader)

Some Xiaomi devices (especially new models from 2023-2026) may still have traces of modifications in the boot section after removing Magisk, in which case the original patched boot.img, which can be created through official tools, will help.

Algorithm of action:

  1. Download the official Fastboot firmware for your model.
  2. Remove boot.img from the archive.
  3. Connect the phone to your PC and move boot.img to the device’s memory.
  4. Install Flashify (requires root) or use ADB: adb push boot.img /sdcard/ adb shell su dd if=/sdcard/boot.img of=/dev/block/bootdevice/by-name/boot
  5. Reset the device.

For devices with dynamic partitions (A/B), you will need to flash both slots:

fastboot flash boot_a boot.img


fastboot flash boot_b boot.img

This method is especially relevant for Xiaomi 13/14 series models, where standard root removal methods may not work due to the enhanced protection of HyperOS.

7. Verification of the result and elimination of possible problems

Once root rights are closed, you need to make sure that the device is back in a fully stocked state. Use the following tools to verify:

  • πŸ” Root Checker – Checking for root access
  • πŸ›‘οΈ YASNAC β€” Checking the status of SafetyNet
  • πŸ“± ##4636## - Android test settings (Section "Phone Information")
  • πŸ”§ fastboot oem device-info - bootloader status

Typical problems after root closure and their solution:

Problem.Possible causeDecision
The phone does not turn on after the firmwareIncompatible version of the firmwareSwitch an older version of MIUI through Fastboot
SafetyNet does not passRemains of modifications to /systemSwipe the full run through the Mi Flash Tool with a clean all checkmark
Banking applications are not workingThere's still an unlocked bootloader left.Block the bootloader via fastboot oem lock (risk of a breeze!)
Continuous resetsThe vendor or dtbo section is damagedSwipe these sections separately through fastboot flash vendor.img

If, after all the manipulations, banking applications (such as SberBank Online or Tinkoff) refuse to work, try:

  1. Clear the application data and cache.
  2. Install the MagiskHide Props Config module and replace the device’s fingerprint.
  3. Use alternative versions of applications (for example, SberBank Online Lite).

8 Frequently Asked Questions

Can I close root without losing data?
Yes, if you use the Magisk removal method through the application itself or boot.img firmware through TWRP without formatting the /data partition. However, for a complete return to the drain state (especially when you lock the bootloader), data loss is inevitable.
Will Google Pay work after root is closed?
If SafetyNet is successful (check through YASNAC), Google Pay will work.Some devices may need additional setup via MagiskHide Props Config to mask the status of the bootloader.
Can I re-unblock the bootloader after blocking?
Yes, but you have to go through the whole process again: linking your Mi Account, waiting 7-168 hours (depending on the model), using the Mi Unlock Tool. On new devices (2023+ years), the wait can be up to 360 hours.
Why did the root phone slow down after the root shutdown?
This may be due to the remnants of modified system files or improperly stitched boot.img. Try flashing the full stock firmware through the Mi Flash Tool in clean all mode (without locking the bootloader).
How to check if the bootloader is blocked after all the manipulations?
Turn off your phone and boot to Fastboot (Power + Vol-). Connect to your PC and execute the command: fastboot oem device-info If the answer Device unlocked: false - the bootloader is blocked.