How to put custom recavers on Xiaomi: the complete guide

Modifying the Android operating system on Xiaomi devices is a powerful way to unlock the hidden potential of your smartphone. Installing custom recovery like TWRP (Team Win Recovery Project) gives you access to full file system management, full backups, and modified firmware installation. Without this step, deep customization is virtually impossible, as the standard recovery menu is limited to only basic reset functions.

The process requires careful and careful algorithmic follow-up, as interference with the system partition can lead to the failure of the device. You will need not only software, but also an understanding of the logic of the bootloader. Modern smartphones of the Chinese brand have several levels of protection that must be overcome by legal methods before starting manipulation.

In this article, we will discuss in detail all the steps of preparing, setting up the environment and directly installing the modified recovery menu, we will touch on the issues of model compatibility, working with drivers and solving typical errors that beginners have when first experiencing a firmware.

⚠️ Note: All actions described in the article, you perform at your own risk. Interference with the software part of the smartphone can lead to loss of warranty and data.

Preparation of the smartphone and unlocking the loader

The first and most important step is unlocking the bootloader. Without this step, no program will allow you to write third-party code to the recovery section. Xiaomi has implemented a mandatory verification procedure through Mi Account servers, which takes some time, you need to link your account in your phone settings and apply through the official Mi Unlock Tool utility on your computer.

Once you get the permission (usually 7 days or 168 hours), you can start unlocking.The process completely erases all data from the internal drive, so be sure to back up important information in advance.The smartphone should be charged at least 60% to avoid a sudden power outage at a critical moment.

  • πŸ“± Enable Developer Mode: Go to Settings β†’ About the phone and 7 times click on the build number MIUI.
  • πŸ”“ In the menu Advanced settings β†’ For developers, activate the paragraphs "Factory unlocking" and "Debugging by USB".
  • πŸ”— Link your Mi Account: in the same menu, select β€œMi Unlock Status” and add the device, making sure that mobile Internet is enabled (not Wi-Fi).

When the prep phase is complete, turn off your phone and enter Fastboot mode, holding both the power and volume buttons together. Connect the device to your PC with a cable and start the Mi Unlock Tool. If status shows "Unlocked," you can proceed to the next step.

πŸ“Š What is your bootloader unlock status?
Already unlocked.
I'll apply today.
Wait 7 days.
I won't unlock.

Required tools and drivers

To successfully install a custom recavator, you'll need a specific set of software on your computer, based on the ADB and Fastboot package, which allows you to send commands from your PC to your smartphone, and without the right drivers, your computer won't see the device in the right mode.

It is also critical to download the version of the TWRP image (.img file) that is designed for your particular CPU and device model, and to use the image from another model, even if they look the same, is likely to "brick" the phone or lead to a broken touchscreen.

Where to look for official TWRP images?
You should only download files from the official teamw.in website or trusted forums like 4PDA and XDA Developers. Third-party collections may contain malicious code.

Make sure your computer has Google USB Driver universal drivers or Xiaomi dedicated drivers installed. Windows Device Manager should display the Android Bootloader Interface device without exclamation points when connecting your phone in Fastboot mode.

β˜‘οΈ Firmware readiness check

Done: 0 / 5

Comparison of installation methods: Fastboot and ADB

There are two main ways to record a recovery image: through fastboot and through USB debugging (ADB), each method has its own characteristics, advantages and limitations, depending on the state of the system and the user’s goals.

Fastboot is considered the most reliable and clean method, it works at a low level, allowing you to directly overwrite the recovery partition, bypassing the operating system. This method is mandatory if the Android system is damaged or not booting, but it requires you to put the phone in a special mode.

The ADB method is convenient when the system is running normally, and you want to install recoveries on the fly without rebooting to Fastboot. The adb reboot recovery command allows you to immediately enter the new menu after recording the image. However, if the system is antivirus or OEM restrictions, the recording can be blocked.

CharacteristicsFastboot modeADB mode
Required status of OSNot required (works with the phone turned off)It requires a working Android
Speed of implementationTall.Medium
Risk of errorMinimumMedium (depending on drivers)
Cable useUSB is required.USB is required.

