Xiaomi Mi 9 SE With an unlocked bootloader and root rights, the user has unlimited customization options, but often the need to return the device to a factory state. OTA-But simply removing Magisk or rolling back the firmware is not enough β residual root access traces can cause system failures.
In this article, we will discuss three officially supported methods for completely disabling root on Mi 9 SE (codename grus), including the nuances of working with TWRP, Fastboot and Xiaomi standard tools. We will focus on typical errors, such as bootloop after incorrect removal of Magisk, and how to fix them. All instructions are relevant for firmware based on MIUI 12-14 and Android 10-12.
Why canβt you just delete Magisk through your settings?
Many users mistakenly believe that just clicking βUninstallβ on the Magisk Manager menu will disappear, and in practice this only works partially:
- πΉ Modified files remain in the section /system, blockage OTA-update.
- πΉ V boot.img patches are saved that anticheats (for example, in games) recognize as root.
- πΉ SafetyNet and Play Integrity API Errors continue to be issued even if MagiskHide is activated.
- πΉ When selling a phone, the new owner may face problems when trying to block the bootloader.
Moreover, on the Mi 9 SE with Unlocked Bootloader, even after removing Magisk, it remains possible to re-enter the root rights without further manipulation, posing security risks if the device falls into the wrong hands.
Method 1: Remove root through Magisk (the safest way)
If your Mi 9 SE is stable and Magisk is installed correctly, start with this method.It saves user data and minimizes the risks of bootloop.
βοΈ Preparing for the removal of Magisk
Steps to complete removal:
- Open Magisk Manager and go to Settings β Uninstall.
- Select the option Complete Uninstall.This will remove Magisk and restore the original boot.img.
- After the reboot, check the root access status through the Root Checker app or the command in Terminal: su If the command returns Permission denied, the root is disabled.
β οΈ If after removing Magisk phone is stuck on the logo Xiaomi (bootloop), then modified boot.img The solution is to flash the original boot through Fastboot (see Method). 3).
π‘
Before removing Magisk, disable all modules in the Modules section β this will reduce the chance of conflicts when restoring boot.img.
Method 2: Recoil through TWRP (for power users)
If Magisk is not removed correctly or you want to return stock recovery, you will need TWRP. This method is suitable for firmware with modified recovery, but requires caution - errors can lead to data loss.
Download the official firmware for Mi 9 SE (grus code) from Xiaomi Firmware. It is important to choose the version that matches your current firmware (check in Settings β About Phone β MIUI version).
- π₯ For MIUI 12-14 Fastboot firmware (.tgz file) is suitable).
- π₯ For Android 10-12, check compatibility in the table below.
| MIUI version | Android | Compatibility with TWRP | Recommended method |
|---|---|---|---|
| MIUI 12.0β12.5 | Android 10 | Yes (TWRP 3.5.2+) | Firmware through TWRP |
| MIUI 13.0 | Android 11 | Partially (bootloop risk) | Fastboot (Method 3) |
| MIUI 14.0 | Android 12 | No (patch required) | Fastboot or EDL |
Instructions for TWRP:
- Download the firmware and place it in the root of the phoneβs memory (not in folders!).
- Boot to TWRP (hold Power + Volume up when turned on).
- Select Wipe β Format Data (this will delete all data!), then go back to the main menu.
- Press Install, select a firmware file and confirm the installation.
- After you complete the search, swipe Magisk-uninstaller.zip (if any) and restart.
β οΈ Attention: MIUI 14 use of TWRP If you don't have a patch, you can encrypt your data and you can't download it, and if you're running your phone, you need a password, and you didn't set it, you'll need a full Fastboot reset.
Method 3: Complete Fastboot reset (guaranteed result)
This is the most reliable way to return the Mi 9 SE to the factory state, but it requires an unlocked bootloader and erases all data.
- π§ Phone not loaded after Magisk is removed.
- π§ You need to return the warranty (but remember: unlocked bootloader remains in the Xiaomi logs).
- π§ SafetyNet continues to issue errors even after root rights are removed.
You will need to:
- π₯οΈ Computer with installed ADB/Fastboot and Xiaomi drivers.
- π Official Fastboot Firmware for Grus (download from the official website).
- π Cable USB Type-C (preferably original).
Step-by-step:
- Unpack the firmware in a folder on your computer. flash_all.bat (for Windows or flash_all.sh (for Linux/Mac).
- Turn off the phone and press Power + Volume down to log into the Fastboot.
- Connect your phone to your PC and start it. flash_all.bat. The process will take 5β10 minute.
- Once complete, the phone will automatically restart. The first turn on can take up to 15 minutes.
Important: This method does not block the bootloader!To completely hide the traces of unlocking, you will need an official procedure through the Mi Unlock Tool, but it is only available for accounts with a phone link over 30 days.
What if Fastboot canβt see the phone?
Check Out: How to Make Sure that Root is Completely Deleted
Even after successfully removing Magisk or running a firmware through Fastboot, residual traces can remain.
- Root Checker: Install the app from the Play Market and run the check. If Root access: Not available status is completed, the first step is passed.
- SafetyNet: Use the YASNAC app or type in Terminal: su -c "getprop ro.boot.verifiedbootstate" The correct answer is green (if orange - traces of the root are left).
- Play Integrity API: Take the test at playintegrityapi.com. The ctsProfileMatch setting must be true.
- Logs of the bootloader: On the Mi 9 SE, even after the reset, there is an unlock record in the logs. Check through ADB: adb shell getprop ro.boot.veritymode If the response is enforcing - the bootloader is blocked (but this does not guarantee the absence of traces of the root).
If at least one of the tests shows the presence of root rights, repeat the deletion procedure or use Method 3 (Fastboot).
π‘
The only way to completely hide the fact of unlocking the bootloader is to officially lock it through the Mi Unlock Tool. However, this is only possible if you meet the terms of Xiaomi (account binding, wait 30+ days).
Typical errors and their solutions
When disabling root on Mi 9 SE, users often face the following problems:
| Mistake. | Reason. | Decision |
|---|---|---|
| Bootloop after removing Magisk | Incompatibility of patched boot.img with current firmware | Sweep the original boot.img through Fastboot: fastboot flash boot.img |
| Error E: Unknown command [log] in TWRP | An outdated version of TWRP | Update TWRP to 3.6.0+ or use Fastboot |
| SafetyNet does not pass (ctsProfile: false) | Residual modifications to /system or /vendor | Complete reset via Fastboot (Method 3) |
| The phone does not turn on after the firmware | The modem or dtbo partition is damaged | Swipe the full Fastboot firmware with the flag --erase: fastboot flashall -w |
If none of the methods worked, it is possible that the phone has custom firmware installed (for example, LineageOS or Pixel Experience). MIUI only through EDL-Mode (requires an authorized Xiaomi account and a special cable).