How to run custom recavers on Xiaomi: the complete guide

Owners of Xiaomi, Redmi and Poco smartphones often face the limitations of a standard operating system: removing system debris, creating full backups or installing custom firmware require access to hidden memory partitions, which is the purpose of customized Recovery, which replace the standard engineering mode.

The process of replacing the stock recovery menu with a modified one, such as TWRP, is a fundamental step in modifying Android, which opens up access to the device's file system as a superuser, but it is important to understand that any manipulation of the bootloader carries certain risks.

In this article, we will go into detail about the algorithms required for successful installation, learn about tool preparation, unlock the bootloader and directly firmware images, and carefully follow the instructions to minimize the likelihood of errors.

Tool preparation and diagnostics of the device

Before you start taking action, you need to make sure that all the required components are available. You will need a computer with Windows, Linux or macOS operating system, as well as a high-quality computer. USB-A bad cable can cause a breakdown at a critical moment, which is unacceptable.

All necessary system updates should be installed on your smartphone if you plan to unlock the bootloader first through the official application. It is also critical to back up all important data. The Bootloader unlock process completely clears the device's internal memory.

⚠️ Attention: The bootloader unlock procedure permanently deletes all user data (photos, contacts, apps) and transfer important information to an external drive or cloud storage in advance.

Download and install the ADB and Fastboot drivers on your computer, without which the system will not be able to recognize the phone in special mode, and you will need a recovery image file adapted specifically for your device model, using files from other models can lead to bricking of the gadget.

πŸ’‘

Use the original. USB-High-quality cables or certified analogues: Cheap charging cables often lack data lines, making PC connectivity impossible.

Check out the MIUI or HyperOS version. In some cases, newer versions of the shell have an increased level of protection, requiring a wait of 168 hours (7 days) after applying for an unlock. Older models may require an account with a certain level of activity in the Mi Community community.

Unlocking the bootloader (Bootloader)

The first and most important step is to unlock the bootloader. Xiaomi's standard security doesn't allow you to flash third-party images without this step. You need to link your Mi Account to your device through the settings menu.

Go to Settings β†’ About Phone and click on the MIUI version several times to activate the developer menu. Then, in the advanced settings, look for β€œTruckloader Status” and click β€œAdd Account.” After that, you can go to the utility on your PC.

  • πŸ“± Download the official Mi Unlock Tool utility from the manufacturer's website.
  • πŸ”Œ Transfer the smartphone to Fastboot mode, clamping the volume and power buttons.
  • πŸ”— Connect the device to the computer and wait for the definition in the program.
  • πŸ”“ Press the Unlock button and confirm the action.

The process can take anywhere from a few minutes to a few days, depending on the region's security policy and firmware version. Once successfully unlocked, the phone will automatically restart and reset to factory settings.

⚠️ Note: After unlocking the bootloader, some banking applications and services (Google Pay, Mir Pay) may stop working properly due to a breach of security integrity.

Make sure the battery is at least 60 percent charged, the firmware and subsequent setup process takes time, and a sudden power outage while writing flash memory partitions can cause permanent damage to the software part.

πŸ“Š Have you ever had a lock on Xiaomi?
Yes, waited 7 days / Yes, unlocked immediately / No, I have a global version / I don't know what it is

Installation of ADB and Fastboot drivers

To interact with a smartphone at a low level, the Android Debug Bridge toolkit is used. Windows often has problems with automatically installing drivers for Fastboot mode.

Download the Platform Tools archive from Google's official repository. Unpack the archive into the root of the disk, such as the C:\adb folder, so that the path does not contain Cyrillic characters and spaces, which will make it easier to enter commands into the console.

Open the command line in the tool folder. In Windows 10 and 11, you can do this by right-clicking the folder in an empty space and selecting the appropriate option, or by manually writing the path.

fastboot devices

If you see the serial number of the device, the connection is established. If the list is empty, check the cable, USB port or reinstall the drivers. Device Manager in the "Other Devices" section may display an unknown Android Bootloader Interface device.

Solving driver problems in Windows
If Device Manager shows a device with a yellow exclamation point, right-click β†’ Update driver β†’ Select a driver on that computer β†’ Select from the list of available drivers β†’ Android Bootloader Interface. This often solves the recognition problem.

