How to completely remove the root on Xiaomi: 4 proven ways and consequences

Removing root rights on Xiaomi smartphones is a procedure that can be required for many reasons, from restoring warranty to fixing system failures. However, incorrect actions often lead to a device โ€œbrickโ€ or data loss. In this article, we will discuss all the current ways to remove the root, taking into account the features of the firmware MIUI and HyperOS, and explain why some methods work only on certain models.

It's important to understand that the process of removing a root is not just about clicking the "Cancel" button, it involves unlocking the bootloader, installing a stock firmware, and sometimes even manually deleting superuser files. We will describe each step in detail, specify the critical moments at which the device can turn into a "brick", and give recommendations for recovery after unsuccessful attempts.

Why you might need to remove root rights on Xiaomi

The main reasons why users decide to get rid of the root:

  • ๐Ÿ”„ Firmware update: many OTA-Updates are blocked on devices with root due to modified system files.
  • ๐Ÿ›ก๏ธ Restoration of warranty: Xiaomi service centers refuse to repair under warranty if modifications are detected.
  • ๐Ÿž System Errors: An improperly installed root can cause lags, reboots, or application problems (e.g., a ban in banking services).
  • ๐Ÿ“ฑ Selling the device: The new owner may not know how to handle a rooted smartphone, which is fraught with problems.

In addition, some apps (such as Google Pay, Netflix, or Denuvo-enabled games) refuse to work on devices with root due to security policies, in which case removing the rights of the superuser becomes the only solution.

๐Ÿ“Š Why you are removing root rights on Xiaomi?
Firmware update
Restoration of the guarantee
Systemic errors
Selling the device
Other

Preparing for root removal: what to do in advance

Before starting the procedure, be sure to follow the following steps:

โ˜‘๏ธ Preparation for root removal

Done: 0 / 5

Pay special attention to backup. Root removal is often accompanied by factory reset, so:

  • ๐Ÿ“ Save photos, contacts and files to the cloud (Google Drive, Mi Cloud) or PC.
  • ๐Ÿ”‘ Export. SMS and a call log using apps like SMS Backup & Restore.
  • ๐ŸŽฎ Move save games (for example, through Helium or manual folder copying) /Android/obb/ and /Android/data/).

โš ๏ธ Note: If you used Magisk to mask the root (MagiskHide option), turn it off in the module settings before removing it. Otherwise, the stock firmware may install with errors.

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

If the root rights were obtained with Magisk, they can be removed directly from the application without full flashing, a method that is suitable for most Xiaomi, Redmi and POCO models on MIUI 12-14 and HyperOS.

Instructions:

  1. Open the Magisk Manager app (if itโ€™s hidden, find it in the app menu or through 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 the status of the root using the Root Checker app. If the superuser rights are retained, try an alternative method:

1. Install the "Magisk Uninstaller" module via Magisk Manager.


2.Reboot to recovery (turn off the phone, then press Power + Volume up).




3. In recovery, select Install โ†’ specify the path to the file Magisk-uninstaller.zip โ†’ Swipe to confirm.

โš ๏ธ Note: Some HyperOS firmware (e.g., Xiaomi) 13/14) Magisk may not be removed completely due to integrated protection MIUI Optimization. In this case, you'll need a complete flashing.

๐Ÿ’ก

If the phone is stuck on the logo after removing Magisk, press Power + Volume up for 10-15 seconds to force a reboot to fastboot. Then stitch the stock boot through the Mi Flash Tool.

Method 2: Install stock firmware via Mi Flash Tool

This method is suitable for devices where the root was obtained through unlocking the bootloader and installing custom firmware, it is guaranteed to remove all traces of modifications, but requires a connection to a PC.

Step-by-step:

  1. Download the official firmware for your model from the Xiaomi Firmware website. Choose the Stable version (not Developer!) and the region corresponding to your device (e.g. Global or EEA).
  2. Unclose the firmware file (you should get a directory with the.tgz extension or a folder with.img files).
  3. Install the Mi Flash Tool (download here) and ADB/Fastboot drivers.
  4. Turn the phone into Fastboot mode: Turn off the device โ†’ pinch Power + Volume down until the hare appears in the eardress cap.
  5. Connect your smartphone to your PC, open the Mi Flash Tool and point the way to the unpacked firmware.
  6. Select Clean All mode and press Flash.
Firmware modeWhat's he doing?When to use
Clean allDeletes all data, including internal memoryIf you want to return the device to the "factory" state
Clean all and lockClean all + lock the loaderTo restore the warranty (requires authorization of the Mi Account)
Save user dataStores user dataOnly if the root is removed without resetting settings (not recommended)

The firmware process takes 5-15 minutes. Upon completion, the phone will automatically restart. If the device does not turn on after the firmware is installed (black screen or logo getting stuck), repeat the procedure by selecting a different mode (Clean all and lock).

