TWRP (Team Win Recovery Project) is an indispensable tool for Xiaomi smartphone owners who want to gain full control of the device, which can install custom firmware, back up the system, restore data after crashes or even βresuscitateβ the phone after a failed update. However, logging into TWRP on Xiaomi requires preliminary preparation: unlocking the bootloader, installing the recovery itself, and sometimes even bypassing the MIUI security mechanisms.
In this article, we will look at all the steps from unlocking the bootloader to directly logging into TWRP, including solving typical errors (for example, Invalid image or hanging on the Mi logo). Particular attention will be paid to models with Qualcomm and Mediatek chipsets, because the process is different for them. If you are a beginner, do not skip the sections on data backup and firmware compatibility checks - this will save you from "bricking" the device.
What is TWRP and why is it necessary for Xiaomi?
TWRP (Team Win Recovery Project) is an alternative recovery that replaces the standard recovery menu on Xiaomi. Unlike the stock recovery, TWRP provides:
- π Ability to create full backups and restore them.
- π§ Install custom firmware (for example, LineageOS, Pixel Experience).
- π Overcoming restrictions MIUI (Removing embedded applications, changing memory markup).
- π οΈ Data recovery after failures or failed firmware.
- π Installation of patches and modifications (e.g. Magisk for root rights).
Without TWRP, many Xiaomi operations are simply impossible. For example, if you want to flash Global ROM on a Chinese version of a smartphone or remove ads in MIUI, you need custom recovery, but it is important to understand that installing it voids the warranty and can lead to data loss if you do not follow the instructions.
β οΈ Note: On Xiaomi models with a locked bootloader (Redmi Note 12, POCO X5 and newer) before installation TWRP You need to unlock the bootloader through the official Mi Unlock tool.
Preparation of the smartphone: unlocking the loader
The first and mandatory step is to unlock the bootloader.Without this, Xiaomi will not allow the installation of TWRP or any other unofficial firmware.The process takes 3 to 7 days (due to Xiaomi's policy) and requires:
- Linking the Mi Account to the device.
- Turn on Developer Mode (Settings β About Phone β MIUI version β tap 7 times).
- Activate the OEM Unlock and USB Debugging options in the developer menu.
- Use the official Mi Unlock Tool (you can download it on the Xiaomi website).
Once you send the unlock request, you'll have to wait for confirmation.
- π± Do not drop your phone to factory settings.
- π Donβt untie your Mi Account from your device.
- π Don't update. MIUI (This can reset the waiting timer).
When the bootloader is unlocked, a warning will appear on the turn on screen This device is unlocked. Now you can proceed to install TWRP.
Installation of TWRP on Xiaomi: step-by-step instructions
There are two main ways to install TWRP: via Fastboot and using the TWRP Official App. Weβll look at both options, but for most Xiaomi models (especially newer ones), only Fastboot is suitable.
Method 1: Installation via Fastboot (recommended)
You'll need:
- π₯οΈ Computer with drivers installed ADB/Fastboot (download).
- π± File. TWRP For your model (download only from the official website!).
- π Cable USB Type-C (preferably original).
Steps:
- Turn off the phone 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 If the device is not identified, install the drivers again.
- Switch the TWRP command (replace twrp.img to your file name): fastboot flash recovery twrp.img
- After a successful firmware immediately go to TWRP, otherwise MIUI And you can re-write it with a standard recaveri. twrp.img
βοΈ Firmware preparation TWRP
Method 2: TWRP Official App (for experienced)
This method is suitable for devices with already unlocked bootloader and root rights. Install an app from Google Play, select your model and follow the instructions. However, for most Xiaomi, this method does not work due to the limitations of MIUI.
β οΈ Note: On some models (Redmi Note 10 Pro, POCO X3 Pro) after firmware TWRP You may need to disable the bootloader's signature check. TWRP Go to Mount. β Disable DM-Verity.
How to Sign In to TWRP on Xiaomi After Installation
After successful firmware TWRP to enter it in several ways:
- π Hardware: Turn off the phone, then press the Volume up + Food and hold until the logo appears TWRP.
- π± Through ADB: Connect your phone to your PC and execute the command: adb reboot recovery
- π§ Through the terminal (if there is a root): Enter in the Terminal app: su -c "reboot recovery"
If you press the buttons and load the phone into a standard MIUI recavator, then the TWRP has been overwritten.
- Repeat the TWRP firmware via Fastboot.
- Immediately after the firmware, run the command fastboot boot twrp.img to boot into TWRP without overwriting.
- From the TWRP menu, go to Install β Install Image and re-scan TWRP by selecting the Recovery section.
π‘
If, after entering, TWRP The screen does not respond to touch, connect OTG-This is a common problem on new Xiaomi models with unofficial recaveri builds.
Solving Common Errors When Logging into TWRP
Even with the right TWRP installation, users are likely to experience errors.
| Mistake. | Reason. | Decision |
|---|---|---|
| Invalid image when running a firmware | Incorrect version of TWRP for model or corrupted file | Download the image from the official TWRP website and check the model name |
| Phone hangs on Mi logo after exiting TWRP | MIUI re-recorded recavers or damaged firmware | Re-swipe TWRP through Fastboot and turn off DM-Verity |
| The sensor is not working in TWRP | Incompatible Recaveri Assembly | Use it. OTG-Mouse or find an alternative version TWRP for your model |
| Failed to mount /data | Encrypted data section | Enter the screen lock password in TWRP or format /data (data loss!) |
If after installing TWRP, the phone stopped turning on, try:
- Download to Fastboot and flash stock Recovery command: fastboot flash recovery stock_recovery.img
- Use the Mi Flash Tool to completely reflash MIUI.
What to do if TWRP asks for a password?
Backup and recovery in TWRP: how not to lose data
One of the great benefits of TWRP is that it can backup your system completely, and it will save your data if something goes wrong with the firmware.
- Log in to TWRP and select Backup.
- Mark the redundancy sections: Boot, System, Data, Vendor.
- Select a save location (preferably on MicroSD or OTG-flash-drive).
- Swipe to start the process.
Recovery is done similarly through Restore.
- π Backup with one Xiaomi model is not suitable for another!
- π Update your backups regularly (especially before firmware).
- π If the data is encrypted, a password will be required to restore it.
β οΈ Attention: Backup in TWRP Does not store the contents of internal memory (/sdcard). Copy important files (photos, videos) separately to your PC or cloud!
π‘
Backup in TWRP is your insurance against bricking your phone, and do it before every firmware or system modification.