Install TWRP on Xiaomi via computer: full guide with unlocking the bootloader

Installing custom TWRP on Xiaomi smartphones provides access to advanced features, from creating full system backups to firmware informal ROM. However, the process requires care - an error at any stage can turn a device into a "brick." In this guide, we will analyze the step-by-step installation of TWRP through the computer, including unlocking the bootloader, working with fastboot and solving typical problems.

Xiaomi devices (including Redmi, POCO and Black Shark) are the default bootloader. TWRP cannot be installed without unlocking it. We will look at the official method through the Mi Unlock Tool, as well as alternative methods for limited devices (for example, for Xiaomi 12T or POCO F5, where you need to wait 168 hours).

Important: the procedure voids the warranty and may result in data loss. MIUI 14+ New models (released after 2023) may require additional authorization of Xiaomi account through the SMS-code even after unlocking the bootloader.

1. Preparation of device and computer

Before you start installing TWRP, you need to prepare both the smartphone and the PC, which is critical β€” a missed step can lead to failure in subsequent stages.

The computer must be installed:

  • πŸ”Ή ADB And Fastboot, part of Google's Platform Tools, download the latest version from the official website and unpack it to the root of the drive. C:\platform-tools\.
  • πŸ”Ή Xiaomi Drivers. Download Mi for Windows PC Suite or use universal LibUSB drivers.
  • πŸ”Ή Mi Unlock Tool is a utility for unlocking the bootloader).
  • πŸ”Ή File. TWRP Download only from the official website twrp.me or trusted sources (for example, XDA Developers).

On your smartphone, do this:

  1. Activate Developer Mode: Go to Settings β†’ About Phone β†’ MIUI version and tap 7 times on the line.
  2. Enable USB Debugging and OEM Unlock in the Settings menu β†’ More β†’ For developers.
  3. Link your Xiaomi account to your device (required to unlock the bootloader!).
  4. Back up your data – installing a TWRP will result in a device reset.
πŸ“Š What Xiaomi model do you plan to use?
Redmi Note 12/13
POCO F/X
Xiaomi 13/14
Another model

2 Unlock the bootloader through the Mi Unlock Tool

Unlocking the bootloader is the most important step. Xiaomi has tightened the rules: new devices require a wait of up to 7 days (168 hours) after an account is attached. Old models (until 2021) can be unlocked immediately.

Instructions:

  1. Turn off your smartphone and press Volume Down + Power to log into the Fastboot.
  2. Connect the device to the PC through USB-cable (preferably original).
  3. Launch the Mi Unlock Tool on behalf of the administrator and log in to the same Xiaomi account as you do on your phone.
  4. Press Unlock. If you receive a waiting message, wait until the specified time (usually 168 hours).

Typical errors and decisions:

  • 🚫 Cann't unlock - check if unlock is enabled OEM whether the account is linked.
  • 🚫 Device Not Connected – Update Drivers or Try Another USB-port (preferably) USB 2.0).
  • 🚫 Account Not bound – log in to your phone and Mi Unlock Tool under one account.

⚠️ Attention: On devices with MIUI 14+ After unlocking, additional authorization may be required through SMS-code TWRP. Pre-save a backup copy of the code or use it SIM-card.

Xiaomi account linked to device|Debugging is on. USB and unlock OEM|Installed ADB/Fastboot and drivers|Smartphone in Fastboot mode|Mi Unlock Tool Launched on Administrator's Name-->

3. Check the compatibility of TWRP with your model

Not all versions of TWRP are suitable for specific Xiaomi devices. Installing an incorrect build can lead to hard brick.

Model of the deviceCode nameType TWRPNotes
Xiaomi 13 PronuwaTWRP 3.7.0+A patch is required for MIUI 14
Redmi Note 12 Pro+rubyTWRP 3.6.2Support A/B-section
POCO F5marbleTWRP 3.7.0Waiting 168 hours is mandatory.
Xiaomi Pad 6pipiTWRP 3.6.1Only for global firmware

Where to find the code name of your device:

  1. Install Device Info from Google Play.
  2. Check the Model Number or Codename string.
  3. Check the base on LineageOS Wiki.

Important: For partition devices A/B (For example, Redmi Note 11 Pro+) Special version is required TWRP Dynamic partitioning. Download only tagged files AB or dynamic.

πŸ’‘

If there is no build for your model on the TWRP site, check out themes on XDA Developers – often enthusiasts post unofficial ports.

4. Install TWRP via Fastboot

After unlocking the bootloader, you can start installing TWRP. Using fastboot - the standard firmware mode for Xiaomi devices.

Step-by-step:

  1. Download the TWRP file (usually with the.img extension) rename to twrp.img and place it in the platform-tools folder.
  2. Open the command prompt in this folder (click Shift + PCM β†’ Open the PowerShell window here).
  3. Check the connection of the device command: fastboot devices should display the serial number of the phone.
  4. Run the firmware. TWRP: fastboot flash recovery twrp.img For devices with A/B-Use the section: fastboot flash recovery_ab twrp.img
  5. After successful firmware reboot to recavery: fastboot boot twrp.img

If the device automatically boots into MIUI (not TWRP) after restarting, do:

  • πŸ”„ Repeat the process. TWRP And immediately after the command fastboot boot hold the volume up. + Nutrition.
  • πŸ”„ For some models (e.g, POCO X3 Pro) the automatic recavator update in MIUI: into TWRP Go to Advanced. β†’ Flash Current TWRP.

⚠️ Attention: On devices with MIUI 13/14 New models (e.g. Xiaomi) 13 Ultra after installation TWRP You may need to disable the bootloader's signature check. TWRP Go to Mount. β†’ Disable DM-Verity or patch the patch disable_forceencrypt.zip.

