How to completely remove root rights from Android to Xiaomi: 4 proven ways

Removing root rights on Xiaomi smartphones is a procedure that can be required for a variety of reasons, from restoring warranty to resolving security issues or MIUI updates. However, improper actions lead to a device β€œbrick”, data loss or bootloader lock. In this article, we will discuss all the current methods of removing root access, from a standard rollback through Magisk to a complete firmware reset via Fastboot.

Features of Xiaomi, Redmi and POCO is to bind root rights to a modified loader and custom recaveri (for example, TWRP). This means that simply removing a SuperSU or Magisk Manager application will not return the device to a stock state. MIUI, loader status and type of installed root.

Before you start, answer 3 key questions:

  • πŸ”Ή What type of root rights do you have? (Magisk, SuperSU or Custom Core?)
  • πŸ”Ή The bootloader is officially unlocked through the Mi Unlock Tool?
  • πŸ”Ή Do you need to save your data or are you ready for a complete reset?
πŸ“Š What kind of rooting method did you use?
Magisk
SuperSU
Brush firmware (LineageOS, PixelExperience)
I don't know.
Other

1.Preparation for Root Rights Removal: What to Do Before Starting

Incorrect preparation is the main reason Xiaomi devices get β€œbricked” when removing the root.

Download the original firmware for your model from [miui.com](https://miui.com)

Check the MIUI version in Settings β†’ About Phone β†’ MIUI version

Backup your data (photos, contacts, SMS) via Mi Cloud or Google Drive

Charge your phone at least 60% (optimally 80%)

Install Xiaomi drivers ADB/Fastboot Tools on PC-->

Pay special attention to firmware versions. For example, if your Redmi Note 10 Pro runs MIUI 14 and you download the firmware for MIUI 13, once you have firmware, the device may become stuck with the logo or lose network. Use only stable firmware versions (marked "Stable"), avoid beta versions (e.g., "23.4.17 Beta").

If you have installed a root through Magisk, check the status of the modules:

  1. Open Magisk Manager.
  2. Go to the Modules tab.
  3. Remove all active modules (e.g. Riru, LSposed) as they may conflict with the removal process.
What happens if you don’t remove Magisk modules before resetting?
Modules such as XiaomiEU or ViPER4Android, When forced-remove the root without disabling them, you will get: - Persistent bootloop errors (cyclic reboot). - Loss of sound or network (if the modules affected) audio_policy - Inability to flash stock recavers through Fastboot due to modified partitions /vendor or /system.

2. Method 1: Delete root rights through Magisk (without data loss)

This is the safest way if you’ve used Magisk to get root access.It’s suitable for most Xiaomi models (including the POCO F3, Redmi K40, Mi 11) and doesn’t require you to unlock the bootloader again.

Algorithm of action:

  1. Open Magisk Manager (if the application is hidden, search for it or rename the folder to /data/adb/magisk).
  2. Go to the Settings section (cog in the upper right corner).
  3. Select the complete removal of Magisk (Complete Uninstall).
  4. Confirm the action and wait for the reboot.

After the reboot, check the root rights status with the Root Checker app. If the app shows the message Root access is not properly installed, the procedure was successful. However, this method does not restore the stock recavers or block the bootloader. For a full return to the factory state, go to Method 3.

fastboot flash boot stock_boot.img


fastboot reboot

File. stock_boot.img You can get it from the original firmware. MIUI archivist.-->

Method 2: Removal via TWRP (for custom firmware)

If you used TWRP to install root rights or custom firmware (like LineageOS, PixelExperience), simply removing Magisk won’t help.

  1. Reboot to TWRP (press Power + Volume up when the phone is off).
  2. Go to Advanced β†’ File Manager.
  3. Delete folders: /data/adb/magisk /data/adb/ksu (if KernelSU was used) /data/adb/modules (Magisk modules)

Wipe β†’ Format Data

Install β†’ Select Image

.zip

Important: Once you have the stock MIUI firmware running through TWRP, you'll need to manually flash the stock Recovery, otherwise the device will get stuck on the boot.

fastboot flash recovery stock_recovery.img


fastboot reboot

πŸ’‘

Formatting /data in TWRP removes encryption. If you forget the screen lock password, it will help to reset it, but all data will be lost irretrievably.

4. Method 3: Complete Fastboot reset (100% clean)

This method is guaranteed to remove all traces of root rights, return the stock Recovery and lock the bootloader (if it has been officially unlocked).

  • πŸ”Ή Not loaded after unsuccessful root removal.
  • πŸ”Ή Have damaged system partitions.
  • πŸ”Ή Requires recovery for warranty repairs.

Step-by-step:

  1. Download the full Fastboot firmware for your model from the official Xiaomi website (file with the extension.tgz or.zip).
  2. Unpack the archive in a folder on your PC (e.g., C:\MIUI\).
  3. Connect your phone to your PC in Fastboot mode (clip Power + Volume down).
  4. Launch the file. flash_all.bat (for Windows or flash_all.sh (for Linux/Mac).
  5. Wait for the process to be completed (about 5-10 minutes) and the phone will reboot automatically.

If after firmware device got stuck on the MI logo, perform a hard reset:

  1. Press Power + Volume up for 10 seconds.
  2. From the recovery menu, select Wipe Data β†’ Wipe All Data.
  3. Confirm the action and wait for the reboot.

- Have you installed Xiaomi ADB/Fastboot drivers?

- Is the original used? USB-cable (not all cables support data transmission).

- Is debugging mode on USB In Settings β†’ Developers (if the phone is still on).-->

5. Method 4: Removal of root rights via MIUI (for some models)

Some versions of MIUI (starting with MIUI 12.5) have a built-in root-right reset feature, which only works if:

  • πŸ”Ή The root was obtained through official bootloader unlocking (not through exploits).
  • πŸ”Ή The device does not have a custom recaveri (TWRP).
  • πŸ”Ή Version. MIUI Not modified (e.g. not Xiaomi.EU).

Instructions:

  1. Go to Settings. β†’ The phone.
  2. Click on the MIUI version 7 times to activate the developer mode.
  3. Back to Settings β†’ Additionally. β†’ For developers.
  4. Find the option Remove Root Access and confirm the action.

This method does not work on devices with a locked bootloader after rooting through exploits (e.g. DirtyCOW or CVE-2023-21036).

6. Checking the result: how to make sure that the root is removed

Simply not having Magisk Manager does not guarantee complete removal of root rights.

Method of verificationWhat do you do?Expected output
Root CheckerInstall the app from Google Play and run the check.Root access is not properly installed.
ADB TerminalConnect your phone to your PC and execute the command: adb shell suError: permission denied or su: not found.
Checking the loaderEnter the terminal: fastboot oem device-infoDevice unlocked: false (if the bootloader is locked)
Security scannerUse Malwarebytes or 360 Security to search for residual files.No warnings about modified firmware.

If at least one of the tests shows root rights, repeat the deletion procedure or use Method 3 for a complete reset.

adb shell md5sum /system/bin/su

If a file exists, its hash must not match the known hashes of Magisk or SuperSU.-->

7. Frequent errors and their solutions

Even when following instructions, users face problems.-5 errors and ways of correcting them:

  • 🚨 Error "Invalid sparse file format at header magic" when running through Fastboot: Cause: corrupted firmware file. Solution: re-download the firmware and check its checksum (MD5 or SHA-1).
  • 🚨 The phone is stuck on the logo. MI After the firmware: The reason: the conflict between the stock boot.img And a modified kernel. Solution: boot.img manually via Fastboot.
  • 🚨 the network is not working or IMEI after removal of the root: Cause: damaged section /persist or /nvram. Solution: Restore IMEI through QCN-file (requires a backup copy).
  • 🚨 Mi Unlock Tool does not block the bootloader: Reason: the waiting period has expired (72-168 hours after unlocking). Solution: wait or use the Fastboot command: fastboot oem lock ⚠️ Note: Blocking a bootloader via Fastboot without the official Mi Unlock tool can cause data loss on Anti-Rollback devices (e.g., Redmi Note 9 Pro, POCO X3 NFC).
  • 🚨 Apps like Netflix or Netflix PokΓ©mon GO Failure to work: Reason: Residual traces of Magisk Hide or modified boot.img. Solution: Swipe stock boot and perform reset via Wipe Data.

πŸ’‘

On devices with a MediaTek chip (e.g. Redmi 9A, POCO C31) it may be necessary to run the root completely through the SP Flash Tool instead of the Fastboot.

FAQ: Answers to Frequent Questions

Can Root Rights Be Deleted Without Losing Data?
Yes, but only if you have used Magisk and have not modified the system partitions (e.g., have not installed the custom kernel) in which case it is enough to completely remove Magisk through the application (see Method 1).
Why does the phone not pass SafetyNet after removing the root?
The reason is residual traces of modifications (for example, modified boot.img or active Magisk modules). To fix: Sweep stock boot.img through Fastboot. Remove /data/adb folder manually via TWRP. Check SafetyNet status through the YASNAC application. If the problem remains, perhaps the device has a custom or vendor system installed, in which case only complete flashing will help.
How to remove the root on Xiaomi with a blocked bootloader?
If the bootloader was blocked after obtaining the root rights (for example, through an exploit), the standard methods will not work. You will need: Unlock the bootloader officially through the Mi Unlock Tool (reference to the Mi Account is mandatory!). Lock the bootloader via fastboot oem lock (only for devices without Anti-Rollback!). ⚠️ Note: On models with anti-Rollback (e.g. Mi) 10T, Redmi K30 Pro: Locking the bootloader after the root will result in a complete loss of performance (hard brick.
Will it work? OTA-update?
Yes, but only if: You have completely removed it. Magisk/SuperSU And they rebuilt the stock recaps (/system, /vendor) The bootloader is locked (for Anti-Rollback devices) if the root is removed. OTA-Update is not installed, run the new version MIUI manually via Fastboot.
Can I return the warranty after removing the root?
Technically, yes, but Xiaomi can refuse warranty repairs if: The bootloader was unblocked informally (through exploits). The device has traces of modifications (for example, modified build.prop). POCO F2 Pro with non-removable battery. For maximum camouflage: Sweat the stock firmware through the Fastboot. Lock the bootloader through the Mi Unlock Tool. Reset the unlock counter (on some models, this can be done via fastboot oem). clean_all).