In this tutorial, we will use the Fastboot method as the most versatile and secure for most scenarios, ensuring that no background Android processes interfere with the writing of system partitions.

Step-by-step installation instructions via Fastboot

Start the direct firmware process. Put your smartphone into Fastboot mode by pressing the Volume Down buttons. + Power before the logo with the hare repairing the android. USB-cable, preferably original or certified.

Open the command prompt (CMD) or PowerShell in the folder where the TWRP image file is located. For convenience, rename the image file to something simple, such as twrp.img. First check the connection by entering the command:

fastboot devices

If you see the serial number of the device, you've got the connection. Now, you've got to write the image to the recovery section.

fastboot flash recovery twrp.img

⚠️ Warning: After a successful image recording, do not press the power button to reboot in the usual way! This can lead to a recapture of the recaveri as standard.

Immediately after recording, you need to put the phone in recovery mode. To do this, use the combination of buttons on the device itself or the command:

fastboot boot twrp.img

The fastboot boot command runs the image temporarily, without writing to memory, which is convenient for testing, and if everything works correctly, you can either pin the result through the TWRP menu itself or repeat the flash command.

πŸ’‘

Use it. USB-port located on the back of the system unit (direct to the motherboard) to avoid problems with power shortages or unstable connection.

First Start and Configure TWRP

Once you have successfully downloaded, you will see the Team Win Recovery Project interface. The first screen will alert you that the system has been modified. On Xiaomi devices, you often need to swipe the "Swipe to Allow Modifications" slider to allow the changes. If you don't, the system can automatically replace the customized recavereator with stock one when it first boots to Android.

The interface may be in English, but the structure is logical: the Backup section allows you to create a full copy of all partitions (Boot, System, Data), which is insurance against future firmware failure, and it is recommended to always backup before installing new ROMs.

  • πŸ›‘οΈ Wipe: partition for data cleaning. Advanced Wipe is usually chosen for custom firmware installation and Dalvik, Cache, System, Data are noted.
  • πŸ“‚ Install: menu for installation ZIP-archives with firmware, patches and modifications.
  • βš™οΈ Advanced: File System Tools, Terminal and Partition Management.

It is important to note that on new data-encrypted devices, the Data partition may not be available for recording (shown as 0MB). To solve this problem, you need to format (Format Data) and type in the word "yes" This action will delete all files, but make the partition available.

πŸ’‘

Once you have installed TWRP, make sure to make a full backup of the clean system before making any changes.

Common mistakes and ways to solve them

In the process of modification, users often face technical problems, and one of the most common is that the device is not determined by the computer in Fastboot mode. USB-cable.

Another common error is β€œStatus 7” or a signature error when installing firmware via TWRP. This means that the recovery version is incompatible with the Android version or device type, in which cases it helps to update TWRP to the latest current version or use specialized builds for your model.

If you put the custom recavator on, you go into a bootloop, don't panic. Go to TWRP (clamping Volume Up + Power) and try to make Wipe Dalvik/Cache. If that doesn't work, you'll have to return the stock firmware through the Mi Flash Tool in Clean All mode.

What if TWRP doesn’t see internal memory?
This is because of the encryption in Android 10/11/12/13, you have to go to Wipe β†’ Format Data, type in "yes" and confirm, and then the internal memory will be formatted and available, but all data will be deleted.
Can I update my MIUI after I install TWRP?
An official Air Update (OTA) can remove customized backups or lead to errors.It is safer to download full firmware and install them manually via TWRP or Mi Flash, pre-saving backup.
Will the warranty be reset after unlocking the bootloader?
In most regions, unlocking the bootloader is officially allowed by Xiaomi, but when contacting the service center for a warranty event (for example, a screen breakage), questions may arise if the fault is software. Hardware defects are usually serviced, but it is better to return the stock firmware before visiting.
How do you get back to stock firmware?
For a full refund, use the Mi Flash Tool and the Fastboot ROM image for your model. Select the Clean All mode (not Clean All and Lock if you have changed region) to completely clean the phone and return to factory condition.