Installing custom TWRP on Xiaomi smartphones gives you access to advanced features from NANDroid backup to unofficial ROM firmware. However, the process requires care - an error at any stage can turn a device into a "brick." In this guide, we will analyze all the steps from unlocking the bootloader to choosing the right version of TWRP for your Redmi, Poco or Mi model.
Itβs important to understand that Xiaomi is actively blocking the ability to install third-party backups through official channels. Last year, the company has tightened the requirements: now to unlock the bootloader requires a binding Mi Account account to the device and waiting up to 720 hours (30 days), but even after that, the process of installing TWRP on new models (for example, Redmi Note 12 Pro+ or Xiaomi 13T) has nuances, which we will tell you about.
1.Preparation of the device: what to do before unlocking
Before you start unlocking the bootloader, make sure your device meets the key requirements:
- π± Smartphone model: Check compatibility with TWRP Not all Xiaomi devices are supported, for example, for Poco. F5 Special assembly may be required.
- π Battery charge: At least 60%.The unlocking and firmware process can take up to 30 minutes, and power outage at this point is critical.
- π Backup: Save all important data (photos, contacts, messages) to your PC or cloud. Unlocking the bootloader erases all data from the device without the ability to restore it.
- π₯οΈ Computer: You will need a Windows PC 10/11 or Linux (for fastboot and ADB). MacOS may have problems with drivers.
Pay special attention to MIUI versions. Some devices (e.g. Redmi Note 10 Pro) require a rollback to older firmware to successfully install TWRP, and up-to-date compatibility data can be found in telegram chat communities dedicated to your model.
β οΈ Note: If your Xiaomi was purchased in China (China version) ROM), Unlocking the bootloader may not be possible without additional manipulations. MIUI through EDL-regime.
2. Unlocking the bootloader: a step-by-step process
Unlocking the bootloader is a must before installing TWRP. Xiaomi has made this procedure more complicated, but the overall algorithm has remained the same:
- Linking your Mi Account to your device: Go to Settings β Xiaomi Account β Mi Cloud and log in. Make sure the developer settings include OEM Unlocking.
- Unlock Tool: Download the official Mi Unlock Tool (Windows version). Launch it on behalf of the administrator, log in to the same Mi Account as on your phone, and connect your smartphone in fastboot mode (click Volume down + Power when you turn off the device).
If the utility gives you a "Couldn't unlock" error, check:
- π Connection to USB: Use the original cable and port USB 2.0 (port) USB 3.0 can cause malfunctions).
- π οΈ Mi Unlock Tool Version: New devices (e.g. Xiaomi 13) require a version no lower than 5.5.224.30.
- π΅ Developer Mode: It must be enabled (Settings) β The phone. β Version. MIUI β tap 7 times).
Link Mi Account to your device |Enable OEM Unlocking in developer settings |Download Mi Unlock Tool latest version |Connect phone in fastboot |Check battery (>60%)
-->
3.Selecting the Right TWRP Version for Your Model
The error in choosing a version of TWRP is one of the main reasons for the βbrickingβ of devices. Even if the model of your Xiaomi is officially supported, there are nuances:
| Model of the device | Code name | Features of TWRP | Download link |
|---|---|---|---|
| Redmi Note 11 Pro/Pro+ | veux/peux | It requires a version that supports Dynamic Partition. Old builds don't work. | twrp.me |
| Poco X3 Pro | vayu | Both versions (A/B) are supported. TWRP 3.7.0+ is recommended for ROM firmware. | twrp.me |
| Xiaomi 12T | plato | Official TWRP is not available due to boot.img closed-loop boot.img. | XDA Developers |
| Redmi 10C | fog | It requires a patch for dm-verity, and without it, the device won't boot after installation. | twrp.me |
For dynamic partition devices (such as the Redmi Note 10 Pro or Poco F3), the standard TWRP may not work, and in such cases, use modified builds marked "Dynamic" or "A/B." These can be found on the XDA Developers forums or in the telegram channels dedicated to a particular model.
β οΈ Note: On some devices (e.g. Xiaomi) 11T Pro) installation TWRP discharge DRK (Device Root Key, which blocks access to encrypted data. If you want files in your internal memory, back up through the backup. ADB pull to the firmware of the Recovery.
How to find out the code name of your Xiaomi?
4. Install TWRP via fastboot: step-by-step instruction
When the bootloader is unlocked and the correct version of TWRP is downloaded, you can start installing it.
- π₯οΈ Computer with installed ADB and fastboot (can be downloaded via Android) SDK Platform-Tools).
- π File. TWRP in.img format (e.g, twrp-3.7.0_12-0-peux.img).
- π Cable USB Type-C (preferably original).
Instructions:
- Put the device into fastboot mode: Turn off the smartphone, then press Volume down + Power before the Fastboot logo appears.
- Connect to PC and check connection: Open the command prompt (cmd) in the folder with the platform-tools and execute: fastboot devices If the device is displayed (for example, 1234abcd fastboot), the connection is established.
- Please. TWRP: Enter the command (replace). twrp.img The name of your file: fastboot flash recovery twrp.img For partition devices recovery_ramdisk (for example, Poco F4 GT) Use: Fastboot Flash recovery_ramdisk twrp.img
- Reboot to TWRP: Without turning off the cable, do: fastboot reboot recovery If the device boots into a standard MIUI recavator, repeat step 3 as the firmware is not applied.
On some models (e.g. Redmi) K50) post-installation TWRP You need to immediately patch the patch. disable_dm-verity_forceencrypt, If you don't, it won't boot.
π‘
If after installing the TWRP device got stuck on the MI logo, try booting into the recavery via the combination Volume up + Power and flash a patch to disable the dm-verity check.
5. Common mistakes and their solutions
Even with the correct following of the instructions, errors can occur, and here are the most common ones and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| FAILED (remote: 'Flashing is not allowed in Lock State') | The bootloader is not unlocked or the unlock is reset. | Repeat the unlock process through the Mi Unlock Tool. Sometimes reconnecting your Mi Account helps. |
| Invalid sparse file format at header magi | The.img file or incompatible version of TWRP is damaged. | Download the file again from the official source. Check the MD5 checksum. |
| The device does not boot after installing the TWRP | No patch. disable_dm-verity or the wrong version of the recaveri. | Flip the patch through fastboot or return to the standard recovery via the Mi Flash Tool. |
| E: Unable to mount /data in TWRP | Encryption is FBE (File-Based Encryption) enabled. | Enter the screen lock password in TWRP or format /data (will result in data loss!). |
If after installing the TWRP, the device boots in a bootloop, try:
- Download to TWRP and flash Magisk (if you installed root).
- Remove the firmware to an older version of MIUI via fastboot.
- Perform a full reset (Wipe β Format Data) in TWRP.
π‘
If TWRP is not installed on the first try, never repeat the command fastboot flash recovery without restarting to fastboot.
6. Additional TWRP settings: what to do after installation
After successful installation of TWRP, several important steps are recommended:
- π Backup NANDroid: Go to Backup and select the Boot, System, Data, Vendor partitions. Save a copy to an external memory card or PC.
- π Install Magisk for root rights: Download the latest version of Magisk from GitHub and stream it through Install β Select Image.
- π‘οΈ Disable Forced Encryption: If You Plan to Use Custom ROM, format /data how F2FS or ext4 (depending on the kernel support).
- π₯ Set up ADB Sideload: Enable the Advanced option β ADB Sideload for easy installation ZIP-PC-file.
For dynamic partition devices (such as Xiaomi 12 or Redmi K40), standard TWRP backup may not work, in which case use alternative tools such as OrangeFox Recovery or PitchBlack Recovery, which are better adapted for new partitions.
7. Alternative methods of installing TWRP (for power users)
If the standard fastboot method doesn't work, you can try alternatives, which require more knowledge and are risky, but sometimes the only solution.
Installation TWRP through EDL-regime
Another method is to install TWRP through a temporary boot (without firmware in the recovery section):
fastboot boot twrp.imgThis method allows you to boot into TWRP once without replacing the standard recovery. Suitable for devices where the TWRP firmware leads to a reset (for example, Xiaomi 11 Lite NE). After downloading to a temporary TWRP, you can immediately flash Magisk or make a backup.
8 How to Return the Standard MIUI Recovery
If you need to return the device to its original state (for example, for warranty repairs), do the following:
- Download the official firmware for your model from the MIUI Downloads website.
- Unpack the firmware and find the recovery.img file.
- Fastboot: Fastboot Flash Recovery recovery.img
- Reboot the device: fastboot reboot
To return to stock firmware, use the Mi Flash Tool with the Clean All option, which will delete all data, including TWRP and Magisk, and return the device to factory status.
β οΈ Note: Some devices (e.g. Redmi Note 12) may require re-unlocking the bootloader after returning to the drain Recovery. If you are selling or redecorating your phone, be sure to remove the Mi Account binding in the settings.