How to completely close root access on Xiaomi: 5 proven ways

Getting root rights on Xiaomi smartphones opens up a lot of opportunities for customization, but users often face the need to return the device to its original state, the reasons are different, from problems with banking applications (SafetyNet) to preparation for sale or warranty repair. However, simply removing SuperSU or Magisk is not enough – the system retains traces of modifications, which can lead to a lockdown. OTA-updates or failures.

In this article, we will discuss all the current ways to close root access on Xiaomi, Redmi and POCO devices (including models from 2023-2026 based on MIUI 14/15 and HyperOS). Particular attention will be paid to the nuances: what to do if after removing Magisk remains boot.img with a patch, how to get around the Anti-Rollback error, and why you sometimes need a complete firmware reflash through Fastboot.

Why not just remove Magisk or SuperSU

Many users mistakenly believe that uninstalling a root rights management application (Magisk Manager or SuperSU) completely shuts down access.

  • πŸ”Ή Modified boot section: even after deleting the Magisk file boot.img It remains modified, as detected by banking apps and Google Pay.
  • πŸ”Ή Flags in the bootloader: some Xiaomi models (e.g. Redmi Note 10 Pro or the Redmi Note 10 Pro) POCO F3) Keep the bootloader unlock label in aboot.
  • πŸ”Ή Residual files: in folders /data/adb or /system/xbin Binary files can remain (su, busybox).
  • πŸ”Ή Lockdown OTA: The system refuses to install official updates if it detects a hash discrepancy in the boot partition.

Moreover, on Anti-Rollback Protection (ARB) devices, trying to return stock firmware via Fastboot without considering the ARB version can result in a smartphone β€œbrick” (inoperability), for example, if you flashed MIUI 13 on Xiaomi 11T and then try to roll back to MIUI 12.5, the device will lock with an Anti 4 error.

πŸ“Š Have you ever received root rights on your Xiaomi?
Yes, I am actively using it.
Yeah, but then I closed the door.
No, but I'm planning.
No, and no planning.

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

If you’ve used Magisk to get root rights, the cleanest way to close them is to use the Uninstall feature in the app itself, which is suitable for most Xiaomi models on MIUI 12-15 and HyperOS if:

  • πŸ“± The device loads normally (no bootloop).
  • πŸ”“ Bootloader unlocked.
  • πŸ“ Magisk Manager is installed (version 25.2)+).

Step-by-step:

  1. Open Magisk Manager and go to Settings β†’ Delete Magisk.
  2. Select the option "Full Uninstall".
  3. Confirm the action and wait for the reboot.
  4. After the reboot, check root status through the Root Checker app or the command in ADB: adb shell su If access is closed, you will see a message Permission denied.

β˜‘οΈ Preparing for the removal of Magisk

Done: 0 / 4

What if Magisk is not removed?

If you have root access after "complete removal," then the modified boot.img is still active.

  1. Download the stock boot image for your model from the Xiaomi Firmware Updater website.
  2. Fastboot: Fastboot Flash Boot stock_boot.img fastboot reboot

πŸ’‘

If your banking apps stop working after you delete Magisk, clear the Google Play Services data and restart your phone.This will reset the SafetyNet cache.

Method 2: Reset via TWRP (for power users)

If you installed root through the custom TWRP recavator, then you will need to completely close access:

  1. Load to TWRP (hold Power + Volume up when turned on).
  2. Go to Wipe β†’ Format Data and enter Yes for a full reset.
  3. Install the stock firmware via Install (select the.zip file with the official software).
  4. Fastboot: Fastboot Flash Recovery stock_recovery.img

Important! On some models (POCO X3 Pro, Redmi K40) after resetting through TWRP, the IMEI may disappear. To avoid this, make a backup of the nvram partition before formatting:

adb pull /dev/block/bootdevice/by-name/nvram nvram_backup.img
What happens if you don't bring back the stock recap?
Without stock recovery, you will not be able to install OTA-The system will give an error "Can't verify update" when you try to update through Settings.

Method 3: Complete Fastboot Firmware (100% result)

This is the most reliable method that guarantees root access and returns the device to the factory state, suitable for all Xiaomi models, including those where other methods have failed.

Instructions:

  1. Download the Fastboot stock firmware for your model from Xiaomi’s official website (choose the Stable version, not the Developer version).
  2. Unpack the archive in a folder with the Mi Flash Tool.
  3. Download the phone to Fastboot (Power + Volume Down) mode.
  4. Connect the device to your PC and start the Mi Flash Tool.
  5. Select a firmware folder and press Refresh. The device must be determined.
  6. At the bottom, select the option β€œClean all and lock” (this will block the bootloader and delete all data!).
  7. Press Flash and wait until it is completed (the process will take 5-10 minutes).

Anti-Rollback warning:

On devices with ARB (For example, Xiaomi 12, Redmi Note 11) you can not flash the version of software older than the one installed now. ARB fastboot:

fastboot getvar anti

If you try to make a firmware with a lower ARB, The device is locked with an anti error [X]. In this case, only the firmware through EDL-Mode (requires an authorized Xiaomi account).

πŸ’‘

