How to Reinstall Recovery on Xiaomi: The Complete Guide

Modification of the operating system of the Xiaomi smartphone often begins with the replacement of the standard bootloader with an extended version. Recovery is a special mode built into the device that allows you to perform low-level operations with the software. Unlike the usual mode of operation, here you can reset data, update the firmware or restore the system after a critical failure.

But the manufacturer's stock recovery mode is very limited, and it doesn't allow you to install third-party firmware, make full partition backups, or get super-user rights, which is why enthusiasts are eager to install TWRP (Team Win Recovery Project) or OrangeFox, which gives you full access to the file system and full control of the gadget.

Replacing the regular recovery menu requires careful and careful algorithmic follow-up. Errors during the preparation stage or during firmware can cause the phone to stop turning on or go into an endless reboot. Before you start any manipulations, you need to make sure that you understand what is happening and are ready to take responsibility for your actions with the device.

Preparation for the installation of custom recavery

The first and most important step is unlocking the Bootloader.Without this step, any attempts to write the modified image to memory will be blocked by the MIUI security system. Unlocking will require a Mi Account account tied to the device and waiting for 168 hours (7 days) after submitting the application through the official utility on the PC.

In parallel with the expectation of unlocking, you should download all the necessary files. You will need the bootloader itself, the ADB and Fastboot drivers, as well as a recovery image specially assembled for your model. Using a file designed for another device can lead to incorrect touchscreen operation or complete system failure.

⚠️ Warning: Unlocking the bootloader results in the complete removal of all user data from internal memory. be sure to back up important photos, contacts and documents before starting the procedure.

It is also critical to check the battery charge. The firmware process should not be interrupted due to discharge, so the charge level should be at least 60-70%. Also, make sure that the used USB-The cable is serviceable and capable of transmitting data, not just charging the device.

β˜‘οΈ Checklist for firmware preparation

Done: 0 / 5

Necessary tools and software

To successfully replace the recovery, you'll need a computer running Windows, macOS or Linux, and the main tool for interaction will be Google's Platform Tools suite, and it's through the adb and fastboot console commands that data is transferred between the PC and the smartphone.

It is important to download the current version of drivers. Xiaomi devices often require specific drivers that may not install automatically. Complete with the utility to unlock the bootloader usually comes with all the necessary components, but in some cases they have to be installed manually through the Device Manager.

The recovery image file itself usually has the.img extension. It needs to be placed in the root folder with ADB tools to make it easier to type commands. Do not rename the file unless your model instruction manual states otherwise, as this can cause confusion when executing scripts.

ComponentAppointmentWhere to download
ADB & FastbootManaging the device via PCOfficial website of Android Developers
Xiaomi USB DriversDrivers to connectMi Community or Xiaomi
TWRP ImageThe image of a custom RecoveryOfficial website twrp.me
Mi Unlock ToolUnlocking the loaderOfficial website en.miui.com

Remember that antivirus software on your computer can sometimes block console utilities. If commands don't work, try temporarily disabling protection or adding a tool folder to exceptions.

πŸ“Š Which Recavator Recavator Recreation Method Do You Prefer?
Through Fastboot (teams)
Through an Android app
Automatic scripting.
I'm not, I'm afraid to break.

Translation of the smartphone to Fastboot mode

To record a new image, the device must be in a special diagnostic mode known as Fastboot, in which the phone does not load the operating system, but waits for commands from the computer, and enters this mode with a combination of hardware keys when the smartphone is turned off.

To go to Fastboot mode, turn off your phone completely. Then press the Volume Down button and, without letting it go, plug it in. USB-And the cable that connects the smartphone to the computer, and the screen should show a picture of a hare in a hat, an eardress, repairing the android, or a sign that says, FASTBOOT orange-blue.

If the phone just turned on normally, you've used the wrong button or you've done it too late. Try again, making sure the device is completely off before you press the key. Some models may require the original cable, as cheap analogues may not provide a stable connection for data transfer.

⚠️ Warning: While in Fastboot mode, don't unnecessarily turn off the cable.Although the risk is minimal, interrupting the connection while writing partitions can damage the partition table.

After successfully entering mode, the computer must make a sound of connecting the new device. In the Windows Device Manager, in the "Android Devices" or "Android Bootloader Interface" section, the corresponding gadget should appear without exclamation points.

The process of installing TWRP via Fastboot

Now that the device is connected and in Fastboot mode, you can start directly recording the image. Open the command line or the terminal in the folder where the adb and fastboot files are located. First check the connection with the device by entering the command fastboot devices. If you see the serial number in response, then the connection is established correctly.

The next step is the firmware command. The syntax of the command is as follows: fastboot flash recovery name file.img. Instead of filename.img, substitute the real name of the downloaded recovery image. After you type in the command, press Enter. The process takes a few seconds, and then the message will appear completed with the time spent.

fastboot flash recovery twrp-3.x.x-x_codename.img

