Getting root rights to Xiaomi opens up access to hidden system functions, but often leads to problems ranging from the failure of banking applications to the loss of warranty. If you decide to return the smartphone to its original state - for example, to sell, update firmware or restore Google Pay - it is important to properly disable root rights to avoid soft breeze or download errors.
In this article, we will discuss all the current root removal methods on Xiaomi, Redmi and POCO devices (including the 2023-2026 models on MIUI 14/15 and HyperOS).
- ๐ Remove root through Magisk (the safest method)
- ๐ฑ Return stock recovery if you have installed TWRP
- ๐ง Reset the Orange State counter (to unlock the bootloader)
- ๐ ๏ธ Restore the guarantee after the rollback of superuser rights
Before you start, check which root type you have activated. Go to the Magisk app (if installed) or run a command in the terminal:
suIf the terminal is sending out a # instead of $, the root is active. If the command is not recognized, the permissions have already been disabled or deleted incorrectly.
1. root removal via Magisk (recommended method)
If you get root with Magisk (the most popular method for Xiaomi), the rollback will take no more than 5 minutes, which is suitable for most devices, including the Xiaomi 13/14, Redmi Note 12 and POCO F5.
Note: Before deleting, back up your data via MIUI Backup or Titanium Backup. Deleting Magisk doesn't affect user files, but resetting to factory settings (if necessary) erases everything.
- Open the Magisk app (if not, download the latest version from the official GitHub).
- Go to the Settings section (โ๏ธ) โ Delete Magisk (Uninstall).
- Select Complete Uninstall and confirm the action.
- After the reboot, check the root status with the su command in the terminal - must return the error.
If the phone does not boot or freezes on the MI logo after removing Magisk, the system files have been changed, in which case you will need to flash the stock firmware (see section 4).
โ๏ธ Preparing for the removal of Magisk
2. rollback via TWRP (if custom recovery is installed)
If you installed root through TWRP, simply removing Magisk might not work, and you'll still have traces of modifications in the system, so you'll need to return the stock recovery and flash the original boot.img.
Critical! For Xiaomi devices with a locked bootloader (for example, after an official update), firmware through fastboot can lead to a hard brick.
fastboot oem device-infoIf the answer Device unlocked: false โ the bootloader is blocked, and you can not flash boot.img through fastboot!
โ ๏ธ Note: Some models (e.g. Xiaomi) 12T or Redmi K50) flash-stitch boot.img This will trigger the anti-rollback โ the phone will need a full flashing through the phone. EDL.
Instructions for devices with unlocked loader:
- Download stock firmware for your model from MIUI Downloads website.
- Remove the boot.img file from the archive (for HyperOS, look in the image folder).
- Reboot your phone to TWRP (hold Power + Volume up).
- In TWRP, select Install โ Install Image and swipe the boot.img download to the Boot section.
- Reboot to the system and check root with the su command.
What if TWRP doesnโt see internal memory?
3. Reset the Orange State counter (to unlock the bootloader)
After removing the root, the Orange State warning may remain on the download screen, meaning that the bootloader is unlocked and the manufacturer (in this case, Xiaomi) considers the device to be modified. To remove this message and return the possibility of official updates, you need to:
- Put your phone in fastboot mode (keep Power + Volume down when turned on).
- Connect the device to the PC and execute the command:
fastboot flashing lockThis command will lock the bootloader, but erase all the data on the phone! Once executed, the device will automatically restart.
If the command fails (it produces a FAILED error), the device has activated anti-rollback protection.
- ๐น Download the latest stock firmware for your model.
- ๐น Fly it through the Mi Flash Tool with the clean all and lock option.
- ๐น Wait 72 hours โ Xiaomi may temporarily block unlock after frequent change in bootloader status.
๐ก
If the phone doesnโt turn on after locking the bootloader, try flashing the firmware through EDL mode using the QFil tool or Mi Flash Pro (an authorized Xiaomi account is required).
4. Complete flashing through the Mi Flash Tool (radical method)
If previous methods have not worked (for example, after unsuccessful experiments with custom firmware), the only reliable option is to flash stock firmware through fastboot. This method is suitable for all Xiaomi models, including the POCO X5, Redmi Note 11 and older devices.
You will need to:
- ๐ฅ๏ธ Windows computer (for Mi Flash Tool).
- ๐ Cable USB (preferably original).
- ๐ฆ Stock firmware in.tgz or.zip format (download only from the official website).
Step-by-step:
- Unpack the firmware archive in a folder without Cyrillic characters (for example, C:\MIUI\).
- Install the Mi Flash Tool and Xiaomi drivers.
- Transfer the phone to fastboot mode and connect to the PC.
- In the Mi Flash Tool, click Select and specify the path to the firmware folder.
- Select the clean all mode (erase data) or clean all and lock mode (erase data and block the bootloader).
- Press Flash and wait until it is completed (usually 5-10 minutes).
| Firmware mode | What's he doing? | When to use |
|---|---|---|
| clean all | Deletes all data, flashes the system | If you just need to return the stock firmware |
| clean all and lock | Deletes data + blocks the loader | To restore warranty or remove Orange State |
| save user data | Switching the system without deleting files | Only if you are sure that the modifications did not affect /data |
โ ๏ธ Note: Firmware via the Mi Flash Tool on HyperOS devices (e.g. Xiaomi 14) may require authorization of your Xiaomi account. If the tool gives you a flash authorization failed error, link the device to your account in the Mi Unlock Status settings.
5. Verification of success of root removal
After you do any of these things, you need to make sure that the root rights are actually disabled.
- Check through the terminal: Open the Terminal app (or ADB Shell) and type in:
suIf a message appears Permission denied or command not found, root is deleted.
- App Check: Install Root Checker from Google Play. If the app shows Root access: Not available, it's okay.
- SafetyNet Check: Run at the terminal:
su -c "getprop ro.boot.verifiedbootstate"If the answer is orange, the bootloader is unlocked, green is blocked.
Also check the critical applications:
- ๐ณ Google Pay, SberPay โ should be launched without errors.
- ๐ฆ Banking applications (SberBank, Tinkoff) โ do not issue warnings about the rut.
- ๐ฎ Protected games (e.g., games, Pokรฉmon GO) โ work without restrictions.
๐ก
If the banking apps still don't work after you remove root, clear the Google Play Services data and restart the phone, sometimes taking up to 24 hours to reset the SafetyNet flag.
6. Restoration of warranty after root removal
Even after the root is completely removed, the manufacturer may refuse warranty repairs if:
- ๐ง The service menu (#4636##) has traces of modifications.
- ๐ฑ bootloader unlocked (checked through fastboot oem device-info).
- ๐ There is an unofficial firmware installed on the device.
To maximize the chances of warranty service:
- Swipe stock firmware through the Mi Flash Tool with the clean all and lock option.
- Reset the counters of modifications (if any) through fastboot:
fastboot erase avb_custom_key
fastboot erase userdata- Do not update the firmware manually โ wait OTA-updates through settings.
- Before visiting the service center, reset to factory settings (Settings โ About phone โ Reset settings).
If the service center refuses to accept the device under warranty, request an official opinion on the reason for the refusal. In some cases, it helps to contact Xiaomi with evidence of a return to stock firmware (screenshots of fastboot and Mi Flash Tool).