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:
- Open the Magisk app (if itโs hidden, find it through an app search).
- Go to the Modules section and deactivate all installed modules (if any).
- Return to the home screen and click Uninstall โ Complete Uninstall.
- 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:
suIf 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:
- Unpack the archive with the firmware in the folder with fastboot (for example, C:\platform-tools\).
- Download the phone to fastboot mode: adb reboot bootloader Or manually: turn off the phone and pinch Power + Volume down.
- Connect your phone to your PC and check the connection: fastboot devices (should display the serial number of the device).
- 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?
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:
- Swipe stock MIUI through fastboot (as in the previous section).
- Download the Mi Flash Tool from the official website.
- Download the phone to fastboot and connect to the PC.
- 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 telephone | Root removal method | Loss of data | Rebuilding OTA |
|---|---|---|---|
| Magisk on stock MIUI | Deactivation through the application | โ No. | โ Yes. |
| Magisk + TWRP | Removal via TWRP | โ Yes, if Format Data) | โ No (you need to block the bootloader) |
| Custom firmware | Firmware runoff through fastboot | โ Yes. | โ No (you need to block the bootloader) |
| Unlocked bootloader | Firmware + 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.