How to remove TWRP Recovery from Xiaomi phone

Many Xiaomi, Redmi and POCO smartphone owners install custom TWRP environments to enhance the device’s capabilities. However, once experiments are completed or official warranty is required, the question often arises as to how to return everything to its original state.

Incorrect removal can cause the device to stop booting or lose the ability to receive updates over the air. In this article, we will discuss safe methods for replacing recovery with a factory version. You do not need to be an expert, you need to follow the algorithm of actions clearly enough.

Before any partition manipulations are started, you need to back up your data. Even if you're just changing the recovery environment, there's always a risk of losing your personal information. Make sure you have at least 60 percent battery power.

It’s worth noting that on different Xiaomi models, the procedure can have its own nuances related to the Android version and the type of processor. Owners of devices based on Snapdragon and MediaTek use similar, but not identical commands. It is important to understand what type of bootloader is activated on your gadget.

Why is it necessary to return the drain

The main reason for TWRP’s rejection is often the inability to pass banking applications: services like Google Pay or Mir Pay block devices with an unlocked bootloader or modified recovery partition, and security tags such phones as potentially vulnerable.

Another factor is the sale of the device: buyers rarely agree to buy a smartphone with custom software, preferring factory assembly; the presence of custom recovery reduces the market value of the gadget and causes suspicions among potential customers; return of runoff increases the liquidity of the device.

⚠️ Note: If you plan to take the phone to the service center under warranty, the availability of TWRP This could cause a denial of free repairs, and employees may consider it a breach of operating conditions.

Users also experience errors when receiving official MIUI or HyperOS updates, which checks the integrity of the boot image and blocks the update if it detects changes, forcing owners to look for ways to clean the system partitions of third-party code.

πŸ“Š Why do you want to remove TWRP?
For the sale of the phone
Banking applications are working
I need to update my MIUI.
I just want a clean system.

Preparation for the cleaning procedure

The success of the operation depends on the quality of the workspace and software. You will need a computer running Windows, Linux or macOS, as well as a serviceable computer. USB-The use of damaged wires often leads to a break in the connection at a critical moment.

You need to download and install the drivers for ADB and Fastboot, without them, the computer will not be able to properly communicate with the phone in debugging mode, and you should also download the image of the stock recovery corresponding to your model and firmware version.

  • πŸ“± Make a full backup of important data to a cloud service or PC.
  • πŸ”Œ Use the original cable or quality analogue with data support.
  • πŸ’» Install current Xiaomi drivers USB Driver on the computer.
  • πŸ”‹ Charge the device to at least 70% to avoid sudden shutdown.

Check if USB debugging is on the developer menu, and if you don't have access to this menu, you'll need to unlock it by clicking seven times on the build number in the About Phone section, and without this step, ADB commands won't run.

β˜‘οΈ Checking readiness

Done: 0 / 5

Method 1: Using the official firmware

The most reliable and safe method is to completely flash the device through the Mi Flash Tool, which is guaranteed to replace all partitions, including boot and recovery, with the original factory versions. It requires an unlocked bootloader, but returns the phone to a store-like state.

You'll need to download the firmware archive with the.tgz extension (Fastboot ROM) instead of.zip. Unpack the archive to the root of the disk so that the path doesn't contain Cyrillic characters. Launch the utility and connect the phone in Fastboot mode.

fastboot devices

This command will confirm the connection. In the program interface, select the clean all option to erase all data and return the stock state. The process takes 5 to 15 minutes depending on the speed. USB-port.

What does the Clean All option do?
This feature completely formats the device’s internal memory, removing all user data, accounts and installed apps, and then starts as new.

Once the procedure is complete, the phone will automatically restart, and the first run may take longer than usual, as the system optimizes applications, resulting in a clean MIUI with a stock recaveri.

Method 2: Replacement with Fastboot and ADB

If you don't need a full flashing, you can only replace the recovery image. To do this, download the recovery.img file corresponding to your current version of the OS. The command to write looks standard, but requires accuracy in writing.

Put your smartphone into Fastboot mode by pressing the volume down button when you turn it on. Connect the device to your PC and open the command line in the tool folder of the platform. Enter the following instructions:

fastboot flash recovery recovery.img

After a successful recording, you should immediately reboot to the new menu so that the old custom image does not overwrite the changes.

fastboot boot recovery

⚠️ Note: On devices with dynamic partitions (A/B partition) Flash may not work in the standard way, in which cases the image is often written to the boot section or requires the use of specific flags.

This method is faster than full firmware, but leaves other traces of system modification intact.It is suitable for power users who understand the structure of Android partitions.

πŸ’‘

If the fastboot command gives an error "command not allowed", check the status of the bootloader. On the blocked bootloader, you can not record third-party images.

Comparison of recovery methods

The choice of method depends on your goals and the current state of the device: full firmware takes longer, but gives guaranteed results; local image replacement is faster, but requires accurate file selection.

The table below compares the main characteristics of both approaches, which will help you determine the best course of action.

ParameterFull Firmware (Mi Flash)Image replacement (Fastboot)
Implementation time10-20 minutes1-2 minutes
Risk of errorLow.Medium.
Data retentionOnly with the "Clean All Lock" optionYes (with careful execution)
DifficultyMediumTall.
Guarantee of TWRP removal100%Depends on the model.

For most users, the first option is recommended, as it eliminates the human factor in selecting files. An error in the recovery.img version can lead to a cyclical reboot.

Possible problems and solutions

There may be some problems, such as a logo getting stuck or a computer not seeing a device, often with drivers or a driver or a computer. USB-Try connecting the cable to another connector, preferably USB 2.0.

If the TWRP is removed, the phone goes to the bootloop, the boot partition may have been damaged, and only flashing through EDL Mode (Emergency Download Mode) will help, which allows you to restore the device even when the bootloader is not working.

  • πŸ”„ Waiting for device error: Reinstall drivers or replace cable.
  • β›” Signature verified failed: firmware image is not suitable for your region or model.
  • πŸ”’ Locked bootloader error: Unlock the bootloader through Mi Unlock.

Sometimes the antivirus on the computer blocks the work of the ADB utility. During the procedure, it is recommended to disable the security software. Also make sure that there is enough free space on the system disk for temporary files.

πŸ’‘

The main difficulty in removing TWRP is not the team itself, but the correct selection of a stock image corresponding to the version of MIUI.

Frequently asked questions

Will TWRP be deleted after resetting?
No, a normal reset via the settings menu (Wipe data) affects only user data and does not affect the system partition recovery.
Can I delete TWRP without a computer?
It's almost impossible to do this on your own, without a PC, and to write an image to the system partition requires superuser rights and tools that are only available through ADB or a special recovery menu.
Will he disappear? ROOT-post-exclusion TWRP?
Removing the recovery does not delete root rights files, but access to them may be lost. To completely remove the superuser rights, it is recommended to use the Uninstall feature in the Magisk app before returning the drain.
Is it safe to update with OTA after removal?
Yes, if you returned the original recovery image and did not modify the system partition, otherwise installing the update may result in an error.