Installing custom TWRP on Xiaomi smartphones provides access to advanced features: firmware unofficial ROM, creating full system backups, root rights and even restore bricks. However, the process requires accuracy β an error at any stage can lead to a loss of warranty or complete failure of the device. In this guide, we will analyze all the steps from unlocking the bootloader to checking the health of the TWRP, taking into account the features of the latest versions of MIUI and Redmi/POCO models from 2023-2026.
It is important to understand that Xiaomi actively blocks unofficial backups through the anti-rollback mechanism and verification of the bootloader signature. TWRP The official website is twrp.me, for example, for Xiaomi. 13 Pro or Redmi Note 12 Pro+ Special assemblies with support for dynamic partitions may be required (dynamic_partitions).
1. Preparation: What to do before installing TWRP
Before you start unlocking and firmware, gather everything you need, and without proper preparation, you risk getting a brick or losing data.
- π± Xiaomi smartphone with battery charge β₯ 70% Qualcomm Snapdragon processors (e.g., Qualcomm Snapdragon, POCO F5 or Redmi K60) Supported better than MediaTek devices (e.g. Redmi Note 11 Pro).
- π₯οΈ Computer running Windows 10/11 Linux (MacOS may require additional drivers).
- π USB-original or high quality cables (cheap cables often cause firmware errors).
- π Mi Account with a linked phone number (to unlock the bootloader).
- π Data backup: contacts, photos, messages (TWRP It doesnβt erase data, but unlocking the bootloader is a yes).
Also check the MIUI version in settings (Settings β About Phone β MIUI version). Devices on MIUI 14 and later may need to roll back to older firmware before unlocking the bootloader. For example, Xiaomi 12T on MIUI 14.0.5 sometimes refuses to unlock without a downgrade to MIUI 13.
2 Unlock the bootloader: the official way from Xiaomi
Xiaomi blocks the bootloader on all devices, so it must be unlocked through the official Mi Unlock Tool.The process takes 7 to 30 days (depending on Xiaomi's policy at the time of reading).
- Download the Mi Unlock Tool from the official website. Use only the latest version - the old ones may not support new models.
- Enable the developer mode on your smartphone: go to Settings β About the phone and 7 times click on the version MIUI. Then go back to Settings. β Additionally. β For developers and activate: π§ Debugging by USB π Unlocking OEM (point!)
Connect the smartphone to the PC, confirm the debugging permission on the phone screen.
Launch the Mi Unlock Tool, log in to your Mi Account (should match your phone account!). Follow the program instructions.
Once you send an unlock request, Xiaomi will link your device to your account. Usually you need to wait 168 hours (7 days), but sometimes the period increases to 30 days.
π‘
If the Mi Unlock Tool gives you a βCouldnβt unlockβ error after waiting, try using the developer version of the tool (e.g., the βCouldnβt unlockβ version, miflash_unlock-en-6.5.224.24) or connect to the PC through USB-Hub β This sometimes solves driver problems.
3.Selecting the Right TWRP Version for Your Model
Not every version of TWRP is right for your device, and using the wrong build can result in a soft brick (the device turns on but doesnβt load) or a hard brick (completely inoperable).
Check compatibility on the official website twrp.me/Devices.
- π± Xiaomi 13 Ultra β twrp-3.7.0_12-v7.0_A13-sagit.img (supportive dynamic_partitions)
- π± Redmi Note 12 Pro+ β twrp-3.7.0_12-20231014-redwood.img
- π± POCO F5 β twrp-3.7.0_12-0-mondrian.img
For devices with A/B partitions (such as Xiaomi 12T or POCO X5 Pro), you need to flash TWRP on both slots ( a and b).
| Xiaomi model | Code name | Type of separation | Features of TWRP |
|---|---|---|---|
| Xiaomi 13 Pro | nuwa | Dynamic Partitions | TWRP with super.img support is required |
| Redmi Note 12 Pro+ | redwood | A/B (slot) | Switch on both slots |
| POCO F4 GT | ingres | A-only | Standard firmware |
| Xiaomi 11T Pro | vili | A/B | Possible problems with encryption |
How to find out the code name of your Xiaomi?
4. Install TWRP via Fastboot
The most reliable way to flash TWRP is through Fastboot mode, which requires ADB and Fastboot tools that can be downloaded from the Android Developers website.
Step-by-step:
- Unpack the archive from the platform-tools to the root of the C:\ disk (e.g., C:\platform-tools\).
- Place the twrp-*.img file in the same folder.
- Open the command prompt in this folder (click Shift + right mouse button β βOpen PowerShell window hereβ).
- Turn off your smartphone and press Volume Down + Power to log into the Fastboot.
- Connect the device to your PC and check the connection with the command: fastboot devices should show the serial number of your phone.
- Please. TWRP Team: Fastboot Flash Recovery twrp-3.7.0_12-0-redwood.img Replace the file name with yours.
- For devices with A/B Execute the following: fastboot flash recovery_a twrp-*.img fastboot flash recovery_b twrp-*.img
- Reboot to Recovery: fastboot boot twrp-*.img
βοΈ Firmware preparation TWRP
If you load your phone into a stock recave after you run TWRP, MIUI has overwritten it.
- I'm going to run TWRP again through Fastboot.
- Download immediately to TWRP (fastboot boot twrp.img).
- In TWRP, go to Advanced β Flash Current TWRP (if there is one).
π‘
On devices with MIUI 14+, after the firmware TWRP, you must immediately disable the bootloader signature verification, otherwise the system will overwrite the Recovery at the first boot.
5. Solving common mistakes
When installing TWRP, users often encounter problems, and here are the most common ways to solve them:
- β Failed to boot into recovery error Reason: Wrong version TWRP Solution: Check version compatibility TWRP and re-unlock the loader.
- β Device not defined in Fastboot Reason: Problems with drivers or USB-Solution: Install the Mi Flash Tool drivers and try another cable.
- β TWRP It is applied but replaced with a stock cause: MIUI Solution: After the firmware, load into the back-end. TWRP and disable signature verification (if there is such a clause in the settings).
- β Error "Invalid sparse file format at header" Cause: Damaged file TWRP. Solution: Download the image again and check the checksum MD5.
β οΈ Attention: If after installation TWRP phone stopped turning on (black screen, flashing backlight), don't panic. Try booting up to Fastboot. + Power) and flash the stock firmware through the Mi Flash Tool, which restores performance in 90% of cases.
6.The first steps in TWRP: backup and settings
Once you have successfully installed TWRP, the first thing you do is create a complete backup system, which will save your data in case of errors in further manipulation.
How to make a backup in TWRP:
- In the main menu, select Backup.
- Mark the sections: Boot, System, Data, Vendor (for devices with dynamic_partitions Choose Super).
- Press Select Storage and select the location of the save (internal memory or microSD).
- Swipe to start the backup.
It is also recommended that:
- π Set a password for TWRP (Settings β Set Screen Lock).
- π± Disable Signature Verification (Settings) β Enable MTP file transfer).
- π Enable backup compression (Settings) β Use Compression).
If you plan to get root rights, download the latest version of Magisk (Magisk-v26.4.zip) and run it through Install β Select Zip in TWRP.
β οΈ Note: On some models (Xiaomi) 12S Ultra, Redmi K50 Gaming) Magisk firmware may cause a download failure due to DM-Verity protection. disable_dm-verity_forceencrypt.zip.
7.TWRP Update and Return to Stock Recavator
Over time, new versions of TWRP with bug fixes and support for fresh firmware are released.
- Download the new.img file TWRP.
- In TWRP, select Advanced β Install Recovery Ramdisk.
- Specify the path to the downloaded file and confirm the installation.
If you need to return stock recavators (for example, for warranty repair), download the official firmware for your model from the Xiaomi Firmware website and thread it through the Mi Flash Tool with the clean all option.
For devices with an unlocked bootloader, you can also return stock recavators via Fastboot:
fastboot flash recovery recovery_stock.img
fastboot reboot