Why to Install TWRP on Xiaomi
TWRP (TeamWin Recovery Project) is a powerful tool for Xiaomi smartphone owners that allows you to access advanced features of the system. It can install informal firmware, create full backups, restore data and even bypass some of the limitations of MIUI. However, the installation process requires preparation: from unlocking the bootloader to choosing the right version of the.img file for your model.
Unlike the standard Mi Recovery, which offers a minimal set of options (reset to factory settings, check for updates), TWRP provides full control over the partitions of the deviceβs memory. This is especially true for users who want to flash the Custom ROM (like LineageOS or Pixel Experience), get root rights through Magisk, or simply have a backup before experimenting. But itβs important to understand that installing TWRP voids Xiaomiβs warranty and can lead to locking the device if errors occur.
This guide is suitable for most modern Xiaomi, Redmi and POCO models (from Redmi Note 7 to Xiaomi 14 flagships). However, the process may be different for devices based on MediaTek processors (for example, Redmi 9 or POCO M3) β they will require additional drivers and utilities. If you are a beginner, we recommend first to study the theory: what a bootloader is, what distinguishes fastboot from recovery, and why you can not install TWRP on devices with a locked bootloader.
Preparation: What to do before installing TWRP
Before you start firmware, make sure your device is ready for the procedure. The first and most important thing is to unlock the bootloader. Without this step, installing TWRP is impossible. Xiaomi officially allows you to unlock the bootloader through the Mi Unlock service, but the process can take up to 72 hours (due to the company's security policy).
- π± Xiaomi smartphone with a battery charge of at least 60% (to avoid disconnection during firmware).
- π» Computer running Windows 10/11 (for Mac/Linux Additional adjustments will be required ADB).
- π Original. USB-cable (cheap cables can cause errors in data transmission).
- π Mi Account tied to the device (required to unlock the bootloader).
- π Backup of data (installation) TWRP will cause the device to reset).
Also download the necessary tools:
- π οΈ Platform Tools (contains fastboot and adb).
- π Mi Unlock Tool (official utility for unlocking the bootloader).
- π¦ File. TWRP For your model (download only from the official website) TWRP or verified sources, for example, XDA Developers).
β οΈ Note: Some Xiaomi models (e.g. Redmi Note 10 Pro) POCO X3 Pro) have Anti-Rollback protection, install outdated version TWRP On such devices can lead to hard brick (unable to recover without service equipment).Always check the compatibility of the version of the recovery with your firmware!
Step 1: Unlock the bootloader through Mi Unlock
Unlocking the bootloader is a must-have without which it is impossible to flash TWRP. Xiaomi has made this process more difficult in the latest versions of MIUI, so follow the instructions carefully:
- Activate Developer Mode: Go to Settings β About Phone β MIUI Version and tap it 7 times until a notification appears You became a developer.
- Enable USB debugging and OEM unlocking: Return to Settings β Additional β Developer and activate: USB Debugging OEM unlock (may be absent on some models).
Link your Mi Account to your device:
Go to Settings β Xiaomi Account β Mi Cloud and make sure that the device is tied to the account. Without this, the Mi Unlock Tool will not work.
Now connect your smartphone to your computer and start the Mi Unlock Tool:
- Sign in to the utility under the same Mi Account as on your phone.
- Press Unlock and follow the instructions. The utility can request confirmation via SMS or email.
- On new devices (Xiaomi 12/13, Redmi Note 11/12), unlocking takes 72 hours (this is a Xiaomi limitation, you canβt get around it).
β οΈ Warning: If the device doesn't boot after unlocking (hangs on the Mi logo), don't panic. That's OK, just run the official firmware through the Mi Flash Tool and repeat the process. But remember, you can only lock the bootloader again after 30 days!
Mi Account is tied to the device|Debugging by USB included|The device is more charged. 60%|Drivers installed ADB/Fastboot|Downloaded official firmware in case of failure-->
Step 2: Install ADB and Fastboot drivers
To communicate with the device through the computer, you need ADB (Android Debug Bridge) and Fastboot drivers. Without them, commands will not be executed, and the device will not be determined in firmware mode.
If you downloaded Platform Tools (see Preparation section), unpack the archive to the root of the disk. C:\ (for example, C:\platform-tools\). Then:
- Connect your phone to your computer in Fastboot mode (turn off the device, then press Volume Down + Power until the Fastboot bunny appears).
- Open Device Manager (Win + X β Device Manager) and find a device with a yellow exclamation point (usually Android Bootloader Interface or Other devices).
- Right-click on it β Update the driver β Search on this computer β Select from the list β Install from the disk.
- Point the way to the file. android_winusb.inf in the platform-tools folder (for example, C:\platform-tools\extras\google\usb_driver\).
After installing the drivers, check the connection:
fastboot devicesIf you see the serial number of the device (for example, 1234abcd fastboot) in response, the drivers are installed correctly.
π‘
If the fastboot device command doesnβt show the device, try changing it. USB-Also check if the connection is blocked by antivirus (for example, Avast or Kaspersky often interfere with the work). ADB).
Step 3: Firmware TWRP via Fastboot
When the bootloader is unlocked and the drivers are installed, you can start the TWRP firmware. Importantly, only use the version of the backpack that is designed for your model and the MIUI version. For example, the Redmi Note 11 Pro+ 5G (veux) and Xiaomi 12T Pro (diting) require different.img files.
Firmware instructions:
- Download the file. twrp-3.7.0_12-0-?ux.img (Replace the Veux with your model code and place it in the platform-tools folder.
- Move the device to Fastboot mode (as described above).
- Open the command line in the platform-tools folder (click Shift). + right-button β Open the PowerShell window here and execute the command: fastboot flash recovery twrp-3.7.0_12-0-?ux.img
- After successful firmware, execute: fastboot boot twrp-3.7.0_12-0-?ux.img It'll temporarily load. TWRP, avoid overwriting standard recaverys at the first load.
If it goes well, youβll see a touch-controlled TWRP menu, but on some devices (like the POCO F4 GT or Xiaomi 12S Ultra), you may need to take the additional step of disabling the firmware signature check:
fastboot flash vbmeta vbmeta.img
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.imgβ οΈ Note: On devices with dynamic partitions (e.g. Xiaomi) 11T Pro or Redmi K50) firmware TWRP It might not work, but it would require a special version of the Recaveri that supports it. dynamic_partitions (look XDA or in thematic chat rooms).
What happens if TWRP doesnβt start?
Step 4: Continuously installing TWRP and preventing overwriting
Many users face a problem: after the firmware TWRP It disappears when you first boot it into the system. MIUI It automatically restores the standard Recovery. TWRP, needle:
- Immediately after the temporary download to TWRP (fastboot boot), go to the Mount section and make sure that the System tick is marked.
- Download the file. disable_dm-verity_forceencrypt.zip Then, put it on the device (through the device). ADB push SD-map).
- In TWRP, click Install, select the downloaded file, and swipe for firmware. This will disable system integrity verification and data encryption, allowing TWRP to remain on the device.
- Reboot to the recaveri (not the system!). Now the TWRP must stay in place.
For devices with A/B-partitions (e.g. Xiaomi) 12, POCO F4) It's a little more complicated. You're gonna need to sew it up. TWRP on both slots ( a and b):
fastboot flash recovery_a twrp.img
fastboot flash recovery_b twrp.img| Xiaomi model | Type of section | Additional action |
|---|---|---|
| Redmi Note 10 Pro (sweet) | Normal. | Sweep disable_dm-verity |
| Xiaomi 11T Pro (vili) | Dynamic | Use it. TWRP supportive dynamic_partitions |
| POCO X3 NFC (surya) | A/B | Switch on both slots (recovery_a and recovery_b) |
| Redmi 9 (lancelot) | Normal. | Disable AVB 2.0 via vbmeta |
π‘
On devices with MIUI 13+ and later, you may need to disable MIUI Optimization in the developer settings (Settings β Developer β MIUI Optimization) otherwise the system will restore the standard recovery with each reboot.
Step 5: Backup and Restore in TWRP
One of the main advantages of TWRP is the ability to create full backups of the system (Nandroid backup), which will save your data in the event of a failed firmware or experimentation with root.
- In the TWRP menu, select Backup.
- Mark the backup sections (it is recommended to choose Boot, System, Data, Vendor).
- Select a storage location (internal memory or storage). SD-map).
- Swipe to start the process. Backup can take 10 to 30 minutes depending on the amount of data.
For recovery:
- In the TWRP menu, select Restore.
- Specify the folder with the backup and select the desired sections.
- Confirm swipe recovery.
Important: backups made in TWRP are not compatible with backups from Mi Cloud or standard recovery, and it is not recommended to restore backups to other device models, this will lead to a bootloop ( loop reboot).
π‘
If you plan to flash Custom ROM, first make a backup of the persist partition (responsible for IMEI and modem data).
Common mistakes and their solutions
Even with the correct following of the instructions, errors can occur, and here are the most common problems and ways to solve them:
- π¨ fastboot: error: cannot load 'twrp.img': img file is corrupted or not found. Make sure the file is in the same folder as fastboot.exe and its name is correctly listed (with extension).
- π The device is loaded into Mi Recovery instead of TWRP: The system overrecorded the recaveri. disable_dm-verity (see Step 4) Or use the command fastboot boot twrp.img temporary.
- π΅ Device not turned on after firmware (hard brick): This may happen due to incompatible version TWRP Solution: Flip the official firmware through the Mi Flash Tool in mode EDL (You need an authorized Xiaomi account).
If your Xiaomi model is equipped with a MediaTek processor (e.g. Redmi) 9A or POCO C31), firmware TWRP need:
- Install MediaTek Preloader drivers.
- Use the SP Flash Tool instead of fastboot.
- Disable SLA protection (on some models).