How to Download and Install TWRP on Xiaomi: A Complete Guide to Unlocking the bootloader

Installing a custom TWRP recavator on Xiaomi smartphones is the first step to full control of the device, which allows you to install unofficial firmware, back up the system, obtain root rights and even restore bricks after unsuccessful experiments, but the process requires care: a mistake at any stage can lead to a locking of the phone or loss of warranty.

In this article, we will look at all the steps from unlocking the bootloader to choosing the right version of TWRP for your Xiaomi model, focusing on new models from 2023 to 2026 (Redmi Note 12, POCO X5, Xiaomi 13T, etc.), where the installation process is different from older devices, and learn how to avoid common errors like Fastboot mode or Anti-Rollback, which often occur in beginners.

Warning: the procedure requires basic knowledge of working with ADB and Fastboot. If you have never worked with the command line, it is better to train on an old device or learn our basic instructions. For owners of Xiaomi with MediaTek processors (for example, Redmi 10C or POCO M5), the process will be more difficult due to the features of the chipset – this will also be discussed separately.

1 What is TWRP and why is it needed on Xiaomi?

TWRP (Team Win Recovery Project) is a custom recovery that replaces the standard recovery menu on Android. Unlike stock recovery, it provides:

  • πŸ“± Full system backup (including: /data, /system even EFS)
  • πŸ”§ Installation of unofficial firmware (LineageOS, Pixel Experience, MIUI Pro and others.)
  • πŸ”“ Getting root rights through Magisk or SuperSU
  • πŸ› οΈ Recovery from a soft brick (when the phone doesn’t load but reacts to a Fastboot)
  • πŸ“œ Editing System Files Directly from Recovery

On smartphones, Xiaomi TWRP is especially in demand due to the aggressive policy of the company: stock MIUI blocks many functions, and updates often come with a delay. For example, owners of Redmi Note 11 still do not get Android 14 in the official firmware, while custom builds based on AOSP have long supported the new version of the OS.

However, there are risks:

⚠️ Attention: Installation TWRP It resets all data on the device (if you don't backup in advance), and it also cancels the warranty - Xiaomi can refuse repairs if it finds traces of unlocking the bootloader. 12S Ultra) unofficial recovery installation may result in camera locking due to protection DRM.

If you use your phone to work with banking applications (Sberbank Online, Tinkoff), note that after obtaining root rights, they may stop working due to the SafetyNet trigger. This is solved by Magisk installation with the Universal SafetyNet Fix module, but requires additional manipulation.

Preparation of the device: unlocking the loader

Before installing TWRP, you need to unlock the bootloader. On Xiaomi, this is done through the official Mi Unlock Tool, but the process has several nuances:

  1. Your phone must be linked to a Xiaomi account (not Google!) without this, unlocking is impossible.
  2. Expectation 7-30 days. On new devices (2022 and later), Xiaomi introduced a mandatory wait after the account is tied. For example, for the Redmi Note 12 Pro+ it is 168 hours (7 days), and for flagships like Xiaomi 13 Ultra – up to 30 days.
  3. Initiation of debugging USB. Go to Settings. β†’ The phone. β†’ Version. MIUI and tap the build number 7 times to activate Developer Mode. β†’ Additionally. β†’ For developers, turn on: πŸ”Œ Debugging by USB πŸ”“ Unlocking OEM (point!)

Download the Mi Unlock Tool from the official en.miui.com/unlock website (the version must match your MIUI) and note that the tool only works on Windows (macOS/Linux will have to use a virtual machine).

Link Mi to phone |Enable developer mode |Activate USB Debugging and OEM Unlock | Download Mi Unlock Tool from the official website |Wait 7-30 days (for new models)

-->

The unlocking process:

  1. Turn off the phone and press Volume Down + Power to log into the Fastboot.
  2. Connect your device to your PC and start the Mi Unlock Tool (required on behalf of the administrator!).
  3. Sign in to your Xiaomi account in the program.
  4. Press Unlock and wait until it is completed (usually takes 1-5 minutes).

Where to download TWRP:

SourceReferencePlusesCons
Official website of TWRPtwrp.me/Devicesβœ… Verified assembliesβœ… Support for popular models❌ No new devices (rarely updated)
XDA Developersforum.xda-developers.comβœ… Active communityβœ… Unofficial ports for new models❌ Risk of running into broken assemblies❌ Registration is required
Telegram channels@twrp_russia, @xiaomi_twrpβœ… Quick updatesβœ… Support for Russian-speaking users❌ No guarantee of stability❌ Possible viruses in archives
GitHub (Developer Repositories)Example: mauronofrioβœ… Source code open.βœ… Frequent updates❌ It's hard to find the right model.

How to determine the code name of your device:

  1. Install the CPU-Z or DevCheck app from Google Play.
  2. Check the Model or Codename field (e.g., surya for POCO X3 NFC).
  3. Check with the base on XiaomiFlash.

For models with a MediaTek processor (e.g. Redmi 10C, POCO M5), look for TWRP marked MTK. They have a different firmware mechanism via the SP Flash Tool, not the Fastboot.

-->

4. Install TWRP via Fastboot (for Snapdragon)

For most Xiaomi devices on Qualcomm Snapdragon (90% models), installation takes place via Fastboot.

  • πŸ–₯️ Computer with Windows/Linux/macOS (Windows 10/11)
  • πŸ”Œ Cable USB Type-C (preferably original)
  • πŸ“¦ Archives with TWRP (file extension)
  • πŸ› οΈ Utilities. ADB Fastboot (you can download it in Android) SDK)

