How to remove root access on Xiaomi: 5 proven ways

Getting root rights on Xiaomi, Redmi or smartphones POCO opens up wide opportunities for customization, but often leads to problems: denial of warranty service, errors OTA-If you are faced with the need to return the device to the "factory" state - this instruction will help to completely remove the root without the risk of "bricking".

The process depends on the current state of the phone: whether the bootloader is unlocked, whether the custom firmware is installed (for example, LineageOS or Pixel Experience), or you just activated Magisk on top of the standard MIUI. We will look at all scenarios - from the simplest to the most complex cases with flashing through fastboot.

Important: Root removal does not always restore the possibility of obtaining OTA-Updates โ€“ it depends on the status of the bootloader and the version MIUI. If you unlock the bootloader officially through the Mi Unlock Tool, you will have to block it again (more about this in the last section).

1. Method: Deactivation of Magisk (without deleting files)

If you used Magisk to get root and didnโ€™t make other changes to system partitions, the quickest way is to temporarily disable modules.This wonโ€™t remove root completely, but hides it from most applications (like SberBank Online or Google Pay).

How it works:

  1. Open the Magisk app (if itโ€™s hidden, find it through an app search).
  2. Go to the Modules section and deactivate all installed modules (if any).
  3. Return to the home screen and click Uninstall โ†’ Complete Uninstall.
  4. Confirm the action and restart the phone.

After the reboot, check the root status through the Root Checker app or the command in the terminal:

su

If the command returns a Permission denied error, the root is disabled, but the Magisk system files remain in the /data partition and can be restored later.

๐Ÿ’ก

If your banking apps still donโ€™t work after deactivating Magisk, clear the data and cache of the Google Play Services app in your phone settings.

2. Method: Removing Magisk via TWRP (complete cleaning)

If you installed Magisk through a custom TWRP recavator, you will need to:

Step 1. Download your phone to TWRP mode:

  • ๐Ÿ”„ Turn off the device.
  • ๐Ÿ”˜ Press the power buttons. + Loudness up before the logo appears TWRP.

Step 2. TWRP menu:

  • ๐Ÿ“ Go to Advanced. โ†’ File Manager.
  • ๐Ÿ—‘๏ธ Delete the folder. /data/adb/magisk (if there is).
  • ๐Ÿ”„ Go back to the main menu and select Wipe. โ†’ Format Data (this will delete all user data!).
  • ๐Ÿ’พ Reboot the phone to the system.

โš ๏ธ

Note: Formatting /data will result in a complete loss of photos, messages and installed applications. Pre-backup through TWRP (Backup section) or Mi Cloud.

Download the latest Magisk Uninstaller (zip)| Backup data | Check battery power (minimum 50%) | Connect phone to PC (optional)

-->

3. Method: Flashing through Fastboot (for unlocked bootloader)

If you unlocked the bootloader and installed custom firmware, the only reliable way to get your phone back to stock is to flash the official MIUI through fastboot, which works even if the device doesn't boot.

What you need:

  • ๐Ÿ–ฅ๏ธ Computer with drivers installed ADB/Fastboot (Download from the official Android website).
  • ๐Ÿ“ฑ Official firmware for your model (download only from the Xiaomi website!).
  • ๐Ÿ”Œ Cable USB Type-C (original, undamaged).

Instructions:

  1. Unpack the archive with the firmware in the folder with fastboot (for example, C:\platform-tools\).
  2. Download the phone to fastboot mode: adb reboot bootloader Or manually: turn off the phone and pinch Power + Volume down.
  3. Connect your phone to your PC and check the connection: fastboot devices (should display the serial number of the device).
  4. Start the firmware (for Windows): flash_all.bat For Linux/Mac: chmod +x flash_all.sh./flash_all.sh

The process will take 5-10 minutes. Once complete, the phone will automatically reboot to stock MIUI without rooting or customization.

What if fastboot doesnโ€™t see the device?
If the fastboot device command doesn't show your phone: 1. Check the drivers (install the Mi Flash Tool for automatic installation). 2. Try another one. USB-port USB 2.0). 3. Disable driver signatures in Windows (reboot your PC with Shift key pressed to do this. โ†’ Diagnostics โ†’ Additional parameters โ†’ Loading parameters โ†’ Reboot, then select 7. 4. Use the original Xiaomi cable (cheap cables often don't support fastboot data transfer).

Method: Locking the loader (to return to the drain completely)

If you unlock the bootloader through the Mi Unlock Tool, you must block it again, otherwise:

  • ๐Ÿ“ฑ The phone will show an unlock warning when booting.
  • ๐Ÿ”’ Some features (such as Mi Pay or Widevine) L1 for Netflix HD) may not work.
  • ๐Ÿ”„ OTA-Updates will not be available.