TWRP Image Impression Process

Now that you've got it all ready, you can go to the direct recording of the image. Download the twrp.img file that matches your device's codename (e.g., ginkgo for Redmi Note 8). Put the file in the ADB folder for convenience.

Put your smartphone into Fastboot mode. This is usually done by turning off your phone and then pressing the volume down and power button at the same time, and a bunny in a repair hat or FASTBOOT should appear on the screen.

Enter a command to temporarily start the Recovery without its constant firmware (optional) or to record directly:

fastboot flash recovery twrp.img

After the successful completion of the process, which will take a few seconds, you need to immediately put the device into recovery mode.Do not let the phone boot into a regular Android system, as stock firmware can overwrite custom recavers back to the original.

β˜‘οΈ Checklist before firmware

Done: 0 / 5

To enter the newly established TWRP If you see a menu with Install, Wipe, Backup, it's a success. ZIP-archives with firmware, patches and modules.

⚠️ Note: If after the firmware TWRP The phone is loaded into a normal system. MIUI/HyperOS, So, it means that the stock recavator has overwritten the custom. Repeat the procedure, but this time, immediately after the flash command, go to Recovery, preventing the system from booting.

Set up and work in the Recovery environment

The TWRP interface may seem complicated to a beginner, but it has a logical structure: the main menu contains sections for installation (Install), cleaning (Wipe), backup creation (Backup) and reboot (Reboot).

Backup function allows you to save the current state of the system to the archive. This is a full backup, including system partitions, application data and settings. SD-map or transmit.

SectionDescriptionRecommendation
SystemOperating system filesDefinitely for the backup.
DataUser data and applicationsTakes up the most space.
BootSystem kernel (Kernel)Critical for launch
VendorDrivers and specific settingsDon't touch unnecessarily

For installation of custom firmware (Custom) ROM) or a patch to obtain superuser rights (e.g., Magisk or KSU), Use the Install menu. Select ZIP-You can swipe the file and confirm the swipe. It takes 30 seconds to a few minutes.

πŸ’‘

TWRP allows you to mount partitions as an MTP storage. By connecting your phone with a cable to your PC in this mode, you can transfer firmware files directly without using a memory card.

Possible errors and methods of their elimination

Error 7 codes are usually used to indicate that Android version is not compatible or that signature is verified, and in such cases, you can disable DM-Verity or use special patches in TWRP.

If your phone goes into a bootloop, try running Wipe Dalvik/Cache and Data. If that doesn't work, it may be damaged by the boot image. You can bring the device back to life by reflashing the boot.img stock image via Fastboot.

A common problem on new HyperOS devices is blocking the Anti-rollback version. Firmware with a lower rollback version can permanently disable the device. Always check version compatibility before recording.

For diagnostics, use the log files that the recovers create, which are stored at the root of internal memory or on the back of the memory. SD-Log analysis helps to understand which file caused the failure in the installation.

What is an Anti-Rollback?
This is a security mechanism that prevents you from installing an older version of the firmware than the one that was used before, and it's done to prevent security vulnerabilities, and breaking this rule on some Xiaomi models leads to hardware locking.

Frequently Asked Questions (FAQ)

Will the custom recavator installation reset the system by air (OTA) upgrade?
Yeah, standard update. MIUI/HyperOS through OTA It's likely to overwrite the Recovery partition to stock, and having a modified bootloader often blocks the installation. OTA-Recommended to update manually through a full update.
Can I get Root rights without installing a custom Recovery?
On modern Xiaomi devices, this is almost impossible without an unlocked bootloader. Alternative methods (exploits) are rare, work on specific older versions of Android and carry high security risks β€” TWRP + Magisk/KSU.
What if your computer can’t see your phone in Fastboot?
Try another one. USB-port (preferably) USB 2.0 behind the system unit, replace the cable, reinstall the drivers ADB/Fastboot. Also make sure there are no hardware conflicts in the Device Manager.
Will the warranty be maintained after the TWRP installation?
Formally, software integrity breaches and bootloader unlocks are grounds for a manufacturer's warranty denial, but it is theoretically possible to return the stock firmware and lock the bootloader back, hiding the interference.