Installation of custom recaveri TWRP Xiaomi smartphones open access to advanced functions: firmware custom ROM, It's a process that requires care, but it's a process that requires a lot of care -- errors in unlocking a bootloader or firmware can turn a device into a brick. TWRP on the Xiaomi model, Redmi and POCO 2023โ2026, considering changes in company policy and new versions of Recovery.
The process is conditionally divided into three stages: preparation (unlocking the bootloader and installing drivers), choosing the correct version. TWRP for your model, and directly firmware through Fastboot or ADB. It is important to understand that Xiaomi regularly tightens protections โ for example, from 2023 on some devices, you need to link your Mi Account to the bootloader. POCO M6 Pro) the installation algorithm may differ from the classic Qualcomm.
Before you start, answer your key question: Why do you need to do it? TWRP? If the goal is just to get root rights, maybe Magisk without custom Recovery is enough. If you're planning to experiment with firmware like LineageOS or Pixel Experience, you're going to have to do it. TWRP Remember: installing custom software will void the warranty and may lead to blocking some features (for example, Mi Pay or Widevine) L1 high-resolution streaming).
1.Preparation: Unlocking the bootloader on Xiaomi
The first and most critical step is to unlock the bootloader. TWRP Xiaomi officially allows unlocking, but the process has become more complicated: it now requires linking the device to the Mi Account and waiting for confirmation (3 to 360 hours depending on the model).
Let's start by checking the status of the bootloader. Turn off the smartphone, then press Volume down. + Power to enter Fastboot mode. Connect the device to the PC and type in the command line:
fastboot oem device-infoIn the answer, look for the lines Device unlocked: true/false. If false, the bootloader is blocked.
To unlock, follow the following steps:
- ๐ฑ Link your Mi Account to your device: Go to Settings โ Xiaomi account โ Mi Cloud and log in. Make sure that the developer settings (Settings) โ The phone. โ Version. MIUI โ slip 7 times) included OEM Unlock and Debugging by USB.
- ๐ฅ๏ธ Install Mi Unlock Tool: download the latest version from the official website (Windows only). Launch the program, log in to the same Mi Account as on your phone.
On models of 2026 (for example, Xiaomi 14 or Redmi Note 13 Pro)+) Additional confirmation may be required through the Mi Unlock Status app, which checks the period of ownership of the device (at least 30 days).
๐ก
If the Mi Unlock Tool gives you a โCouldnโt unlockโ error after waiting, try using an older version of the utility (e.g. 5.5.224.30) or connect your phone to another one. USB-port (preferably 2.0).
2.Selecting the right version of TWRP for your model
Mistake in the choice of version TWRP โ One of the main reasons for the bricking of the devices is that the Recovery must match not only the model of the smartphone, but also the firmware version (MIUI or custom), and the type of processor (Qualcomm/MediaTek). For example, TWRP For the Redmi Note 11 Pro 5G (MediaTek Dimensity 920) It is not suitable for Redmi Note. 11 Pro on Qualcomm Snapdragon 695, despite similar names.
Where to look for the current versions:
- ๐ง Official website TWRP: twrp.me/Devices โ Checked builds are published here, but not for all new models.
- ๐ ๏ธ Forums XDA Developers: In the sections dedicated to your model, look for themes marked [RECOVERY]. Pay attention to the date of the last update of the topic.
Before downloading, check:
- The code name of the device (for example, vili for Xiaomi 12 or fuxi for Mi 11 Ultra). โ The phone. โ Model or via adb shell getprop ro.product.device.
- Android Version (12, 13, or 14) โ Some builds TWRP They only work on a specific version.
- Type of firmware: Global, China or EEA. For China. ROM You may need a patch to bypass signature verification.
How to Check Compatibility TWRP firmware?
| Xiaomi model | Code name | Recommended version of TWRP | Notes |
|---|---|---|---|
| Redmi Note 12 Pro 4G | sweet | 3.7.0_12-0 | Supports MIUI 14 and Android 13 |
| POCO F5 | marble | 3.7.0_9-0 (unofficial) | Requires a shutdown. AVB 2.0 before the firmware |
| Xiaomi 13 | fuxi | 3.7.0_12-1 | It only works with Global ROM. |
| Redmi K60 Pro | mondrian | 3.7.0_9-0 (test-bed) | Doesn't support encryption FBE |
3. Install TWRP via Fastboot: step-by-step instruction
The most reliable way to sew TWRP โ It's a Fastboot mode:
- ๐ฅ๏ธ Windows computer 10/11 Linux (macOS may have driver problems).
- ๐ Cable USB Type-C (preferably original).
- ๐ฆ Utilities. ADB Fastboot (download Platform Tools from Google).
- ๐ฑ Unlocked loader (see section 1).
Instructions:
- Unpack the archive from Platform Tools to the root of the C disk, C:\platform-tools).
- Place the file. TWRP (with the.img extension) to the same folder and rename it to twrp.img convenienceally.
- Open the command line in the platform-tools folder (click Shift). + PCM โ Open at the terminal).
- Connect your phone in Fastboot mode and check the connection with the command: fastboot devices must display the serial number of the device.
- TWRP command: fastboot flash recovery twrp.img
- Reboot to Recavator: Fastboot boot twrp.img (This team temporarily loads TWRP without memory, which is useful for testing.)
๐น bootloader unlocked (checked through fastboot oem device-info)
๐น File. TWRP It corresponds to the code of the model and version of Android
๐น Debugging is on. USB and allowed OEM Unlock
๐น Battery charged at least 60%
๐น Backup of important data (firmware erases internal memory on some models)
-->
Attention! On dynamic partition devices (Dynamic Partitions, for example, Xiaomi) 12T or POCO F4) The standard fastboot flash recovery command won't work. Use it instead:
fastboot flash recovery_ramdisk twrp.imgOr pass it. TWRP how boot.img (But it's risky -- it can lead to looped loading).
๐ก
In the models with MIUI 14 and newer after the firmware TWRP You may need to disable DM-verity via fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img. Otherwise, the system won't boot.
4. Alternative methods of installing TWRP
If the firmware through Fastboot failed (for example, due to an error) FAILED (remote: 'Not allowed in Lock State'), try alternative methods. They are relevant for devices with a locked bootloader (but not for all models!) or if you have root rights.
Method 1: Installation with ADB Sideload
Suitable if you already have a working recaveri (even stock one). Load into it (Loudness up). + Power, select Apply update โ Apply from ADB, Then do it on PC:
adb sideload twrp.zipโ ๏ธ Note: This method does not work on devices with MIUI 13/14, if the stock recavator is blocked from firmware unofficial files.
Method 2: Firmware via OrangeFox (for MediaTek)
For smartphones on MediaTek (for example, Redmi Note 12 or POCO M5) And they often use OrangeFox recavators, which are better compatible with these chips. TWRP, The file is flashed as recovery or boot depending on the model.
Method 3: Using the XiaomiTool utility V2
It is a semi-automatic tool for unlocking and firmware Xiaomi. Supports many models, but requires caution:
โ ๏ธ Attention: XiaomiTool V2 You may want to use an outdated version. TWRP. Always check the relevance of files manually in forums.
5. The first steps in TWRP: setup
After a successful firmware TWRP Several critical actions must be taken to avoid problems with further use:
- Reset the protection settings: at the first start TWRP asks for a pattern lock or PIN. If you donโt remember it, choose Cancel, then go to Wipe. โ Format Data and enter yes. This will delete all data, but unlock access to the Recovery.
- Create a full backup: go to Backup and mark the Boot, System, Data and VBMeta sections. Save the backup to Backup. SD-card.
- Turn off forced encryption (if necessary): on some firmware TWRP I can't see the internal memory because FBE (File-Based Encryption. To fix this, patch it. disable_forceencrypt.zip via Install.
Important settings TWRP:
- ๐ Language: English is the default. To change, tap the flag in the upper right corner.
- ๐ง Topics: In Settings โ Theme can be selected for a dark theme for convenience.
- โ๏ธ Installation options: in Settings โ Zip file signature verification disable signature verification if you plan to flash informal signature verification ZIP-file.
If, after the reboot, TWRP If it's gone (replaced with stock recapaveri), it means your model has overwrite protection on:
- Please. TWRP Fastboot again.
- Immediately after the firmware, perform: fastboot flash recovery_ramdisk twrp.img (for devices with dynamic partitions).
- Reboot to TWRP Team of fastboot boot twrp.img.
- In the Recovery ZIP-a patch file to disable protection (for example, TWRP_Anti_Rollback.zip).
6. Solving common problems
Even with the correct following of the instructions, errors can occur.
| Problem. | Possible cause | Decision |
|---|---|---|
| Mistake. FAILED (remote: 'Not allowed in Lock State') | The bootloader is not unlocked or not fully unlocked | Repeat the unlocking procedure through the Mi Unlock Tool, wait for confirmation |
| TWRP does not see internal memory | Encryption FBE (File-Based Encryption) | Please. disable_forceencrypt.zip or format the data in TWRP |
| The device is loaded into TWRP, but not | Boot partition is damaged or vbmeta is missing | Stitch the original boot.img and vbmeta.img via Fastboot |
| Invalid sparse file format at header | Incompatible version TWRP firmware | Download another recavator assembly corresponding to your version MIUI/Android |
| The phone does not turn on after firmware (black screen) | Damaged section. DTBO super | Swipe through the full stock Fastboot ROM via Mi Flash Tool |
If TWRP stitched but not launched (e.g., hanging on the Xiaomi logo), try it out:
- ๐ Swipe another version of the recovery (for example, instead of.img use.img.gz).
- ๐ง Reverse to an older version MIUI (assemblies TWRP Not compatible with the latest updates).
- ๐ฑ Check file integrity TWRP (compare the hash MD5 original).
For devices on MediaTek (e.g., Redmi) 10C or POCO C50) An additional step may be required โ unlocking Bootloader through SP Flash Tool or MTK Client. This is a more risky process, as it requires working with clients. DA-files and may cause hardware damage in case of error.
7.What to do after installing TWRP?
Successful installation TWRP โ It's only half the story. Now we can start to make the advanced configuration:
- ๐ Getting Root Rights: Squeeze Magisk.zip via Install TWRP. After the reboot, check the root with the su command at the terminal.
- ๐ฑ Custom-based firmware ROM: Download the appropriate build (like LineageOS or ArrowOS) and run it through TWRP, pre-wipe โ Advanced Wipe (tag Dalvik, Cache, System, Data).
- ๐ Backup and Recovery: Regularly backup your TWRP, Especially before you experiment with firmware. SD-map.
- ๐ง Optimizing productivity: through TWRP You can flash kernels with alternative settings (for example, Kirisakura or Perseus to improve autonomy).
โ ๏ธ Note: After Magisk firmware or custom ROM Some functions may stop working:
- ๐ณ Mi Pay and other payment services (due to SafetyNet trigger).
- ๐ฎ Widevine L1 (drop down L3, What will block Netflix viewing in the HD).
- ๐ก Some camera modules (e.g. Pro Mode in the MIUI Camera).
To get the functionality back, try:
- Switch the Universal SafetyNet Fix patch to Magisk.
- Use alternative apps (e.g. Google Camera instead of Google Camera) MIUI Camera).
- Return to stock firmware (if the warranty is more important than customization).
If you plan to experiment often with firmware, we recommend buying Xiaomi with a connector for the device. SD-Cards (e.g. Redmi Note 12 Pro)+ or POCO X5 This will allow you to store backups and ZIP-Firmware files separate from internal memory, which will speed up recovery after failures.