Why you need TWRP on Xiaomi and when to use it
TWRP (Team Win Recovery Project) is a powerful tool for Xiaomi smartphone owners that opens up opportunities far beyond the standard Mi Recovery. With it, you can install unofficial firmware, backup the entire system (nandroid backup), restore data after crashes, and obtain root rights through Magisk. However, transitioning to TWRP requires preliminary preparation β without an unlocked bootloader and properly installed recovery, you risk getting a βbrickβ.
In this article, we will discuss the current ways of entering the TWRP Xiaomi in 2026, including models with Qualcomm and Mediatek processors, and consider the typical errors that turn a smartphone into a useless piece of plastic. + Volume upwards, and it requires technical training. If you're a beginner, watch your every step carefully.
Warning: Incorrect actions can lead to loss of warranty, locking of the device or even physical damage to the chips (in case of errors when you run your firmware through fastboot).If your goal is simply to reset or update the MIUI, use standard methods through Settings β About Phone β System Update.
Preparation of the smartphone: unlocking the loader
The first and mandatory step is to unlock the bootloader, without which the TWRP wonβt start, and attempts to install it will lead to the FAILED error (remote:βFlashing is not allowed in Lock Stateβ).
- π Requires to link your Mi Account to your device (minimum 72 hours of active use).
- β³ Waiting. SMS-Unlocking code can take anywhere from a few minutes to 360 hours (15 days).
- π± On some models (for example, Redmi Note 12 Pro)+ Xiaomi 13 Ultra unlock may not be available due to manufacturer policy.
- π» You need a computer with installed drivers ADB and Fastboot.
Instructions for unlocking:
- Activate Developer Mode: Go to Settings β About Phone and click on MIUI Version 7 times.
- Enable USB Debugging and OEM Unlock in the Settings menu β Additional β For developers.
- Download the official Mi Unlock Tool and log in to your Mi Account.
- Connect your smartphone to your PC in fastboot mode (turn off the device, then press Power + Volume down).
- Run the Mi Unlock Tool and follow the instructions. If you receive a waiting message, wait patiently.
β οΈ Note: Once the bootloader is unlocked, the smartphone will perform a hard reset. Store important data in advance on your PC or in the cloud. Also note that some banking applications (such as SberBank Online or Tinkoff) may stop working due to the SafetyNet trigger.
Selecting the Right TWRP Version for Your Model
The error in choosing a version of TWRP is one of the main reasons for the βbrickingβ of smartphones, because recovery must match not only the model, but also the exact modification of the device. For example, the Redmi Note 11 Pro 5G (codename veux) and Redmi Note 11 Pro 4G (codename peux) require different files.img.
Where to look for the current versions:
- π Official website TWRP β Here are published stable assemblies for popular models.
- π₯ Telegram channels of developers (for example, Xiaomi Firmware Updater or TWRP for Xiaomi).
- π§ XDA-Developers Forum β Unofficial ports for new devices are often posted here.
How to check compatibility:
- Find out the code name of your model: adb shell getprop ro.product.device Or look at Settings β About Phone β Model (for example, Redmi Note 10 Pro is sweet).
- Compare the code name to the file name TWRP. For example, for sweet look for a file of the view twrp-3.7.0_12-0-sweet.img.
- Check the build date β if the file is older than 6 months, look for a more recent version.
| Xiaomi model | Code name | Processor type | Recommended source of TWRP |
|---|---|---|---|
| Redmi Note 12 Pro+ 5G | ruby | Mediatek Dimensity 1080 | XDA-Developers (unofficial port) |
| Xiaomi 13 | fuxi | Qualcomm Snapdragon 8 Gen 2 | Official website of TWRP |
| POCO F4 GT | ingres | Qualcomm Snapdragon 8 Gen 1 | Telegram channel POCO Updates |
| Redmi 10C | fog | Qualcomm Snapdragon 680 | Official website of TWRP |
β οΈ Note: On devices with Mediatek processors (e.g. Redmi Note 11 or POCO M4 Pro) installation of the wrong version TWRP may result in loss IMEI Always check user reviews before firmware.
π‘
If you canβt find TWRP for your model, try searching by platform code (e.g. sm6225 for Snapdragon 695) β sometimes ports are made for entire families of chipsets.
Installing TWRP on Xiaomi: a step-by-step process
When the bootloader is unlocked and the correct version of TWRP is downloaded, you can start installing it. There are two main methods: through fastboot (recommended for most models) and through the TWRP Official App (only for some devices), and we'll look at the first method, because it's universal.
Tools required:
- π₯οΈ Computer with Windows/Linux/macOS and established ADB/Fastboot.
- π± Smartphone with unlocked bootloader and enabled debugging USB.
- π Cable USB Type-C (preferably original).
- π Twrp version-name-model.img file (rename it to: twrp.img convenienceally).
Instructions for installation via fastboot:
βοΈ Preparation for installation TWRP
- Turn off your smartphone and put it in fastboot mode (clip Power + Volume down).
- Connect the device to your PC and check for detection: fastboot devices should show a serial number of the device.
- TWRP command: fastboot flash recovery twrp.img
- For partition devices recovery_ab (for example, Xiaomi 12T) Use: Fastboot Flash recovery_ab twrp.img
- After a successful firmware, don't reboot! go straight to TWRP: fastboot boot twrp.img
If it went well, you'll see the TeamWin logo and the main recovery menu, and you can start building backups or installing custom firmware.
What if fastboot doesnβt see the device?
How to Sign In to TWRP Recovery on Xiaomi
Once you install TWRP, there are three ways to upgrade to it:
- Fastboot boot twrp.img This method does not replace stock recovery, but allows you to boot once to TWRP.
- Through the button combination: Turn off your smartphone. Press Power + Volume up for 5-10 seconds. When the Mi logo appears, release the power button, but keep Volume up.
- Available via ADB terminal (if the system is booted): adb reboot recovery
Important: On some models (e.g., POCO F5 or Redmi K60), a button combination can lead to stock recovery, in which case use fastboot boot or set TWRP as a permanent recovery (fastboot flash recovery command).
If you're asked to enter a password after you log in to TWRP, and you don't remember it, don't try to guess. Three wrong attempts will result in all the data being erased.
- Connect your smartphone to your PC.
- In TWRP, select Advanced β File Manager.
- Go to /data/system and delete locksettings.db, locksettings.db-wal, locksettings.db-shm files.
- Reset, the password will reset.
π‘
If after installing TWRP smartphone loads into stock recovery, then the firmware MIUI overwrote your custom recovery. Solution: disable automatic update recovery in the settings TWRP (Settings menu β Prevent MIUI from overwriting recovery).
Typical errors and their solutions
Even experienced users have problems with TWRP, and here are the most common errors and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| FAILED (remote:'Flashing is not allowed in Lock State') | The bootloader is not unlocked | Unlock the bootloader through the Mi Unlock Tool |
| Invalid sparse file format at header magic | The.img file is damaged. | Download the file again, check the MD5 checksum |
| The smartphone does not turn on after firmware | Incompatible version of TWRP or interrupted process | Swipe stock firmware through Mi Flash Tool in clean all mode |
| TWRP does not see internal memory | Data Encryption (FBE) | Enter your password in TWRP or format data (loss of data!) |
The OrangeFox Recovery error (alternative to TWRP) is particularly insidious when the smartphone goes into a bootloom after installation, due to conflict with the kernel modules.
- Download the kernel (boot.img) from stock firmware for your model.
- Fastboot: fastboot flash boot.img
- Reset the TWRP.
β οΈ Note: If you have been manipulated by TWRP If your camera or fingerprint sensor stops working, you're probably running an incompatible firmware, and you can only restore functionality by going back to the sewage software.
Security and recommendations after TWRP installation
Successful TWRP installation is only half the battle, and now you need to keep the system running smoothly and protect the data.
- π Create a full backup through Backup in TWRP. Select the Boot, System, Data sections, EFS (For models with Mediatek, save a copy on PC.
- π‘οΈ Turn off automatic updates MIUI, Otherwise, stock recovery will re-write TWRP: Settings β The phone. β Updating the system β βοΈ β Auto-update β Turn it off.
- π Install Magisk for root rights management. Download only from the official GitHub repository.
- π΅ Do not delete system applications without checking, for example, deleting com.qualcomm.qti.telephonyservice will result in network loss.
If you plan to install custom firmware (like LineageOS or Pixel Experience), first check their compatibility with your model on the XDA forum.
For owners of devices with Mediatek (for example, Redmi Note) 11 or POCO M4 Pro) it is important to keep the nvram and nvdata partitions, which are responsible for the operation of wireless modules. Wi-Fi/Bluetooth even after returning to the stock firmware.
π‘
Before installing any firmware through TWRP, check the hash amount (SHA-256) of the downloaded file, which will prevent firmware from corrupting or fake files.