Installation of TWRP Recovery on Xiaomi: unlock, firmware and configuration

Installing custom TWRP recavator on Xiaomi smartphones gives access to advanced features: from backup of the system to firmware informal ROM. However, the process requires accuracy - an error at any stage can lead to a "brick" of the device. In this guide, we will analyze all the steps: from unlocking the bootloader to checking the health of the TWRP, taking into account the features of modern models Redmi, POCO and Mi (2020-2026 years of release).

It is important to understand that Xiaomi is actively tightening its security policy, and while it used to take 72 hours to unlock, now some devices require up to 360 hours (15 days) to wait, and since MIUI 14, the company has implemented additional system integrity checks, making it more difficult to install customized receptacles, we will take these nuances into account and suggest workarounds.

This article is relevant for devices based on Qualcomm Snapdragon and MediaTek processors (including Dimensity). For models with Google Tensor chips or exotic SoCs (for example, Samsung Exynos in some regional versions), methods may not be suitable - check compatibility on the XDA Developers forum.

1. Device Preparation: What to Do Before Installing TWRP

Before starting the procedure, make sure that your device meets the minimum requirements. First, check the smartphone model through Settings β†’ About Phone β†’ Model. For example, the Redmi Note 12 Pro+ 5G and POCO F5 have different encodings (redwood and marble respectively), and you need to download TWRP strictly for your modification.

Second, upgrade to the latest stable version of MIUI. This is critical, as legacy versions may contain vulnerabilities that Xiaomi has closed in new patches. Use the official update via Settings β†’ Software Update or the Mi Flash Tool (if manual firmware is required).

  • πŸ“± Save the data: TWRP It doesn't erase user files, but unlocking the bootloader will reset the device to factory settings.
  • πŸ”‹ Battery charge: Make sure the charge level is at least 60%. The installation process can take up to 30 minutes, and discharging in the middle will cause a failure.
  • πŸ–₯️ Computer: You will need a Windows PC 10/11 (for Linux/macOS You need additional drivers. Disable the antivirus, it can block. ADB and Fastboot.
  • πŸ”Œ Cable: Use the original USB-Xiaomi cable or certified cable USB-C. Cheap cables may not transmit data in Fastboot mode.

⚠️ Note: On devices with Dynamic RAM Expansion (virtual memory) before unlocking, disable this function in Settings β†’ Additionally. β†’ Otherwise, there may be a conflict when you overwrite the recovery section.

πŸ“Š What Xiaomi model do you plan to use?
Redmi Note 12/13
POCO F4/F5
Mi 11/12
Another model

2 Unlock the bootloader: the official way from Xiaomi

Xiaomi blocks the bootloader on all devices, so the first step is to unlock it through the official Mi Unlock Tool. The process consists of three stages: linking the Mi Account to the device, waiting for confirmation and actually unlocking.

Download the latest version of the Mi Unlock Tool from the official website (note the release date - outdated versions may not work). Install the program and sign in to the same Mi Account that is linked to the phone.

  1. Activate Developer Mode: Go to Settings β†’ About Phone and click on MIUI Version 7 times.
  2. Return to Settings β†’ Additional β†’ For developers and enable: Debugging over USB Unlock OEM (may be called Factory Unlock)

Connect the phone to the PC, confirm the debugging permission on the device screen.

Mi Unlock Tool

Unlock

From that point on, the waiting time will start. For most devices, it is 168 hours (7 days), but for flagships (for example, Xiaomi 13 Ultra) it can take up to 360 hours. Unlock status can be checked in the same tool, which will show the remaining time.

What if the Mi Unlock Tool can’t see the device?
1.Make sure drivers are installed ADB and Fastboot (download them through) SDK Google Platform Tools. 2. Try another one USB-port (preferably) USB 2.0). 3. Disable driver signatures in Windows (via gpedit.msc β†’ User configuration β†’ Administrative templates β†’ System system β†’ Install the driver). 4. If you are using Windows 11, temporarily roll back to Windows 10 - known device recognition bugs in the new OS.