How to block the loader:

  1. Swipe stock MIUI through fastboot (as in the previous section).
  2. Download the Mi Flash Tool from the official website.
  3. Download the phone to fastboot and connect to the PC.
  4. In the Mi Flash Tool, select the firmware folder, tick Clean all and lock and click Flash.

โš ๏ธ

Note: Locking the bootloader erases all data, including internal memory (/data), and after this procedure, you will not be able to re-unlock the bootloader for 7-30 days (depending on Xiaomi policy).

Condition of the telephoneRoot removal methodLoss of dataRebuilding OTA
Magisk on stock MIUIDeactivation through the applicationโŒ No.โœ… Yes.
Magisk + TWRPRemoval via TWRPโœ… Yes, if Format Data)โŒ No (you need to block the bootloader)
Custom firmwareFirmware runoff through fastbootโœ… Yes.โŒ No (you need to block the bootloader)
Unlocked bootloaderFirmware + Locking with Mi Flashโœ… Yes.โœ… Yes.

5. Method: Using Patched Boot (for temporary root hiding)

If you need to temporarily hide root (for example, to pass SafetyNet in a banking application), but not remove it completely, you can use Magisk Delta or Patched Boot.

Instructions:

  • ๐Ÿ“ฑ Install Universal SafetyNet Fix in Magisk.
  • ๐Ÿ”„ Reboot the phone.
  • ๐Ÿ›ก๏ธ Check SafetyNet status through the app YASNAC (It should be ctsprofile: true).

This method is suitable for:

  • ๐Ÿฆ Work with banking applications (SberBank, Tinkoff).
  • ๐ŸŽฎ The game of defense (Genshin Impact, PUBG Mobile).
  • ๐Ÿ“บ Services with DRM (Netflix, Disney+).

Restore warranty | Correct errors after firmware |Unlock banking applications |Sell phone |Another option

-->

6. Frequent errors and their solutions

Problem 1: After removing Magisk, the phone is bootloop (cyclic reboot).

Decision:

  • ๐Ÿ”„ Boot in. TWRP and ask around boot.img stock-stack.
  • ๐Ÿ—‘๏ธ If TWRP No โ€“ run the full run through fastboot.

Problem 2: Mi Flash Tool is an anti-rollback error.

Decision:

  • ๐Ÿ“ฅ Download the firmware of the same version MIUI, What was previously established (or newer).
  • ๐Ÿ”ง If the error persists, use fastboot manually without the Mi Flash Tool.

Problem 3: After locking the bootloader, the phone does not turn on (brick).

Decision:

  • ๐Ÿ”Œ Connect your phone to your PC and check if it is detected in fastboot.
  • ๐Ÿ”„ If yes, repeat the firmware with the clean all tick (without locking).
  • ๐Ÿ› ๏ธ If not, contact the service center (requires a re-solding). EDL-point).

๐Ÿ’ก

If you have to root the phone to stop loading, DO NOT try to sew it through informal tools (like the SP Flash Tool).For Xiaomi devices, this almost always leads to a complete brick. Use only official utilities: Mi Flash Tool or fastboot.

FAQ: Answers to Frequent Questions

Can root be deleted without data loss?
Yes, but only if you used Magisk without modifying the system partitions, in which case it is enough to deactivate Magisk through the application or remove it through TWRP without formatting /data. However, in order to fully return to stock firmware (especially if the bootloader is unlocked), data loss is inevitable.
Will Google Pay work after root removal?
If you completely removed the root and blocked the bootloader, yes, but some banking applications (like SberBank Online) can retain root memory even after it is removed, which can help: Resetting the phone to factory settings, clearing the data of Google Play Services, using the Universal SafetyNet Fix module (if not completely removed).
How to check if the root is completely removed?
Use these methods: Install the Root Checker app from Google Play. Enter the su command in the terminal โ€” if Permission denied, root is removed. Check SafetyNet status through YASNAC (should be ctsProfile: true). Run the banking app โ€” if it works error-free, root successfully hidden or removed.
Can I get it? OTA-Update after root removal?
It depends on the status of the loader: โœ… If the bootloader is locked and stitched official MIUI โ€” OTA will come. โŒ If the bootloader is unlocked โ€” OTA They will not be able to return to the root. OTA, You must block the bootloader through the Mi Flash Tool (see section 4).
What if the root phone is slower after the root is removed?
This is normal if: You have flashed the old version of MIUI (update via the Mi Flash Tool to current). Remain artifacts from custom cores or modules (do a full reset via fastboot). Debugging features are enabled (check in Settings โ†’ For developers, disable Do not turn off screen and debugging via USB). If the brakes remain, reset to factory settings (Settings โ†’ About phone โ†’ Reset).