There is an important nuance for many Xiaomi devices: the standard boot procedure after firmware can overwrite the newly installed custom Recovery back to the stock one. To avoid this, immediately after the firmware is completed, you need to manually put the phone into recovery mode, preventing the system from booting.

To do this, without turning off the cable, press the Volume Up and Power button at the same time. Hold them until the Mi logo disappears and the TWRP menu appears. If you release the buttons too early or let the phone boot into Android, the stock system can automatically restore the original recovery partition.

What if your computer doesn’t see your phone in Fastboot?
If the device is not detected, try the following: 1. Replace. USB-cable with quality, preferably original. 2. Change it. USB-port on your computer (use ports) USB 2.0 back-panel). 3. Reinstall the drivers ADB/Fastboot manually through Device Manager, selecting the path to the folder with drivers. 4. Check if the bootloader is unlocked (Fastboot mode should have the words "Unlocked").

Initial configuration and work with TWRP

After successfully logging into the TWRP menu, you will see an interface adapted for touch control. The first thing the system can do is suggest choosing a language (Swipe to Confirm Selection), choose English or Russian if it is available in the build, and then a warning will appear that the system partition is not modified (System is not modified).

To preserve the rights to change and the ability to install superuser rights (Root), you need to allow modifications to the system. Move the slider to the right at "Allow Modifications." If you don't, the first time you reboot, TWRP will be replaced by a stock Recovery, and all the effort will be wasted.

The main menu has the basic functions: Install (installation) ZIP-Archives, Wipe (partition cleanup), Backup (backup) and Reboot (reboot) are recommended to complete the full backup of the current system before installing a new firmware or patches. This will take time and place, but will save your data in case of a failed experiment.

πŸ’‘

Tip: After installation TWRP Make a full backup of Boot, System, and Data partitions right away. Save this backup to your computer or SD-This is your only insurance policy in case the new firmware fails.

You can also do Format Data on this menu if you're planning to completely clear your device from encryption, which deletes all files and requires you to type in the word "yes" to confirm it. Be very careful with this feature.

Possible mistakes and ways to solve them

When reinstalling the recovery, users often face a variety of problems, one of the most common is the FAILED (remote: device is locked) error, which means that the bootloader is still locked, in which case you need to go back to the first step and go through the unlock procedure through the official Mi Unlock tool.

Another common problem is the device's "bricking" when the phone stops responding to commands or goes into a cyclical reboot. If the screen is black and the phone is not vibrating, the bootloader may be damaged. If you see the Fastboot logo or menu, the device can usually be salvaged, and this requires reflashing the stock image through the Fastboot with a clean flag.

Sometimes the touchscreen in TWRP doesn't work properly or doesn't work at all, which indicates that the image of the recovery isn't fully compatible with your Android version or screen model, and then you need to find another TWRP build that's tailored to your specific chipset and Android version.

⚠️ Note: If after firmware the phone goes into an endless cycle of restart (bootloop), try to log in. TWRP and run the Wipe -> Dalvik / ART Cache and Wipe -> If it doesn't work, you'll need to flash the stock firmware.

Errors in connection are often due to the lack of the right drivers. In Device Manager, the device may appear as "Unknown Device" or "QHSUSB_BULK". In the latter case, the phone fell into emergency boot mode, and for recovery it may be necessary to disassemble the case and close test points on the board.

πŸ’‘

The key to success is that the TWRP image is compatible with your specific model and Android version. Don't use generic files, always look for a build under your codename.

Frequently Asked Questions (FAQ)

Will the warranty fly after installing a custom Recovery?
Yes, in most cases, unlocking the bootloader and modifying the system software will void the manufacturer's official warranty. Xiaomi service centers can refuse free repairs if they find traces of software interference. However, by returning stock recaps and downloading the original firmware, it becomes more difficult to visually determine the fact of the modification, although the KNOX counter (on some chipsets) can remain erected.
Can I update with OTA after installing TWRP?
Standard air updates (OTAs) will stop coming or installing automatically. Custom recavers change the system partition, which violates the integrity checked during the update. To update the system, you will have to manually download full firmware images and install them through the Install menu in TWRP or use special modules.
Is it safe to use banking applications with TWRP?
By itself, the installed TWRP does not block banking applications unless you have obtained a Root license and modified system files. However, the presence of an unlocked bootloader may be suspicious in some security applications. Full operation often requires hiding the fact of unlocking through Magisk and modules like MagiskHide or Zygisk.
What if TWRP asks for a password when you sign in?
This is encryption protection. If you haven't changed your password, try entering. PIN-If the password doesn't fit or you forgot it, you'll have to perform Format Data, which will delete all the data from the phone but allow you to log in to the recovery.
How do you get back to stock Recovery?
To return to the factory state, you just need to flash the original recovery image through Fastboot with fastboot flash recovery.img, where recovery.img is the stock file for your model. Also, the stock recovery will return itself if you unlock the bootloader again or install the official firmware with full cleaning through the Mi Flash Tool.