Installing custom TWRP on Xiaomi smartphones gives you access to advanced device management capabilities, from creating full backups to firmware informal ROM. However, the process requires care - errors at the stage of unlocking the bootloader or firmware can lead to a "brick" (inoperability) of the phone. In this guide, we will analyze all the steps from tool preparation to the final test of TWRP.
It is important to understand that the procedure differs for different models Xiaomi/Redmi/POCO. For example, Xiaomi 13 Pro and Redmi Note 12 use different versions of the recovery, and some devices (for example, POCO F5) may require additional configuration of VBmeta. We take these nuances into account and provide universal solutions with a focus on the current models of 2023-2026.
Before you start, make sure you're prepared for the risks of losing warranty, resetting data, manual system repair. If your goal is just to get root rights, consider alternatives like Magisk without completely replacing the backup. For experienced users, TWRP will be a powerful tool, but for beginners, we recommend that you follow the instructions carefully.
Preparation: What You Need Before Installing TWRP
Before starting the procedure, collect all the necessary tools and files. Without proper preparation, you risk errors such as Fastboot unknown command or the inability to unlock the bootloader.
- π± Xiaomi smartphone with a battery charge of at least 70% (critical for avoiding failures).
- π» Computer running Windows 10/11, macOS or Linux (macOS will require additional drivers).
- π Cable USB Type-C (preferably original β cheap cables can cause connection problems).
- π οΈ Utilities: ADB Fastboot (part of Googleβs Platform Tools), Mi Unlock Tool for unlocking the bootloader.
- π File. TWRP for your model (download only from the official website twrp.me or trusted sources such as: XDA Developers).
Pay special attention to the choice of version TWRP. For example, for Xiaomi. 12T fit twrp-3.7.0_12-v7.0_A13-plato.img, And for the Redmi Note. 11 Pro+ β twrp-3.6.2_11-v6.7_A12-peux.img. Firmware and recovery versions are common causes of errors. MIUI in the phone settings (Settings) β The phone. β Version. MIUI).
β οΈ Note: If your device is running Android 13+ With a security patch newer than June 2023, you may need to roll back to an older version MIUI before installation TWRP. This is due to the tightening of Xiaomiβs security policy.
Also back up your important data. Installing TWRP involves completely resetting the data partition if you plan to flash custom ROMs.
- π Mi Cloud (for contacts, notes, photos).
- πΎ Local Copying on PC (for files in folders) DCIM, Downloads).
- π Apps like Swift Backup (require root, but saves application settings).
2. Unlock the bootloader on Xiaomi
The bootloader on Xiaomi smartphones is locked by default, and unlocking it is a mandatory step before installing TWRP. The process takes 3 to 7 days due to Xiaomiβs policy, which requires waiting for confirmation through a Mi Account.
Here's the step-by-step instruction:
- Link your Mi Account to your device: Go to Settings β Xiaomi Account. Sign in to your account (if not, register a new one), activate the Data Sync option and Find your device.
Allow debugging over USB and unlocking OEM:
- Back to Settings β Additionally. β For developers.
- Enable USB Debugging and OEM Unlocking.
Then connect your phone to your PC and start the Mi Unlock Tool (download the latest version from the official website). Log in to the same Mi Account as the phone. The utility will show a waiting timer (usually 168 hours for new accounts).
β οΈ Warning: If a Couldn't unlock error occurs when unlocking, check: Mi Account is tied to your phone for more than 7 days. The device has a mobile network or Wi-Fi enabled (unlockable without an Internet connection). USB.
A tied Mi Account|Debugging is on. USB|Unblocking permitted OEM|Drivers installed ADB/Fastboot|Battery charge >70%-->
3. Install ADB and Fastboot on PC
To run TWRP through Fastboot, you need to configure the ADB environment on your computer, so you can send commands directly to the bootloader.
For Windows:
- Download Platform Tools from Google.
- Unpack the archive into the root of the disk C:\platform-tools\.
- Add a path to the folder to the environment variables: Open Control Panel β System β Additional System settings β Environment variables. In Path, add the line C:\platform-tools\.
ADB
adb versionThe utility version should be displayed (e.g. 1.0.41).
For macOS/Linux:
Use the package manager:
- π macOS (via Homebrew): brew install android-platform-tools
- π§ Linux (Debian/Ubuntu): sudo apt install adb fastboot
After installation, connect the phone to the PC and do:
adb devicesIf the device appears in the list (e.g., 1234abcd device), the ADB works correctly. If not, check the drivers or try another cable.
π‘
If the adb device command returns unauthorized, the phone will receive a request for debugging permission, confirm it and repeat the command.
4. TWRP firmware via Fastboot
When the bootloader is unlocked and the ADB/Fastboot is configured, you can start the TWRP firmware. This process consists of several critical steps:
- Turn your phone into Fastboot mode: Turn off the device. Press the Power button + Volume down for 10 seconds. The hare in the ear hat appears on the screen β this is Fastboot mode.
Connect your phone to your PC and check the connection:
fastboot devicesThe serial number of the device must be displayed.
TWRP:
fastboot flash recovery twrp.imgReplace. twrp.img to your file name (for example, twrp-3.7.0_12-v7.0_A13-plato.img).
Replace the RecavΓ©ri system with:
fastboot flash recovery_ab twrp.imgOn partition devices recovery_ab (for example, Xiaomi 12/13 (a) this step is mandatory, otherwise MIUI re-write TWRP first-time.
After successful firmware, restart the TWRP command:
fastboot boot twrp.imgIf it went right, you'll see the main TWRP menu with a touch interface, and if the screen is black or the MIUI logo appears, the firmware failed.
- π Repeat the process with another version TWRP.
- π₯ Check the integrity of the downloaded file (for example, through the hash amount). SHA-256).
- π§ Make sure the bootloader is truly unlocked (fastboot oem device-info should show Device unlocked: true).
What to do if TWRP does not start?
5. TWRP setup and reset prevention
After the first TWRP launch, several steps need to be taken to prevent it from being replaced by MIUI when it is rebooted, especially for Android 12+ devices.
Steps to set up:
- Create a recovery backup: In the main TWRP menu, select Backup. tick only Recovery. Press Swipe to Backup.
- Turn off signature verification: Go to Settings β Zip signature verification. uncheck the Enable zip signature verification box.
boot.img
- If you plan to get root, download boot.img from your firmware.
- Patch it through Magisk and run it through TWRP (Install β Select Image β boot.img).
To prevent MIUI from overwriting TWRP every time you restart, use the command:
fastboot flash recovery --disable-verity --disable-verification twrp.imgSome models (e.g., POCO F4) may require additional firmware vbmeta:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.imgβ οΈ Note: If after these manipulations the phone stops booting into the system, try flashing the original boot.img This often solves loop loading problems (bootloop).
| Xiaomi model | Does the firmware need vbmeta? | Does A/B support slots? |
|---|---|---|
| Xiaomi 13/13 Pro | Yes. | Yes. |
| Redmi Note 12 Pro+ | Yes. | Yes. |
| POCO F5 | No. | Yes. |
| Xiaomi 11T | Yes. | No. |
| Redmi 10 | No. | No. |
6. Solving common errors
When installing TWRP, users often face typical problems, and let's look at the most common ones and how to fix them.
Fastboot: Unknown Command [flash]
Reason: Wrong path to Fastboot or lack of rights.
- πΉ Make sure you are in a folder with platform-tools (use cd) C:\platform-tools\).
- πΉ Run the command line on behalf of the administrator.
Error: This package is for 'plato' devices; this is a'
Reason: discrepancy between the TWRP model and the device.
- πΉ Check the code name of your model (e.g. plato for Xiaomi) 12T).
Error: The phone does not turn on after the firmware
Cause: damage to the boot or recovery partition.
- πΉ Try to boot up in. TWRP via fastboot boot twrp.img.
Failed to mount /data (Invalid argument)
The reason: encrypted data section on Android 10+.
- πΉ V TWRP Go to Wipe. β Format Data and enter Yes.
- πΉ After formatting, reboot to TWRP.
π‘
If the phone does not boot after installing TWRP, the first thing to do is check the integrity of the embroidered boot and recovery partitions. 90% of the time, the problem is solved by re-running the original boot.img firmware.
7.Follow-up after installation of TWRP
Successful TWRP installation is just the first step. Now you can:
- π§ Get root rights: Fly Magisk through Install β Select Zip in the TWRP.
- π¦ Install custom firmware: download LineageOS, Pixel Experience or other ROM in.zip format and run through TWRP.
- πΎ Create a full backup: in the main menu, select Backup and mark all sections (Boot, System, Data, EFS).
- π Restore Stock Firmware: If something goes wrong, you can always roll back through Restore to the Restore. TWRP.
To firmware custom ROMs through TWRP, follow this algorithm:
- Download firmware (like LineageOS 20) and GApps (if you need Google services).
- Reboot to TWRP.
- Run Wipe β Advanced Wipe and mark Dalvik, Cache, System, Data.
- Select the firmware (Install β select ZIP).
- Please use GApps (if required).
- Reboot to the system (Reboot β System).
Remember that after firmware custom ROM may require reconfiguration of TWRP, as some firmware (such as Pixel Experience) overwrite the Recovery.