5. Solving common mistakes

Even with the correct following of the instructions, errors can occur, and let's look at the most common ones and how to fix them.

Mistake.Reason.Decision
FAILED (remote: 'Flashing is not allowed')The bootloader is not unlockedRepeat the unlocking with the Mi Unlock Tool
Invalid sparse file formatTWRP file damagedDownload the image again, check the MD5 checksum
The device is loaded into MIUI, not TWRPStock Recavator Re-Recorded TWRPPlease. disable_forceencrypt.zip Or repeat the fastboot boot.
No command on the screen with Android robotIncorrect file of the recaveriKeep Power + Volume Upwards for 10 Seconds

Additional advice:

  • πŸ”§ If the device is not defined in fastboot, try another one. USB-cable (preferably original) or port USB 2.0.
  • πŸ”§ Windows 11 may require you to disable Windows Defender or add an exception to adb.exe.
  • πŸ”§ For models with MediaTek (e.g. Redmi) 10C) need an additional utility SP Flash Tool.
What if the device has become a brick?
If the smartphone doesn’t turn on and react to buttons, try: 1. Keep Volume down. + Power 30 seconds for forced reboot. 2. Connect to the PC and check if the fastboot or EDL-Recovery mode (requires a special cable). 3. Recovery through EDL Use the Mi Flash Tool and the official firmware (.tgz file) in 90% of cases, the device can be resuscitated, but may require help from a service center.

6.The first steps of TWRP: what to do after installation

After a successful boot in TWRP, it is recommended to perform several critical actions to avoid problems in the future.

Main steps:

  1. Create a full backup: Go to Backup. Select Boot, System, Data, Vendor. Save backup to Backup. SD-card or PC (via MTP).

Turn off encryption.

Format Data β†’ Enter β€œYes”

This will delete all data, but prevent partition mounting problems.

Please, Magisk.

  • Download the latest version of Magisk (.zip).
  • In TWRP, select Install β†’ Specify Magisk β†’ Swipe to Confirm.

Warnings:

  • 🚨 Don't update. MIUI oo TA post-installation TWRP β€” It's gonna be re-recorded.
  • 🚨 Avoid formatting the Vendor partition – this can break camera and sensor modules.
  • 🚨 On some devices (e.g. Xiaomi) 12S Ultra) after Magisk firmware requires an additional patch lzma for the correct operation of banking applications.

πŸ’‘

After installation TWRP never take it OTA-update MIUI Use only the manual firmware through the Recovery.

7. Alternative methods of installing TWRP

If the standard fastboot method doesn't work, you can try alternatives, which are suitable for devices with limitations or custom configurations.

Method 1: ADB Sideload

This is a good idea if the TWRP is already installed but needs to be updated:

  1. In TWRP, select Advanced β†’ ADB Sideload.
  2. On PC, do: adb sideload twrp.img

Method 2: OrangeFox Recovery

OrangeFox is an alternative recovery with support for more Xiaomi devices. the installation process is similar to TWRP, but you need to download the image from the official website.

Method 3: For devices with MediaTek (SP Flash Tool)

For smartphones on MediaTek (e.g. Redmi 9A):

  1. Download the SP Flash Tool and firmware with the.scatter extension.
  2. In the utility settings, specify the path to the TWRP file in the Recovery section.
  3. Connect the device turned off to the PC (without battery, if removable).

⚠️ Attention: Use SP Flash Tool on devices with eMMC memory (most modern Xiaomi) requires caution - incorrect settings can damage the bootloader. Always check the compliance of the scatter file of your model.

FAQ: Frequent questions about installing TWRP on Xiaomi

Can I install TWRP without unlocking the bootloader?
No, on all Xiaomi devices (except some older models before 2016), the bootloader is locked. Without it unlocked through the Mi Unlock Tool, you can't flash TWRP. Alternative methods (for example, through exploits) do not work on MIUI 12 and later.
Why does the TWRP device not boot after installation?
Probable causes: Incompatible version of TWRP (check the device code name). damaged file twrp.img (download again and check MD5). Conflict with FBE encryption (requires formatting Data in TWRP). New devices (e.g. Xiaomi 13) may require a patch to bypass AVB 2.0. Solution: run the official firmware through Mi Flash Tool in EDL mode and repeat the process.
How long does it take to unlock the bootloader?
Depending on the model and version of MIUI: Old devices (until 2021): unlock immediately after the account is attached. New devices (2022-2026): mandatory waiting 168 hours (7 days) after the account is attached. Chinese versions (for example, Xiaomi 14 Pro CN): can require additional authorization via SMS even after unlocking. It is impossible to speed up the process - Xiaomi servers strictly control the timer.
Can I return the warranty after installing TWRP?
Technically yes, but with reservations: Sweep the official firmware through the Mi Flash Tool (select the clean all option). Return the stock Recovery with the command: fastboot flash recovery stock_recovery.img (You can reset the file from the official firmware. MIUI. However, Xiaomi can detect unlocked traces from the bootloader logs, in which case the warranty will not be restored. Use the command to verify status: fastboot oem device-info If Device unlocked: true - warranty is canceled irrevocably.
Which Xiaomi models do not support TWRP?
At the moment (2026) there is no official TWRP support for the following devices: Xiaomi 14 Ultra (due to the new Snapdragon 8 Gen 3 chip and changes in the bootloader); POCO F6 Pro (requires unofficial ports with the risk of hard brick); Redmi K70 Series (expected support in 2026); HyperOS devices (the new firmware from Xiaomi, replacing MIUI).