Installing custom recavators on Xiaomi smartphones is a key step for those who want to gain full control of the device. Through Fastboot mode, this process becomes as reliable as possible, but requires care: from unlocking the bootloader to choosing a compatible version of TWRP or another Recovery. Many users face errors due to incorrect sequence of actions or file incompatibility, in this article we will discuss the process from A to Z, including nuances for different models of Redmi, POCO and Mi.
It is important to understand that the installation of non-castom recavery deprives the warranty and can lead to the locking of the device if an error in the firmware EFS-But for those who are enthusiastic about customization. ROM, Backups through nandroid or root rights, no alternative. Next, step-by-step instructions based on recent changes in Xiaomi policy (including mandatory binding of Mi Account to the device).
Before you start, make sure your device supports unlocking the bootloader. You can check the list of officially unlocked models at en.miui.com/unlock. If your model is not listed (for example, some Redmi Note devices for the Chinese market), an attempt to unlock can result in hard-brick, which is irreversible damage to the firmware.
Preparation of the device: unlocking the loader
The first and most critical step is to unlock the bootloader, which is impossible to install without, and Xiaomi made it harder in 2023 by adding a mandatory binding Mi Account to the device and increasing the wait time to unlock to 72 to 168 hours (depending on the model).
To get started:
- Activate Developer Options: Go to Settings β About Phone β MIUI version and tap it 7 times.
- Enable USB Debugging and OEM Unlocking in the Developer Menu.
- Link your Mi Account to your device in Settings β Xiaomi Account β Mi Cloud.
Next, download the official Mi Unlock Tool from Xiaomi and follow the instructions. Importantly, the account must be linked before you switch to Fastboot, otherwise the utility will not see the device.
β οΈ Note: If you have previously changed IMEI If you've been unofficially flashing the device, the Mi Unlock Tool can block the unlock forever, and the only way out is to contact the service center with proof of purchase.
2. Selection of Recovery: TWRP or Alternatives
The standard choice for Xiaomi is TWRP (TeamWin Recovery Project), but not all versions are compatible with the latest MIUI updates. For example, the Redmi Note 12 Pro+ will require a special build with support for dynamic partitions, and for the POCO F5 β a version with corrected FBE encryption.
Where to look for current assemblies:
- πΉ Official website TWRP β Proven builds, but not for all models.
- πΉ XDA Developers β unofficial ports (look for themes marked) [UNOFFICIAL]).
- πΉ Developer Telegram channels (e.g, @twrp_updates) β newsletters and patches.
Before downloading, check:
- Compatible with your modelβs codename (e.g. Redmi Note 11 is spes).
- Support for the current version MIUI (It is listed in the file name, for example. twrp-3.7.0_12-v7.1_A13-spes).
- Presence of patches for anti-rollback (if you roll back on the old firmware).
βοΈ Checking the recavΓ©ri before installation
3. Installation of drivers and ADB/Fastboot
To work with Fastboot on PC requires Xiaomi drivers and tools ADB/Fastboot. On Windows, it is easier to use the Minimal package. ADB and Fastboot, on Linux/Mac β Install via packet manager (sudo apt install adb fastboot).
Procedure:
- Connect your phone to your PC in Fastboot mode (press Power + Volume down when the device is off).
- Open the command line in the adb folder and execute: fastboot devices If the device is displayed (for example, 1234abcd fastboot) β the drivers are installed correctly.
- To check for unlocking the bootloader, enter: fastboot oem device-info Device unlocked: true must confirm successful unlocking.
β οΈ Note: On some Windows 11 PCs, Xiaomi drivers are blocked by security. To fix this, disable driver signature verification via gpedit.msc (for Pro versions) or use Driver Signature Enforcement Overrider.
4.Racking the Recovery Firmware through Fastboot
When you're done, we go to firmware. We use the fastboot flash recovery command, but some models (like the Xiaomi 12T) require an additional step with the vbmeta patch to disable integrity check.
Step-by-step:
- Place a recovery file (e.g., twrp-3.7.0.img) in the adb folder.
- Run the firmware command: fastboot flash recovery twrp-3.7.0.img
- For devices with dynamic partitions (e.g., Redmi) K50) Use: Fastboot Flash recovery_ramdisk twrp-3.7.0.img
- Turn off vbmeta (if required): fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
- Reboot to the recovery not through the system, but by the team: fastboot boot twrp-3.7.0.img This will prevent the recapable from being overwritten by stock firmware.
If you are in a reboot, then you are in a stock Recovery. MIUI I re-recorded it. The solution is to stitch it. disable_dm-verity_forceencrypt (download XDA) or immediately after the firmware recovery install Magisk to block system updates.
π‘
If the fastboot flash command returns the error FAILED (remote: 'Partition not found', check the partition name is correct. For new devices, Xiaomi can use recovery instead of recovery recovery_ramdisk or boot (in the case of A/B-section).
5. Common mistakes and their solutions
Even with the correct following of the instructions, errors can occur. Below is a table of the most common problems and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| FAILED (remote: 'Flashing is not allowed in Lock State') | The bootloader is not unlocked | Repeat unlocking through Mi Unlock Tool and wait for the timer to end. |
| FAILED (remote: 'Invalid sparse file format at header') | Recovery file damaged. | Download the file again and check the hash amount (MD5) |
| Device not defined in fastboot devices | There are no drivers or USB-port | Try another cable/port, install drivers manually through Device Manager |
| After the recavator firmware, the phone does not turn on | Boot or vbmeta section damaged | Swipe stock firmware through Mi Flash Tool in clean all mode |
If after installing the recovery phone bootloop (cyclic reboot), most likely the problem is incompatibility of the version. MIUI And the solution is to sew it. disable_forceencrypt Or revert to an older version of the firmware.
What if the Mi Unlock Tool shows "Couldn't unlock"?
6. Additional settings after installation
Successful recovery firmware is only half the battle, and to avoid future problems, follow a few critical steps:
- π Turn off encryption: B TWRP Go to Wipe. β Format Data and type in yes. This will remove encryption. FBE, which can block access to internal memory.
- π± Create a backup: In the main menu TWRP Select Backup and save Boot, System, Data and EFS on SD-card.
- π§ Install Magisk: If you need root, run Magisk.zip via Install TWRP. Download the current version on GitHub.
For dynamic partitions devices (such as Xiaomi 13), the standard backup in TWRP may not work, in which case use alternative tools such as OrangeFox Recovery or scripts to back up via ADB.
β οΈ Note: If you are planning to use custom ROM (For example, LineageOS or Pixel Experience, check compatibility with your model in the forum first. XDA. Some firmware requires prior patch installation for firmware or vendor.
π‘
Once installed, never update MIUI through the standard update menu, which will result in TWRP overwriting with stock recavaries. Use only manual firmware via Fastboot or TWRP.
7.How to get back stock Recovery
If you need to return the original recovery (for example, for warranty repair), download the stock firmware for your model from the Xiaomi Firmware Updater website.
- Unpack the firmware archive and find the recovery.img file.
- Fastboot: Fastboot Flash Recovery recovery.img
- Reboot the device to the system: fastboot reboot
To return to stock firmware completely, use the Mi Flash Tool in clean all mode. Note that this will delete all data from the device, including internal memory.