What to do if the Mi Flash Tool gives you a "Couldn't load device" error
The error is due to the lack of drivers or locking the bootloader: 1. Install drivers manually through Device Manager (select "Xiaomi Mi Composite" MDB Interface"). 2. Turn off driver digital signature verification in Windows (via command line: bcdedit) /set nointegritychecks on). 3. Try another one. USB-port (preferably) USB 2.0) cable. 4. If the bootloader is locked, unlock it through the Mi Unlock Tool (requires the Mi Account binding to the device).

Method 3: Root removal through custom recovery (TWRP)

If you have TWRP installed on your device, you can remove the root directly from recovery without having to completely flash it, a method that is suitable for advanced users because it requires working with system partitions.

Instructions:

  1. Download the official ZIP-file to delete the root (for example, SuperSU-uninstaller.zip or Magisk-uninstaller.zip).
  2. Reboot to TWRP (turn off the phone โ†’ pinch Power + Volume up).
  3. V TWRP Choose Install โ†’ indicate downloaded ZIP-file โ†’ Swipe it out for confirmation.
  4. After installation, select Wipe โ†’ Format Data (enter yes for confirmation).
  5. Reboot to the system.

If the root remains after the restart, follow the additional steps:

  • ๐Ÿ”ง Delete the folders. /su, /magisk and the busybox files manually through TWRP File Manager.
  • ๐Ÿ“œ Check the file. /system/build.prop For lines with a mention of the root (for example, ro.secure)=0). If necessary, correct them to ro.secure.=1.

โš ๏ธ Note: On some models (Xiaomi Mi) 11, Redmi Note 10 Pro) TWRP may not see the section /system dynamically partitioned (dynamic_partitions). In this case, use OrangeFox Recovery or reflash through Fastboot.

Method 4: Reset via service codes (for some models)

Some Xiaomi devices support root removal through service commands, a method that doesnโ€™t work on all firmware, but can save time.

Try the following commands (enter the standard Phone app):

#3646633## โ†’ Go to the engineering menu โ†’ Connectivity โ†’ Root Permission โ†’ Disable
##7780## โ†’ Resetting (saves data)
# #7378423## โ†’ Service menu test (some models have the option of resetting the root)

If the commands donโ€™t work, try an alternative:

  1. Install Terminal Emulator from Google Play.
  2. Enter the command: su --install su --uninstall
  3. Reset the device.

This works about 30% of the time and depends on the version of MIUI. On HyperOS, root removal service codes don't usually work.

๐Ÿ’ก

Service codes are the fastest, but the least reliable way, and if you have any root left after you use them, you can go to the firmware methods.

Problems after root removal and their solutions

Even after successful root removal, users often face the following problems:

Problem.Possible causeDecision
Phone not turned on (black screen)Damage to the boot or system partitionSwitch to stock boot.img via fastboot flash boot.img
Hanging on the MIUI/HyperOS logoConflict of remaining root filesRun Wipe Data in Fastboot (fastboot erase userdata)
Error "Device is corrupted" when downloadingDisparity between hash sums of system filesSwipe the full stock firmware through the Mi Flash Tool with a clean all and lock tick
Banking applications are not workingRemains traces of MagiskHide or modified build.propCheck the /system/build.prop file for ro.debuggable=1 strings and delete them

If the device behaves unstable after removing the root (for example, spontaneously restarts), follow the following steps:

  1. Install the Logcat Extreme app and check logs for errors related to sepolicy or selinux.
  2. If you have a mention of avc: denied in your logs, run stock vendor.img through fastboot.
  3. HyperOS models may require a rollback to an older version of MIUI followed by an update via OTA.

FAQ: Frequent questions about removing the root on Xiaomi

Can I remove the root without a computer?
Yes, if the root was installed via Magisk. Use the built-in delete option in the Magisk Manager app. Other methods (like removing SuperSU) will require TWRP, which can also be run without a PC, but with the risk of errors.
Why does the root not work after removal? OTA-update?
This is due to a modified recovery partition or the remaining custom firmware files. Solution: Sweat stock recovery through fastboot flash recovery. recovery.img. Delete the file. /cache/recovery/last_install_reason (If you have one, reset your settings through Settings. โ†’ Additionally. โ†’ Recovery and discharge.
How to check if the root is completely removed?
Use a combination of methods: Install Root Checker from Google Play. Try running a su command in Terminal Emulator (should give you "permission denied"). Check for folders /su, /magisk or /system/bin/su files through a root file manager (if any, root is not completely deleted).
Can I return the warranty after removing the root?
Theoretically, yes, but Xiaomi service centers check not only the presence of the root, but also the status of the bootloader. If it was unlocked, you will need to: Swipe the stock firmware with the Clean all and lock option in the Mi Flash Tool. Link Mi Account to the device (if not done earlier). Check the status of the bootloader by the fastboot oem device-info command (the Device unlocked: false line should be). However, some service centers may refuse warranties if they have records of unlocking the bootloader for your IMEI.
What if after removing the root, the phone turned into a brick?
Follow the recovery algorithm: Try booting into Fastboot (Food) + Volume down. If the device is detected by a PC, run the stock firmware through the Mi Flash Tool. If the Fastboot doesn't work, check if the phone is responsive to charging (light indicator). If so, try Deep Flash Cable. For models with a Qualcomm processor (for example, Redmi Note 9 Pro, POCO X3) can be used EDL-Mode (requires an authorized Xiaomi account). If nothing helps, contact the service center with the problem of "failed firmware update" (do not mention root).