Use the "Clean all and lock" option in the Mi Flash Tool only if you plan to sell or carry your phone to the service. After this operation, the bootloader will lock, and you will need to wait 7-14 days to re-unblock.

Method 4: Closing root without unlocking bootloader (for locked devices)

If the bootloader on your Xiaomi is blocked, but root access somehow appeared (for example, through a vulnerability or a temporary exploit), then standard methods will not work.

  1. Install Magisk Manager and try Uninstall (sometimes it works even on a locked bootloader).
  2. If it doesn’t work, run a patched boot image with remote root through Fastboot (no unlock!): fastboot flash boot patched_boot.img fastboot reboot Where patched_boot.img β€” it's stocky boot.img, signature-bypassing.
  3. For models on MediaTek (e.g. Redmi 9A), you can use the SP Flash Tool utility with the Download Only option.

Limitations:

  • ⚠️ On devices with Qualcomm (for example, POCO X3 NFC) Fastboot firmware without unlocking bootloader will lead to an error FAILED (remote: 'Flashing is not allowed').
  • ⚠️ Some banking applications (e.g. Sberbank Online) may continue to Detect root because of the remaining artifacts in the Internet. /data.

Method 5: Check the status of root and bootloader after closing

To make sure root access is completely closed, perform the following checks:

Method of verificationExpected outputWhat to do if it doesn't work
Root Checker (annex)"Root access: No"Repeat deleting Magisk or flash the stock boot.img.
Team at ADB:adb shell su"Permission denied"Check for /system/xbin/su and manually delete it.
SafetyNet (via Magisk or Play Integrity API)"ctsProfile: true"Clear the data from Google Play Services or use the Universal SafetyNet Fix module.
Bootloader:fastboot oem device-info status"Device unlocked: false"If true, lock the bootloader through the Mi Flash Tool.

Additional check for banking applications:

Some applications (such as Tinkoff or VTB Online) use their own Detection root mechanisms to deceive them:

  1. Remove all root-related apps (Magisk, BusyBox).
  2. Clear the cache and data of Google Play Services.
  3. Restart your phone and check the banking application.

πŸ’‘

If the banking application still doesn’t work, try hiding root through the Magisk MagiskHide Props Config module (even after removing Magisk, some traces may remain in the system properties).

Frequent mistakes and their solutions

When closing root-access users often face the following problems:

⚠️ Note: If the phone does not turn on after firmware through Fastboot (black screen or stuck on the logo) MI), Don't panic. Connect the device to your PC and see if it's defined by fastboot devices. If so, repeat the firmware with the Clean all option. If not, you'll need firmware through the fastboot devices. EDL (Requires authorization from Xiaomi).

  • πŸ”΄ The "Anti" mistake 3/4/5": Solution is to flash the firmware with the same or more recent version. ARB.
  • πŸ”΄ "Invalid sparse file" in Mi Flash Tool: download the firmware again (possibly the archive is damaged).
  • πŸ”΄ Bootloop after removing Magisk: stitch stock boot.img manually via Fastboot.
  • πŸ”΄ Touch does not work after firmware: this is typical for some models (POCO F1). Solution - flash firmware marked "for touch issue".

Special case: Xiaomi with MediaTek processor

On devices with MediaTek chips (e.g. Redmi 10A, POCO C31), root closure has the nuances:

  • Use the SP Flash Tool instead of the Mi Flash Tool.
  • Before firmware, be sure to make a backup NVRAM (otherwise you will lose IMEI).
  • If there is no network after firmware, restore NVRAM via MTK Client.

FAQ: Answers to Frequent Questions

Can I close root without losing data?
Yes, but only if you've used Magisk and delete it through the built-in "Uninstall" option. Otherwise (fastboot or TWRP firmware) the data will be erased.
Why Google Pay is not working after Magisk is removed?
Google Pay and other apps with SafetyNet check not only the root, but also the integrity of the boot partition. If you just removed Magisk but boot.img remained modified, SafetyNet will fail, the solution is to flash the stock boot.img or use the Universal SafetyNet Fix module (if you still need the root).
How to close root on Xiaomi with a blocked bootloader?
If the bootloader is blocked and root somehow appears (for example, through an exploit), then standard methods will not work. boot.img Fastboot (sometimes on older models) and use utilities like MTK Bypass (for MediaTek) or Qualcomm Firehose (for Snapdragon) Contact the service center - they can flash the device through the device. EDL unlockless.
What if the root phone doesn’t turn on after closing?
There was probably a firmware error (wrong version, malfunctioning in the process). Solutions: Try flashing the device over Fastboot with the Clean all option. If the phone is not identified in Fastboot, transfer it to Fastboot. EDL-Mode (close testpoints or use the command adb reboot edl). EDL You will need an authorized Xiaomi account (you can find paid services like XiaomiTool). V2).
How to check if the bootloader is blocked after all the manipulations?
Follow the command in Fastboot: fastboot oem device-info Search for lines: Device unlocked: false - bootloader locked. Device unlocked: true - bootloader unlocked. If bootloader unlocked but you want to lock it, use the Clean all and lock option in the Mi Flash Tool.