Installing custom TWRP on Xiaomi smartphones opens up access to advanced features from NANDroid backups to firmware custom software like LineageOS or Pixel Experience. However, the process requires care β an error in unlocking the bootloader or firmware can turn the device into a βbrick.β In this article, we will discuss the official method of installing TWRP through Fastboot, which works on most Xiaomi, Redmi and POCO models (including Redmi Note 12 Pro+, Xiaomi 13 Ultra and other current devices from 2023-2026).
Itβs important to understand that Xiaomi actively blocks unofficial backups, so once you install TWRP, you may need to disable the bootloaderβs signature check or use patches to bypass restrictions. Weβll look at all the nuances, including driver preparation, bootloader unlocking, choosing the correct version of TWRP, and solving typical errors like FAILED (remote: βNot allowed in Lock Stateβ).
Preparation of the smartphone and PC: what to do before installation
Before you start firmware, make sure your device is compatible with TWRP. Not all Xiaomi models are supported by official builds, for example, Xiaomi 14 or Redmi. K70 You may need an unofficial port. Check the list of supported devices on the official website. TWRP.
Also prepare:
- π Cable USB Type-C (original or high-quality β cheap cables can cause data transmission errors).
- π» Computer running Windows 10/11 (for Linux/macOS Additional drivers will be required).
- π± Charged device (at least 60% β interruption of the process due to battery discharge leads to a brook).
- π Mi Account tied to phone (required to unlock the bootloader).
If you are using Windows, turn off driver signature verification:
- Press Win + X β select System Settings.
- Go to Update and Security β Recovery.
- In the Special Download Options section, click Reboot Now.
- After the reboot, select Troubleshooting Search β Additional settings β Boot Options β Reboot.
- Press F7 to disable mandatory driver signature verification.
β οΈ Note: If you use a laptop with ports USB 3.0 (blue connectors), connect your phone to the port USB 2.0 (black). Ports USB 3.0 can cause errors in fastboot commands.
2 Unlock the bootloader on Xiaomi
Xiaomi locks the bootloader on all devices by default. TWRP cannot be installed without unlocking. The process takes 3 to 7 days (sometimes longer) due to company policy.
- Activate Developer Mode: Go to Settings β About Phone. Click 7 times on the MIUI Version until you become a developer!
- Link the device to your Mi Account: Return to Settings β Additionally. β For developers. Activate. OEM-unlocking and debugging USB. Connect your phone to your PC and confirm debugging permission. Go to Settings β Xiaomi account β Mi Cloud and make sure your device is linked to your account.
- Download Mi Unlock Tool (official utility from Xiaomi).
- Start the program on behalf of the administrator.
- Log in to your Mi Account.
- Turn your phone into Fastboot mode (turn off the device, then press Power + Volume Down).
- Connect your phone to your PC β the utility should detect it.
- Press Unlock and wait for the process to be completed.
If the utility gives you an error Couldn't unlock. Wait for 168 hours is fine. Xiaomi requires a wait of 7 days from the first account link.
β οΈ Warning: Once the bootloader is unlocked, all user information (photos, apps, settings) will be deleted from the device!
What if the Mi Unlock Tool canβt see the device?
3. Installation of drivers and tools on the PC
To work with fastboot and firmware TWRP will require:
- π File. TWRP for your model (download only from the official website or trusted sources such as: XDA Developers).
Installation instructions:
- Unpack Platform-Tools into the root of the C:\ drive (e.g., C:\platform-tools\).
- Place the TWRP file (usually with the.img extension) in the same folder.
- Open the Command Prompt on behalf of the administrator and go to the tool folder: cd C:\platform-tools\
- Check the connection of the device: fastboot devices If the phone is found, you will see its serial number.
If the fastboot device command does not show the device:
- π Reinstall drivers manually through Device Manager (select Android Bootloader Interface).
- π Try another one. USB-port.
- π₯οΈ Disable driver signatures (see Section 1).
π‘
If youβre using Windows 11, add a folder with platform-tools to the PATH environment variable, which will allow you to run fastboot commands from any directory.
4.Transform TWRP installation via Fastboot
Once the bootloader is unlocked and the tools are ready, we start firmware. Dynamic Partitions will require an additional step: vbmeta firmware to disable the check.
Instructions:
- Put your phone in Fastboot mode: adb reboot bootloader Or manually: turn off the device β pinch Power + Volume Down.
- Check the connection: fastboot devices
- Please. TWRP: fastboot flash recovery twrp-3.7.0_12-0-redmi_note_12_pro_plus.img Replace the file name with the one that is relevant to your model!
- For devices with Dynamic Partitions (MIUI 12+): fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img If the file vbmeta.img No, use the empty: fastboot --disable-verity --disable-verification flash vbmeta vbmeta_empty.img
- TWRP: Fastboot Reboot Recovery
If you're in a standard MIUI recap after the reboot, then TWRP has been overwritten. This is a typical problem on new devices.
- π Repeat the firmware. TWRP, But after the command fastboot flash recovery immediately perform: fastboot boot twrp-3.7.0_12-0-redmi_note_12_pro_plus.img It'll load. TWRP without writing to the recovery section, which will bypass the lock.
- π± In fact. TWRP Go to Advanced. β Flash Current TWRP (if the option is available).
Download the right TWRP file for your model
Is driver signature verification disabled (for Windows)
Is the device at least 60% charged?
Is the phone connected to the port? USB 2.0-->
5. Solving common installation errors
Even with the correct following of the instructions, errors can occur.
| Mistake. | Reason. | Decision |
|---|---|---|
| FAILED (remote: 'Not allowed in Lock State') | The bootloader is not unlocked | Repeat unlocking via Mi Unlock Tool (see section 2) |
| FAILED (remote: 'Partition not found') | The device uses Dynamic Partitions | Squeeze vbmeta with the flag --disable-verity |
| waiting for device | PC doesn't see the phone | Check the drivers, cable, USB port. Reboot the PC. |
| After the reboot, MIUI Recovery is launched. | Xiaomi re-writes TWRP when downloading | Use fastboot boot instead of fastboot flash |
| Invalid sparse file format at header | TWRP file damaged | Download the image again from the official source |
If the phone does not boot into the system after installing TWRP, try:
- π Switch the original recap through fastboot flash recovery stock_recovery.img (Download the Xiaomi Firmware Updater).
- π± V TWRP run the Wipe β Format Data (deletes all data, but often solves loading problems).
- π§ Sweep through the full firmware package MIUI via fastboot with a flag --skip-secondary.
β οΈ Note: Some models (e.g. Xiaomi) 12T or Redmi K60) post-installation TWRP You may need to disconnect AVB 2.0 via command: fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img Without it, the system won't boot!
6. Additional settings after installing TWRP
Successful installation of TWRP is only half the battle, so to avoid problems in the future, set the Recovery correctly:
- π Turn off automatic update of the recovery: TWRP Go to Settings. β Prevent Stock ROM Flash (if available) will prevent overwriting TWRP renewal MIUI.
- π Backup: In the main menu, select Backup and save the Boot, System, Data, Vendor partitions. Store the copy on your PC or cloud.
- π Set up. ADB Sideload: In Advanced β ADB Sideload can be stitched ZIP-files (such as Magisk or custom firmware) without using a memory card.
For devices with Dynamic Partitions (most models on MIUI 12+), it is recommended to:
- π Swipe a modified vbmeta to disable integrity check.
- π§ Use OrangeFox Recovery instead of using it TWRP β It is an alternative recap with better support for dynamic partitions.
π‘
Once you install TWRP, never update via OTA (over the air) β this will lead to overwriting the Recovery and a possible breeze. Use only manual firmware via fastboot or TWRP.
7. How to Sweeten Magisk to Get Root Rights
TWRP is often installed to obtain root rights through Magisk. The process is simple, but requires caution:
- Download the latest Magisk ZIP.
- Move the file to your phone or memory card.
- Download to TWRP.
- Click Install β select the Magisk file β swipe for confirmation.
- After the firmware reboot to the system.
Check for root with the Magisk Manager app or command in the terminal:
suIf after the firmware Magisk system does not boot:
- π Boot in. TWRP and sew Magisk-uninstaller.zip.
- π± Delete Magisk data via Wipe β Advanced Wipe β Dalvik/ART Cache.
- π§ Try another version of Magisk (like Magisk Delta for new devices).