⚠️ Note: Once the bootloader is unlocked, the smartphone will automatically reset to factory settings. If you used the Find My Device feature, you need to turn it off in advance in Settings. β†’ Xiaomi account β†’ Find My Device, otherwise unlocking will be blocked.

3.Selecting the Right TWRP Version for Your Model

The error in choosing a version of TWRP is one of the main reasons for the device's "brick": even if the models are superficially identical (for example, the Redmi Note 11 Pro for India and the global version), their hardware encodings (codename) may differ.

  • Through ADB: connect your phone to your PC, open the command line in the folder with the platform-tools and type: adb shell getprop ro.product.device
  • In the Device Info HW app (available on Google Play).
  • On the Xiaomi Flash website, in the "Specs" section of your model.

Download TWRP only from official sources:

TWRP site (check the date of the last update).

XDA Developers (see the theme of your model in the Xiaomi section).

Telegram channel TWRP Updates (up-to-date builds for new devices).

Xiaomi modelCode name (codename)TWRP referenceFeatures
Redmi Note 12 Pro+ 5GredwoodDownloadSupports A/B partitions, requires AVB 2.0 to be disabled.
POCO F5marbleDownloadIt works only with firmware based on Android 13.
Xiaomi 13 LitetaoyaoXDAUnofficial assembly may not support OTA-update.
Redmi K60 PromondrianTelegram.Requires a patch for dm-verity.

For 2023-2026 devices (such as the Redmi Note 13 Pro+ or Xiaomi 14), official TWRP builds may not be available, in which case use unofficial ports, but check reviews on XDA or in telegram chats.

4. Install TWRP via Fastboot: step-by-step instruction

When the bootloader is unlocked and the TWRP file (usually with the.img extension) is downloaded, you can start installing.

  • Folder with platform-tools (download here).
  • File. twrp-3.7.0_12-0-redwood.img (Example of the Redmi Note 12 Pro+).
  • Fastboot mode on the phone is enabled (press Power + Volume down when the device is off).

Open the command line in the platform-tools folder (press Shift + right mouse button β†’ Open command window) and execute commands in order:

fastboot devices

(Your device serial number should be displayed. If not, check the drivers.)

fastboot flash recovery twrp-3.7.0_12-0-redwood.img

(Replace the file name with yours.)

fastboot boot twrp-3.7.0_12-0-redwood.img

(This command temporarily loads TWRP without writing to memoryβ€”helpful for health checks.)

TWRP file is renamed to a short name with no spaces (e.g. twrp.img)

Device is defined in fastboot devices

- Disabled antivirus and firewall Windows

- Battery charge β‰₯ 60%

- Backup copy of data created-->

If the fastboot boot command successfully boots the phone to TWRP, you can start the permanent installation.

  1. Advanced β†’ Flash Current TWRP (if any)
  2. Or manually swipe the twrp.img file through Install β†’ Install Image β†’ Recovery.

⚠️ Attention: On devices with A/B-sections (e.g, POCO X5 Pro) after installation TWRP You need to turn off the forced encryption. β†’ Format Data and type in yes. This will delete all data, but prevent looping when downloading.

πŸ’‘

After installation TWRP The phone is not loaded into the system, try flashing disable_dm-verity_forceencrypt.zip You can download the file from the Recovery. XDA or in telegram channels dedicated to your model.

5. Solving common installation errors

Even with the correct following of the instructions, errors can occur.

  • 🚨 "Fastboot not recognized: Make sure that the folder with the platform-tools is added to the environment variable PATH, or run the command line from this folder.
  • πŸ”„ The device is fixated on the logo MI: So that means that dm-verity is blocking the download, so the solution is to flash Magisk or patch. disable_dm-verity (see the advice above).
  • πŸ”Œ TWRP Does not see internal memory: On new devices (Android 12)+) You may need to enter an encryption password (if it was set). If you do not remember the password, format Data (all data will be deleted).
  • πŸ“± Touch in TWRP Not working: For some models (e.g. Redmi) K50i) need to be connected OTG-Mouse or use hardware buttons to navigate.

