How to reflash TWRP Recovery on Xiaomi smartphones: a complete guide with nuances

Installing a custom TWRP recavator on Xiaomi smartphones is the first step to full control of the device, allowing you to flash unofficial firmware, backup the system, remove embedded applications and even restore bricks after unsuccessful experiments. But the process requires care: a mistake at any stage can turn the phone into a useless piece of plastic.

In this article, we will discuss three officially supported installation methods. TWRP on Xiaomi, including Redmi and POCO), Current for 2026: via Fastboot, via the app TWRP App (for unlocked bootloaders), and dirty method through temporary recovery, especially new models with dynamic partitions (DY Partitions), where standard instructions often do not work. You will also learn how to avoid common mistakes, such as hanging on the Mi logo or losing your name. IMEI.

Preparation of the device: unlocking the loader

Without a bootloader, TWRP cannot be installed. Xiaomi officially lets you unlock it, but the process requires waiting and following the rules:

  • πŸ”“ Link your Mi Account to your device: Go to Settings β†’ Xiaomi account β†’ Mi Cloud and log in. Without this step, unlocking is impossible.
  • ⏳ Wait 7-30 days: Once your account is tied, Xiaomi blocks unlocking for a week (for new devices) to a month (for older models).
  • πŸ’» Install Mi Unlock Tool: Download the official utility from the site en.miui.com/unlock (Windows version).
  • πŸ”Œ Put the debugging on. USB: In Settings β†’ About the phone tap 7 times on the version MIUI, Then go back to the settings. β†’ Additionally. β†’ For developers and activate debugging by USB and Unlock. OEM.

After preparation, connect your phone to your PC in Fastboot mode (turn off the device, then press Volume Down + Power) and launch the Mi Unlock Tool. Follow the program instructions. If you see the "Couldn't unlock" error, then not enough time has passed, check the unlock status in the application.

⚠️ Attention: Unlocking the bootloader resets the device to factory settings. backup data via Mi Cloud or locally on the PC.

πŸ“Š What Xiaomi model do you plan to use?
Redmi Note 12/13
POCO F5/X5
Xiaomi 13/14
Another model

2.Selection of TWRP version: official vs unofficial build

Not all versions of TWRP are equally useful: Official builds (twrp.me/Devices) support a limited number of Xiaomi models, and newer devices (such as the Redmi Note 13 Pro+ or Xiaomi 14 Ultra) often require unofficial ports from the community.

Type of assemblyAdvantagesDeficienciesWhere to download
Official.Stable work, support for updatesLow-supported models, outdated versionstwrp.me
Unofficial (OrangeFox, PitchBlack)Support for new devices, additional features (e.g. built-in Magisk)Risk of bugs, possible problems with encryptionXDA Forum or Telegram Channels
Temporary (for firmware)Does not require constant installation, suitable for one-time tasksDisappears after reboot, can not be used for backupsAny source, but you need to indicate the flag. --skip-secondary fastboot

For models with dynamic partitions (such as Xiaomi 12T or POCO F4 GT), look for builds marked "Dynamic" or "A/B." Check compatibility by device code (such as "vili" for POCO F3): it is listed on the box or in Settings β†’ About Phone β†’ Model.

πŸ’‘

If you are not sure about the TWRP version, check out the reviews on the XDA forum. Pay attention to the comments from the last 2-3 months - old discussions may contain outdated data.

3. Install TWRP via Fastboot (Universal Method)

This is the most reliable way, running on 90% of Xiaomi devices.

  • πŸ–₯️ PC Windows/Linux and installed drivers ADB/Fastboot;
  • πŸ“± Unlocked loader;
  • πŸ”— File. TWRP in.img format (e.g, twrp-3.7.0_12-vili.img);
  • πŸ”Œ Cable USB (preferably original).

Installation steps:

  1. Download and unpack Google’s Platform Tools to the C:\platform-tools folder.
  2. Move the TWRP file to the same folder and rename it to twrp.img.
  3. Open the command prompt in this folder (click Shift + right mouse button β†’ Open the PowerShell window here).
  4. Connect your phone in Fastboot mode and execute commands: fastboot devices (should display the serial number of the device) fastboot flash recovery twrp.img fastboot reboot recovery

If after rebooting in the recovery you see the standard Mi Recovery menu, then the system overwrote TWRP. This is normal for anti-Rollback devices (e.g. Redmi Note). 10 Pro. The solution is to flash. TWRP temporarily and immediately install Magisk or Disable_Dm-Verity_ForceEncrypt.

Battery charge > 50%|Screen lock disabled (PIN/graphical)|Data backup made.|PC will not go into sleep mode-->

What if the Fastboot can’t see the device?
1. Check the cable connection (try another USB port). 2. Install drivers manually through Device Manager (select "Android Bootloader Interface"). 3. Disable driver signatures in Windows (temporarily put the system in testing mode for this). 4. Try using Linux or MacOS - there are less driver problems.

4. Alternative methods of installing TWRP

If Fastboot didn’t work or you prefer simpler ways, consider these options:

Method 1: TWRP App (unlocked downloaders only)

