The process of modifying the Android operating system on Xiaomi, Redmi and POCO devices is rarely complete without the use of custom recovery. TWRP (Team Win Recovery Project) remains the gold standard in this area, giving users full control of the file system. However, versions of this tool are becoming obsolete, new security patches are appearing, partition structure changes, and older builds no longer work correctly with new versions of Android 15 or 16.
The need to update TWRP on Xiaomi often arises after switching to a new version of the firmware MIUI or HyperOS. Old Recovery may not see internal memory partitions, incorrectly mount storage or even block the boot of the system. In this article, we will discuss current methods of replacing the recovery image without losing data and the risk of turning the device into a βbrickβ.
You'll learn how to get the right build, what tools you'll need to work with fastboot and adb, and how to avoid the typical errors of flashing the recovery partition. It's critical to understand that the procedure requires an unlocked bootloader, without which you can't do anything. We'll look at both manually using the computer and installing through the Recovery.
Preparing tools and choosing the right version of TWRP
The first step is to find the current version of the recovery that is compatible with your model of the device. The architecture of the Qualcomm Snapdragon and MediaTek processors in Xiaomi smartphones requires the use of specific images. You can not use a file designed for the Redmi Note 10 on POCO F3, even if they are released in the same year.
To work, you will need a computer running Windows, Linux or macOS, as well as a serviceable one. USB-It is advisable to use the original cable or high-quality analogue with data support, since cheap βcharging onlyβ cables can cause a connection to break at a critical moment of firmware.
- π± Unlocked Bootloader (Unlocked Bootloader) β a prerequisite.
- π» Installed drivers ADB and Fastboot on PC.
- π₯ Downloaded image TWRP (img file for your specific model.
- π Charge at least 60% to avoid sudden shutdown.
Images should only be downloaded from trusted sources, such as the official XDA Developers forum or official TWRP channels on Telegram. Using modified builds from unknown authors can lead to data leakage or malicious code. Always check the hash amount of the file if it is provided by the author.
βοΈ Firmware readiness
Update method via Fastboot and ADB (Recommended)
The most reliable way to completely replace the old recovery partition is to use fastboot mode. This method works at the bootloader level and does not depend on the state of the operating system installed. It is ideal for cases where you need not just update, but βrewriteβ TWRP clean.
To start, put your smartphone into fast boot mode. This is usually done by turning off the device and then clamping the combination of the buttons Volume Down + Power. After connecting to the PC in the command line or terminal, you need to enter a command to check the connection:
fastboot devicesIf you see the serial number of the device, the connection is correct, followed by the direct firmware command, and note that we don't write "flash recovery" but we specify a specific section:
fastboot flash recovery twrp_image_name.imgOnce the command is successfully executed (a successful record is confirmed by the Finished message with runtime), in no case do not allow the phone to boot into the system in the usual way. Xiaomi's standard boot procedure often overwrites the recovery section in a stock way at the first start of Android. To avoid this, immediately after firmware, press the buttons Volume Up + Power and hold them until the TWRP logo appears.
π‘
Use it. USB-port located on the back of the PC motherboard, rather than on the front panel of the case or through USB-This will provide stable voltage and data transfer without interference.
β οΈ Note: On devices with dynamic partitions (A/B The partition scheme, which is typical for new Xiaomi models, may differ in command. Sometimes you need to sew the image into the boot section or use the suffix a or b. Carefully read the instructions for a specific firmware file.
Update TWRP through ZIP-Recovery
If you already have a working but outdated version of TWRP installed and you donβt want to connect your computer, you can use the βinsideβ update method, which requires downloading not.img image, but an installation.zip archive adapted for installation through the receptacles.
Download. ZIP-file on your smartphone's internal memory or connected microSD card. Go to Recovery mode the usual way. In the main menu, select Install. In the file manager that opens, find the downloaded archive and click on it.
You'll see a confirmation screen with a Swipe to confirm Flash slider. Move it to the right. It'll take a few seconds. Once it's done, you'll see a Reboot Recovery button or a Wipe Cache/Dalvik button. Selecting Reboot Recovery will reboot the phone back into recovery mode, but with an updated version.
- π The method does not require a PC and USB-cable.
- π Access to the file system (internal or internal) SD-map).
- β‘ The process takes less time than flashing through Fastboot.
This is useful for minor updates, such as switching from version 3.6.1 to 3.6.2 when the structure of the boot scripts does not change. However, if you move between major versions (for example, from 3.5.x to 3.7.x), it is preferable to use the method through Fastboot to ensure that old scripts are cleaned.
What to do if the ZIP installation is interrupted?
Solving Boot and Cyclical Reboot Problems
When the phone goes into a cyclic bootloop or hangs on the logo after the TWRP update on Xiaomi, it is common, most often due to incompatibility of the Android version and the recovery version, or damage to partition headers.
First, try cleaning the Dalvik and Cache cache. In the TWRP menu, go to the Wipe section, select Dalvik/ART Cache and Cache, then swipe to clean. Don't confuse this with Format Data, which will delete all your files.
If the cleanup didn't work, the recovery image itself might be damaged, in which case you'll need to go back to fastboot mode and flash the recovery stock image (if any) or reflash the verified version. TWRP. Xiaomi devices are characterized by a problem when updating MIUI/HyperOS Stock recovery βflyingβ over the custom, causing conflict.
| Symptoms. | Probable cause | Decision |
|---|---|---|
| Black screen after logo | Incompatible kernel or recovery | Fastboot flashing through Fastboot |
| Recovery does not see internal memory | No encryption patch (Decrypt) | Installation of the patch Disable_Dm-Verity |
| Cyclical reboot | Conflict of Android versions | Wipe Dalvik/Cache + Resetting Settings |
| Error "Invalid zip file format" | Damaged. ZIP-archive | Re-downloading of the file |
Features of working with encryption and partitions on the new Xiaomi
Modern Xiaomi smartphones use complex File Based Encryption (FBE) schemes. Older versions of TWRP simply do not know how to work with the new encryption algorithms Android 13/14/15. As a result, even if you successfully upgrade, you can see in the file manager of the backup empty list of files or a message that the Data partition can not be mounted.
To solve this problem, you often need to install a special encryption patch (Decrypt zip) or use specialized TWRP builds labeled βFBE ready.β Without this step, you wonβt be able to back up or install firmware in your internal drive.
It is also worth mentioning the structure of the sections. A/B. On such devices there is no separate recovery partition in the usual sense; its functions are performed by the boot partition or the boot partition. init_boot (So the firmware command might look like:
fastboot flash init_boot twrp_image_name.imgAlways check the type of partitions for your model. Firming the image to the wrong partition on devices with dynamic partitions can lead to complete failure of the phone, requiring intervention through EDL (Emergency Download Mode) and paid accounts of authorized service centers.
β οΈ Note: On devices with MediaTek (Helio, Dimensity) processors, the procedure may require a patched boot image to obtain write rights.
π‘
Key point: For new Xiaomi devices (Android 13+), it is critical to use TWRP with support for a new type of encryption, otherwise access to user data will be lost.