If after installing the TWRP, the system automatically overwrites it to a stock Recovery, this means that Anti-Rollback protection is enabled.

  1. Sweep OrangeFox Recovery instead of TWRP, it’s better at bypassing protection on new devices.
  2. Turn off automatic recavator updates through ADB: adb shell su echo"1" > /proc/sys/kernel/kptr_restrict

πŸ’‘

On MediaTek devices (e.g. Redmi 10C), an additional step is required to install TWRP, which is to unlock the SP Flash Tool.This process is more complex and requires a scatter.txt file that can be obtained from official firmware.

6. Additional TWRP settings: Backup and Magisk

Once the TWRP is successfully installed, it is recommended to create a full backup system immediately, which will save you in case of a failed firmware or experimentation with mods.

  1. In the main TWRP menu, select Backup.
  2. Mark the sections: Boot, System, Data, Vendor.
  3. Select a save location (preferably on MicroSD or a formatted flash drive via OTG).
  4. Press Swipe to Back Up.

Backup takes 10 to 30 minutes depending on the amount of data you have, and you keep it in a safe place, and that's your brik insurance.

If you plan to get root rights, install Magisk via TWRP:

1. Download the latest Magisk-v26.4.zip from GitHub.

2. In TWRP, select Install β†’ Specify downloaded file β†’ Swipe to Confirm Flash.

3. After installation, restart to the system.

To check if Magisk is working correctly, install the Magisk Manager app and run the test in Check SafetyNet. If you are in Basic Integrity: False status, you will need to additionally flash the Universal SafetyNet Fix module.

7.TWRP Update and Return to Stock Recavator

TWRP requires periodic updates, especially after major MIUI updates.

  1. Download the new version of the.img file.
  2. Download to the current TWRP (via fastboot boot twrp.img or button combination).
  3. In Recovery, select Install β†’ Install Image and select the new file.
  4. Swipe to the Recovery section and reboot.

If you need to return stock recavators (for example, for warranty repairs), download the official firmware for your model from the Xiaomi website. The archive with the firmware will have a recovery.img file.

fastboot flash recovery recovery.img

After that, unlock the bootloader back (if required) and reset via fastboot-w to clean up the data.

FAQ: Frequent questions about installing TWRP on Xiaomi

Can I install TWRP without unlocking the bootloader?
No, Xiaomi blocks entry to the recovery section at the bootloader level. Any attempts to get around this without official unlocking will result in a FAILED error (remote:'Flashing is not allowed'). The only exception is a temporary TWRP boot boot load through fastboot boot, but it will disappear after the restart.
Why does TWRP ask for a password when downloading?
This is due to the encryption of the Data partition in Android 10+. If you've used PIN-code, TWRP If the password is forgotten, the only way out is to format the Data (all user data will be deleted). To avoid this in the future, disable the encryption in the developer settings (No encryption).
How do I know if my device supports TWRP?
Check the list of supported devices on twrp.me. If your model is not available, look for unofficial builds on the site. XDA or in telegram chats (e.g, @twrp_russia). Pay attention to the date of the last update – if the build is older 2022 It may not work with new versions of the year. MIUI.
Can I flash TWRP on Xiaomi with a MediaTek processor?
Yes, but the process is more complicated than Snapdragon. SP Flash Tool and firmware with scatter.txt file. SP Flash Tool select only the recovery partition and specify the file twrp.img. Connect the phone to the PC (without the battery if it is removable). ⚠️ The risk of a breeze is higher than on Snapdragon! recommended to use MTK Bypass Tool for bypassing protection.
What if the phone does not turn on after installing TWRP?
Most likely, there was an error when you were firmware boot partition or activated anti-Rollback protection. + Volume down) and flash stock recaveries: fastboot flash recovery recovery.img If the phone is not responding, use it. EDL-This will require an authorized Xiaomi account and a firehose.mbn file. Contact the service center if you are not sure of your actions - independent attempts can aggravate the problem.