The official TWRP App allows you to flash backs directly from your phone, but requires root rights or an unlocked bootloader.

  1. Install the app from Google Play.
  2. Select the device model in the "Select Device" section.
  3. Download the recommended version of TWRP.
  4. Click "Install TWRP" and confirm the installation.

The downside of the method: the app often offers outdated versions of the recavery.

Method 2: Temporary TWRP (for Magisk firmware or custom ZIP)

If you need to boot up to TWRP once (for example, for Magisk firmware), use the command:

fastboot boot twrp.img

This is not a replacement for the standard recaveri, but it allows you to temporarily boot into the custom room. Once you reboot, the TWRP will disappear.

Method 3: Firmware through another custom Recovery (OrangeFox)

Some users first install OrangeFox Recovery and then flash TWRP through it. This is true for devices where TWRP does not support encryption (FBE). Download a.zip TWRP file and run it through Install β†’ Select Zip in OrangeFox.

πŸ’‘

Temporary TWRP is the best choice for beginners, as it doesn’t make permanent changes to the system.

5. Common mistakes and their solutions

Even experienced users face problems with TWRP firmware, and here are the most common ones and ways to fix them:

  • 🚫 Invalid sparse file format at header magic TWRP Download it again and check the checksum (MD5).
  • πŸ”„ The phone is loaded into Mi Recovery instead of TWRP: The system overwrote the Recovery. Disable_Dm-Verity_ForceEncrypt.zip immediately after loading TWRP.
  • πŸ”’ Password requested when entering TWRP: device uses encryption (FBE). Enter the password from the lock screen or format the section /data (All data will be deleted!).
  • πŸ“΅ Touch doesn't work. TWRP: Download a special version of the recovery marked "touch-fixed" for your model.

If the phone doesn't boot into the system after installing the TWRP (hangs on the Mi logo), there's likely a problem with Anti-Rollback. Check the MIUI version and run a newer firmware through Fastboot with the --erase flag:

fastboot flash anti .


fastboot erase userdata

⚠️ Note: On devices with Dynamic Partitions (e.g. Xiaomi) 11T or POCO X4 Pro) the standard fastboot flash recovery command will not work. recovery_a twrp.img fastboot flash recovery_b twrp.img Otherwise, the recavator will not remain after the reboot.

6.What to do after installing TWRP?

Successful recovery firmware is only half the battle, and to avoid future problems, follow these steps:

  1. Create a full backup: in TWRP Select Backup and select Boot, System, Data, Vendor. SD-card.
  2. Sweep Magisk for root rights: download the latest Magisk.zip from GitHub and install it via Install β†’ Select Zip.
  3. Turn off forced encryption (if necessary): Disable_Dm-Verity_ForceEncrypt.zip, Otherwise, you may have problems with the system loading.
  4. Check IMEI: After manipulating partitions, network settings sometimes get confused. Enter the *#06# command in the engineering menu (#4636##) and compare it to the data on the box.

If you plan to flash custom firmware (like LineageOS or Pixel Experience), check their compatibility with your model first on the forum. XDA. Some firmware requires additional patches for the camera or module. NFC.

πŸ’‘

Before you install custom firmware, format the /data partition into TWRP (Wipe β†’ Format Data menu) to remove encryption and prevent download errors.

7.Restore the device after a failed firmware

If something goes wrong and the phone turns into a brick, don't panic. 95 percent of the time, it can be restored.

  • πŸ”§ Soft Brick (floated on the logo, but Fastboot works): Sweat the official firmware through the Mi Flash Tool (select "Clean All" mode). If the "Anti-Rollback" error, download the newer version MIUI.
  • 🧱 Hard Brick (no response to buttons, PC can't see device): Try clamping Volume up + Loudness down + Power for 20-30 seconds (emergency reset). Use EDL-Mode (emergency firmware via testpoints) You'll need a Qualcomm box or service center.

To restore through EDL I'll need a file. prog_emmc_firehose.mbn It's a risky method, because if you make a mistake, you can permanently damage your device.

FAQ: Answers to Frequent Questions

❓ Can we determine TWRP on Xiaomi without unlocking the bootloader?
No. Xiaomi blocks the change of the recovery partition at the bootloader level. The only workaround is exploits (like DirtyCOW), but they only work on older versions of Android (up to 7.0) and require root rights.
❓ Why After Installation TWRP phone doesn't load?
The reasons may be different: Implemented version TWRP (The system overwrote the recavers because of Anti-Rollback. Disable_Dm-Verity). The boot section is damaged (try to flash the original one). boot.img Solution: download to Fastboot. TWRP and swipe Magisk or restore backup.
❓ How to update TWRP before?
Download a new.img file and run it through Fastboot: Fastboot Flash Recovery twrp_new.img Or upgrade directly to TWRP: Install β†’ Install Image β†’ Select a file β†’ Recovery.
❓ Can I remove it? TWRP and return the stock Recovery?
Download the original. recovery.img For your model (you can use the official firmware) and run it through Fastboot: fastboot flash recovery stock_recovery.img Or go back to stock firmware via the Mi Flash Tool.
❓ Why in the TWRP I can't see the internal memory?
It's because of encryption (FBE). Solutions: Enter the password from the lock screen in TWRP (If you ask, format it. /data (All data will be deleted! Disable_Dm-Verity_ForceEncrypt.zip.