Step-by-step:

  1. Unpack the archive from TWRP in a folder with platform-tools (where adb.exe and fastboot.exe lie).
  2. Rename the file to twrp.img for convenience.
  3. Turn off the phone and press Volume Down + Power to log into the Fastboot.
  4. Connect the device to the PC and open the command line (Win + R β†’ cmd).
  5. Check the connection command: fastboot devices Should display the serial number of the phone. If not, install the Mi USB Driver drivers.
  6. TWRP command: fastboot flash recovery twrp.img
  7. Reboot to Recovery: fastboot boot twrp.img (this is a temporary run to check the operability)

If TWRP is successfully loaded, you can flash it constantly:

  1. In TWRP, select Advanced β†’ Flash Current TWRP (if you have one).
  2. Or repeat the command fastboot flash recovery twrp.img from PC.

⚠️ Note: On some models (Xiaomi) 11T Pro, POCO F4 GT) post-fix TWRP The stock receptacle automatically recovers when it reboots, so to avoid that, right after installation. TWRP Use Magisk or Disable Force Encryption (if you plan to use root).

What if Fastboot doesn’t see the device?
1. Check the cable, try another port. USB (preferably USB 2.0). 2. Install the driver manually through Device Manager (select "Mi Flashable Driver"). 3. Turn off driver signatures in Windows (click Win) + X β†’ Launch parameters β†’ Reboot in Safe Mode with Signature Check disabled). 4. Try another PC – sometimes the problem is in conflict with the antivirus (turn off) Avast/Kaspersky firmware-time).

5. Installation of TWRP on MediaTek (Redmi 10C, POCO M5, etc.)

Devices on MediaTek (Helio G35/G88/G99, etc.) are wired differently through the SP Flash Tool, a riskier process, as an error can lead to a complete loss of IMEI or β€œbrick”.

You'll need:

  • πŸ“¦ Firmware (stock) ROM) For your model (you can download Xiaomi Firmware Updater)
  • πŸ› οΈ SP Flash Tool (version 5.2124 or later)
  • πŸ”§ MediaTek Preloader Drivers (installed via MTK Driver Auto Installer)
  • πŸ“„ scatter.txt file from the firmware archive

Instructions:

  1. Unpack the firmware and find the scatter.txt file.
  2. Open the SP Flash Tool, click Choose and select scatter.txt.
  3. In the file list, find the recovery bar and specify the path to your twrp.img.
  4. Take off the boxes from all items except recovery!
  5. Turn off your phone without connecting it to your PC.
  6. In the SP Flash Tool, press Download and then connect the phone to the PC off.
  7. Wait for the green mug (OK) and turn off the device.

For TWRP inputs on MediaTek, use the Volume Up + Power combination (on some models – Volume Up + Down + Power).

-->

6. Common errors and their solution

Even with the exact following of the instructions, there can be problems.

Mistake.Reason.Decision
Fastboot: unknown commandOlder version of fastboot or the wrong way to filesDownload fresh platform-tools from the Android site or check the path in the command line
Anti-Rollback (Error 7)Trying to flash the old version of TWRP to a new firmwareLook for TWRP marked Anti-Rollback or roll back to old MIUI
The phone does not turn on after the firmwareIncompatible version of TWRP or interrupted processTry logging into Fastboot (Loudness Down + Power) and flashing stock recavers through the Mi Flash Tool
Invalid sparse file format at headerThe damaged twrp.img fileDownload TWRP again (check the MD5 checksum)
TWRP is stitched, but reset to stockXiaomi blocks changes to the recovery sectionAfter you have TWRP firmware, install Magisk or no-verity-opt-encrypt patch.

If after installing TWRP, the phone boots in a bootloop, try:

  1. Sign in to TWRP and make Wipe β†’ Format Data (this will delete all data!).
  2. I want to see Magisk (if you plan to root).
  3. Reboot to the system.

Models with Dynamic Partition (Xiaomi 12/13 Series, Redmi K50) may require manual partition resize via fastboot resize-logical-partition.It's a tricky procedure - if you're not sure, you'd better go to XDA or thematic chats.

7 What to do after installing TWRP

Successful TWRP installation is only half the battle.

  • πŸ”„ Make a full backup (select Backup to the backup) TWRP and mark all sections: Boot, System, Data, EFS). Save a copy on the PC!
  • πŸ”“ If you want root, go to Magisk. Magisk-vXX.X.zip. V TWRP Choose Install β†’ Select a file β†’ I'll send it back.
  • πŸ“± Install Magisk Manager (or Magisk Delta for newer versions) to manage root rights.
  • πŸ›‘οΈ Turn off forced encryption (if you plan to use custom firmware). disable_forceencrypt.zip.