Installing custom TWRP on Xiaomi smartphones gives you access to advanced features: backups via Nandroid, firmware custom ROM (for example, LineageOS or Pixel Experience), root rights via Magisk, as well as the ability to βreanimateβ the device after a failed update. However, the process requires care: an error in the unlocking stage of the bootloader or firmware can turn the phone into a βbrickβ.
Unlike Samsung or Google Pixel devices, where it is enough to turn on OEM Unlock, Xiaomi will have to go through the official procedure of unlocking through the Mi Account and wait 7-14 on new models (on new models) 2023-2026 before 360 Also, not all versions TWRP compatible with the latest firmware HyperOS - we will talk about this in the section about the choice of the file Recaveri.
This instruction will be suitable for most Xiaomi/Redmi/POCO devices based on Qualcomm Snapdragon processors (Mi 10/11/12/13 series, Redmi Note 10/11/12, POCO F3/F4/F5, etc.). Owners of MediaTek devices (for example, Redmi 10C or POCO M5) will need an alternative method through the SP Flash Tool β we briefly discuss this in the FAQ.
Before you start, check:
- π Battery charge of at least 60% (when discharged during firmware, the phone may turn off).
- π± There is a scaling device on the device. MIUI (custom ROM They can block the unlocking).
- π» There is access to a Windows PC 10/11 Linux (MacOS will require additional drivers).
1.Preparation: Unlocking the bootloader on Xiaomi
The bootloader on all Xiaomi devices is locked by default, and unlocking it is a mandatory step before installing TWRP. The process consists of two steps: linking the Mi Account account to the device and sending a request to unlock through the Mi Unlock Tool utility.
β οΈ Attention: On Xiaomi models 13/13T/14 Redmi Note 12 Turbo with HyperOS unlock waiting time extended to 15 day-day (360 For older devices (up to hours). 2022 year enough 7 days.
Instructions for unlocking:
- Activate Developer Mode: Go to Settings β About Phone β MIUI Version and tap it 7 times.
- Back to Settings β Additionally. β For developers and include: π Unlocking OEM (may be called OEM Unlocking). π Debugging by USB (USB Debugging).
Mi Account
Settings β Xiaomi Account β Data Synchronization
Mi Unlock Tool
Xiaomi USB Drivers
Fastboot
Loudness down + Nutrition
Mi Unlock Tool
Mi
"Wait 168 hours"
π‘
If the Mi Unlock Tool gives you a "Couldn't unlock" error, try using the 3.5.511.21 version of the utility, which is often more stable than new releases.
2.Selecting the right version of TWRP for your model
The error in choosing a TWRP file is the most common reason for devices to βbrickβ because even for one model (for example, Redmi Note 11 Pro+) there can be different versions of the recovery for different regions (Global, China, India) and firmware types (MIUI vs HyperOS).
Where to download TWRP:
- π Official website: twrp.me β look for your model in the Devices list.
- π₯ Telegram channels: @XiaomiTWRP or @TWRP_updates (Relevant assemblies for new devices).
- π§ Forums: XDA Developers (partitions by specific models, for example, Redmi Note 12).
How to check compatibility:
- Find out the code name of your device: Enter the command in the ADB terminal: adb shell getprop ro.product.device Or look at Settings β About Phone β Model (for example, vili for Xiaomi 11T Pro).
TWRP
twrp-3.7.0_12-vili.img
HyperOS
hyperos-compatible
android-14
| Xiaomi model | Code name | Compatible version of TWRP | Notes |
|---|---|---|---|
| Xiaomi 13 Pro | nuwa | twrp-3.7.0_12-nuwa.img | Requires to disable avb2.0 in fastboot |
| Redmi Note 12 Pro+ | ruby | twrp-3.7.0_12-ruby-HyperOS.img | Supports HyperOS 1.0+ |
| POCO F4 | munch | twrp-3.6.2_12-munch.img | It does not work with MIUI 14.0.6+. |
| Xiaomi 12T | plato | twrp-3.7.0_12-plato.img | A patch is required for dm-verity |
What if there is no TWRP for your model?
3. Install TWRP via Fastboot (Step-by-step)
When the bootloader is unlocked and the TWRP file is downloaded, we start the firmware. We use Fastboot mode, because installing it through ADB Sideload on Xiaomi often causes crashes.
Tools required:
- π₯οΈ PC with installation ADB and Fastboot.
- π Twrp file-[version]-[codename].img (rename it in the form of a twrp.img convenienceally).
- π Cable USB Type-C (preferably original to avoid communication breakdowns).
Instructions:
- Turn off the phone and put it in Fastboot mode (clip Volume Down + Power).
- Connect the device to your PC and check the connection with the command: fastboot devices must display the serial number of the phone.
- Squeeze TWRP temporarily (without writing in the recovery section): fastboot boot twrp.img This step is critical: it allows you to test the work of the Recovery without the risk of damaging the stock.
- If the TWRP booted successfully (a logo with a command menu will appear), go back to Fastboot and flash it constantly: fastboot flash recovery twrp.img
- For devices with HyperOS, additionally do: fastboot flash recovery_ab twrp.img (This is true for models with a section recovery_ab, for example, Xiaomi 13).
β File. TWRP renamed twrp.img And it's in the fastboot folder.
β Phone in Fastboot mode (screen with a rabbit)
β Xiaomi drivers installed (there are no exclamation points in the device manager)
β Battery charge > 60%
β Backup copy of data created (TWRP erases data at the first launch!)
-->
4.The first launch of TWRP: setup and backup
Once a TWRP firmware is successful, you need to configure it correctly, otherwise the stock firmware may overwrite the Recovery when it first boots, and itβs also important to create a Nandroid backup immediately so you can roll back to the working version of the system.
Actions after installation:
- Boot into TWRP: Turn off the phone, then press Volume Up + Power.
- If you request permission to modify, swipe to allow modifications.
- Go to Wipe β Format Data, enter yes and confirm. This will delete all data from the device!
- Go back to the main menu and create a backup: π Choose Backup. π Mark the sections: Boot, System, Data, Vendor. πΎ Specify the location of the save (preferably on microSD or OTG-accumulator). π Start the process. 10-20 minute).
β οΈ Warning: On HyperOS devices, stock firmware can automatically restore the original Recovery to avoid this:
- After creating a backup, immediately swipe Magisk (if you need a root) or a patch for dm-verity.
- Turn off signature verification in TWRP: Mount β Disable Forced Encryption.
5. Problem Solving: Errors and Bricks
Even if you follow the instructions accurately, you can get errors, and let's look at the typical scenarios and how to fix them.
Error 1: Fastboot: Unknown Command
- πΉ Make sure that the fastboot folder is added to the variable PATH (or run commands from this folder).
- πΉ Check that file name TWRP written without spaces and Cyrillic (for example, twrp.img, Not twrp for Xiaomi.img).
Error 2: The phone is not loading (bootloop)
- π Try to boot up in. TWRP and restore the backup (Restore).
- π§ If there is no backup, run the stock firmware through the Mi Flash Tool (download Fastboot). ROM for your model on the official website).
- π For anti-rollback devices (e.g., Xiaomi) 12S Ultra) use the firmware of the same or newer version that was installed earlier.
Error 3: TWRP doesn't see internal memory
- π It's about encryption. FBE (File-Based Encryption. Solution: In TWRP Go to Wipe. β Format Data (erases all data!) or plug in OTG-backup.