Installing a custom TWRP on Xiaomi smartphones is the first step to full control of the device, which allows you to install unofficial firmware, backup the system, remove preinstalled applications and even restore bricks after unsuccessful experiments.
Unlike the standard Mi Recovery, TWRP (Team Win Recovery Project) provides advanced features including touch control support, ADB work and the ability to mount partitions manually. But before you start, it is important to understand that the firmware recovery on Xiaomi models with a locked bootloader is impossible β it must be unlocked officially through the Mi Unlock Tool. This step takes up to 720 hours of latency (according to Xiaomi rules of 2026) and requires a binding Mi Account.
In this guide, we will analyze the entire process from preparation to checking the health of TWRP, including nuances for popular models (Redmi Note 12 Pro+, POCO F5, Xiaomi 13T).
Firmware Preparation: What to Do Before Installing TWRP
Before you start firmware, make sure that all the prerequisites are met, and ignoring them is the main reason for the "bricking" of devices.
- π Unlocked bootloader. Without this step, no further action is possible. Use the official Mi Unlock Tool (version at least 5.5.224.30 for Windows 11).
- π± Battery charge β₯ 70% Firmware in a discharged state can be interrupted at a critical stage.
- π» PC Windows/Linux. On macOS, there may be problems with drivers ADB/Fastboot.
- π Original. USB-Cheap cables often don't transmit data in Fastboot mode.
- π Backup data. Recovery firmware doesn't erase user files, but it's better to be safe.
Also check your device model through Settings β About Phone β Model. Some TWRP firmware is designed for specific modifications only. For example, the Redmi Note 11 Pro+ 5G (veux) and Redmi Note 11 Pro 5G (peux) require different recovery files.
β οΈ Note: If your device was purchased in China (the C-suffix version in the model, for example) 2201116TC), firmware TWRP It may result in a non-functioning module. NFC Use a recovery version marked CN.
Download the necessary files from verified sources:
- π Official website TWRP (Choose the latest stable version, avoid unofficial builds).
- π Platform Tools by Google (for the first time) ADB and Fastboot).
- π Stock firmware MIUI (in case of restoration).
Installation of drivers and configuration ADB/Fastboot
Without properly installed drivers, Windows will not recognize your device in Fastboot mode. Even if you have previously used ADB for debugging, additional drivers are required for firmware.
For Windows 10/11, follow the following steps:
- Connect your phone to your PC in Fastboot mode (turn off the device, then press Volume Down + Power until a bunny with the inscription FASTBOOT appears).
- Open Device Manager (Win + X β Device Manager).
- Find a device with a yellow exclamation point (usually Android Bootloader Interface or Other devices β Xiaomi...).
- Right-click β Update the driver β Search for drivers on this computer β Select from the list.
- Install the driver manually by selecting Android Bootloader Interface from the list.
To check the performance of ADB/Fastboot:
- Open the command prompt in the folder with Platform Tools (click Shift + right mouse button β Open the PowerShell window here).
- Enter the command: fastboot devices Should show the serial number of your device. If the list is empty, drivers are not installed.
β οΈ Note: On some laptops with USB 3.0 (blue ports) the device may not be defined in Fastboot. USB 2.0 (black) or hub.
Device is defined in fastboot devices|Drivers installed without errors|Battery charge β₯ 70%|File. TWRP scalable|Backup copy of data created-->
Step-by-step: firmware TWRP on Xiaomi
Now, to the core process, all commands are executed from the Platform Tools folder.
Step 1: Transfer the device to Fastboot mode
- Turn off your smartphone.
- Press the buttons Loudness down + Power for 10-15 seconds until the screen with a bunny and the inscription FASTBOOT appears.
Step 2. TWRP firmware
- Connect the device to the PC.
- In the command line, run fastboot flash recovery. twrp-3.7.0_12-veux.img (substitute twrp-3.7.0_12-veux.img in the name of your file).
- Wait for the message. OKAY [ 0.5s].
Step 3: Prohibit rewriting of the recaveri with stock firmware
By default, MIUI rewrites custom recaveri to standard when it first boots.
- Without disabling the device, execute the command: fastboot boot twrp-3.7.0_12-veux.img It'll temporarily load. TWRP memoryless.
- In the TWRP interface, go to Advanced β Flash Current TWRP (if available).
- Or manually run the file. disable_forceencryption_treble.zip (Android-based 10+), to disable forced encryption.
Step 4: Reboot to TWRP
After a successful firmware:
- In the command line, do: fastboot reboot recovery
- The device must be loaded into the TWRP touch-controlled interface.
What to do if TWRP does not start?
Common mistakes and their solutions
Even with the right instructions, there can be problems.
| Mistake. | Reason. | Decision |
|---|---|---|
| FAILED (remote: 'Not allow in Lock State') | The bootloader is not unlocked | Unlock the bootloader through the Mi Unlock Tool (requires a wait of 720 hours for new accounts) |
| Invalid sparse file format at header | A TWRP file or incompatible version is damaged | Download another recovery file (check model matching) or use.img instead of.zip |
| The device hung on the Mi logo | Improperly sewn boot or vendor | Download to Fastboot and flash the stock boot.img from the official firmware |
| TWRP does not see internal memory | Encryption FBE (File-Based Encryption) | Please. disable_forceencryption_treble.zip or enter the password in TWRP (if you ask) |
If the device does not turn on after TWRP firmware (black screen or freeze), try:
- π Hold the Loud up. + Power for 20 seconds for forced reboot.
- π₯οΈ Connect to the PC and execute: fastboot flash boot boot.img (where boot.img β stock-file from official firmware).
- π± If the screen is touch-sensitive, but nothing is displayed, maybe the display driver is damaged. USB-C (supported-model).
π‘
If TWRP doesnβt support your model, but youβre sure itβs compatible, try flashing it through the Official TWRP App from Google Play, which automatically picks up the correct version and prevents incompatible files from being bugged.
Additional TWRP settings after installation
After the first download to TWRP, it is recommended to perform several actions for stable operation:
- π Backup. Go to Backup and select the Boot, System, Data, Vendor partitions. SD-card.
- π§ Turn off authentication. At Mount, mark System, then Advanced. β File Manager Delete Files: /system/bin/install-recovery.sh /system/etc/recovery.img
- π Set up encryption. If you use a password, in Wipe. β Format Data enter Yes to reset encryption (data will be deleted!).
- π± Install Magisk (for root rights). Download the latest version Magisk.zip and run through Install.
For Android devices 12+ and dynamic partitions (dynamic_partitions) A special version may be required. TWRP supportive super.img. Check this in the Recovery settings: If the System partition doesnβt show up, your device uses dynamic partitions.
β οΈ Note: On some models (Xiaomi) 12/13, Redmi K50) Magisk firmware through TWRP This leads to a boot hover. In this case, use the patch method. boot.img via the official Magisk app.
Firmware custom firmware through TWRP
One of the main reasons for installing TWRP is the ability to install informal firmware such as LineageOS, Pixel Experience or crDroid.
Preparation:
- Download firmware in.zip format (for example, lineage-20.0-20260510-veux.zip).
- Check compatibility with your model (codename must match, for example veux for Redmi Note 12 Pro+ 5G).
- Download the appropriate GApps package (if the firmware is not Google services), for example NikGApps-basic-arm64-20-20260515.zip.
Firmware process:
- Reboot to TWRP (adb reboot recovery or buttons).
- Run Wipe β Advanced Wipe and mark: Dalvik / ART Cache System Data Cache
- Select Zip through Install β Select Zip.
- Immediately after the firmware, install GApps (if necessary) and Magisk (for root rights).
- Reboot β System: The first boot can take 10-15 minutes.
If after the firmware custom firmware device does not load:
- π Come back in TWRP Check the logs (advanced) β Copy Log).
- π± Try to sew another core (boot.img) stock-stack.
- π§ Make sure the firmware supports your version. MIUI (For example, firmware based on Android 13 is incompatible with Android 14).
π‘
Always check custom firmware reviews on the XDA Developers or 4PDA forums. Some builds may have critical bugs, such as broken Wi-Fi or Bluetooth.
Recovery of MIUI stock firmware
If you have decided to return to the original MIUI after experimenting with TWRP or custom firmware, follow this instruction:
Method 1: Fastboot (recommended)
- Download Fastboot firmware for your model from the official Xiaomi website (file with the extension.tgz or.zip).
- Unpack the archive in a folder with Platform Tools.
- Transfer the device to Fastboot (Loudness down + Power).
- Launch the file. flash_all.bat (For Windows, or execute manual commands: fastboot flash boot boot.img fastboot flash recovery recovery.img fastboot flash system system.img fastboot flash vendor vendor.img fastboot erase userdata fastboot reboot
Method 2: Through TWRP
If you have a working TWRP:
- Download Recovery firmware (.zip) for your model.
- Move the file to the device or SD-map.
- In TWRP, select Install β Select Zip and swipe the file.
- Run Wipe β Format Data (required!), then reboot.
β οΈ Note: When you return to stock firmware via Fastboot, all data will be deleted, including files in internal memory. If you want to save photos or documents, retrieve them through the Fastboot. TWRP (Mount β Enable MTP) before-fixing.