Installation TWRP Xiaomi: full instructions with unlocking the bootloader and firmware

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).

๐Ÿ“Š What Xiaomi model you are installing for TWRP?
Redmi Note 12/13
POCO X5/F5
Mi 13/14
Another model
I haven't decided yet.

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-info

In 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:

  1. 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.
  2. Android Version (12, 13, or 14) โ€“ Some builds TWRP They only work on a specific version.
  3. 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?
If you're stitching TWRP On top of a custom firmware (like LineageOS), make sure that the recovery version supports the core of this firmware, TWRP 3.7.0 may not work with Android 14 if the build is focused on Android 13.In that case, look for versions labeled Android 14 compatible or A14 file-name.

Xiaomi modelCode nameRecommended version of TWRPNotes
Redmi Note 12 Pro 4Gsweet3.7.0_12-0Supports MIUI 14 and Android 13
POCO F5marble3.7.0_9-0 (unofficial)Requires a shutdown. AVB 2.0 before the firmware
Xiaomi 13fuxi3.7.0_12-1It only works with Global ROM.
Redmi K60 Promondrian3.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:

  1. Unpack the archive from Platform Tools to the root of the C disk, C:\platform-tools).
  2. Place the file. TWRP (with the.img extension) to the same folder and rename it to twrp.img convenienceally.
  3. Open the command line in the platform-tools folder (click Shift). + PCM โ†’ Open at the terminal).
  4. Connect your phone in Fastboot mode and check the connection with the command: fastboot devices must display the serial number of the device.
  5. TWRP command: fastboot flash recovery twrp.img
  6. 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.img

Or 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:

    1. 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.
    2. Create a full backup: go to Backup and mark the Boot, System, Data and VBMeta sections. Save the backup to Backup. SD-card.
    3. 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:

    1. Please. TWRP Fastboot again.
    2. Immediately after the firmware, perform: fastboot flash recovery_ramdisk twrp.img (for devices with dynamic partitions).
    3. Reboot to TWRP Team of fastboot boot twrp.img.
    4. 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 causeDecision
    Mistake. FAILED (remote: 'Not allowed in Lock State')The bootloader is not unlocked or not fully unlockedRepeat the unlocking procedure through the Mi Unlock Tool, wait for confirmation
    TWRP does not see internal memoryEncryption FBE (File-Based Encryption)Please. disable_forceencrypt.zip or format the data in TWRP
    The device is loaded into TWRP, but notBoot partition is damaged or vbmeta is missingStitch the original boot.img and vbmeta.img via Fastboot
    Invalid sparse file format at headerIncompatible version TWRP firmwareDownload another recavator assembly corresponding to your version MIUI/Android
    The phone does not turn on after firmware (black screen)Damaged section. DTBO superSwipe 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:

    1. Switch the Universal SafetyNet Fix patch to Magisk.
    2. Use alternative apps (e.g. Google Camera instead of Google Camera) MIUI Camera).
    3. 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.

    FAQ: Frequent questions about installing TWRP on Xiaomi

    โ“ Can we determine TWRP loader-free?
    No, on all modern Xiaomi devices (2018 and later), unlocking the bootloader is mandatory. The only exception is if you already have root rights, but even then unlocking will be required to firmware the Recovery through the Fastboot. On very old models (for example, Redmi). 4X or Mi A1) There were exploits to bypass the lock, but they have long been closed in new versions. MIUI.
    โ“ Why after the firmware? TWRP phone out?
    Most common reasons: Incompatible version TWRP with your firmware (for example, recovery for Android) 12 stitched on Android 13). The Boot section is damaged or DTBO (for example, if they have been TWRP how boot.img instead recovery.img). Dynamic Partitions devices didn't have vbmeta flashed with the check turned off. Solution: run the full Fastboot. ROM Using the Mi Flash Tool (select clean all option). If the phone is not determined by the PC, try clamping Volume up + Meals for food 10โ€“15 Seconds for Forced Reboot in Fastboot.
    โ“ How to update TWRP before?
    Update TWRP It runs the same way as the original installation: Download the new.img file. Download to the current version. TWRP. Go to Install. โ†’ Install Image and select a new file. Sweat it to the Recovery section (or Recovery Ramdisk for dynamic partitions. โš ๏ธ Don't update. TWRP If you already have Magisk stitched through Fastboot, it can lead to the loss of root rights. In this case, after updating, the Recovery need to be re-stitched. Magisk.zip.
    โ“ Can I return the stock recap after TWRP?
    Yes, for that: Download the stock firmware for your model from Xiaomi. Unpack the archive and find the file recovery.img (Sweep it through Fastboot: fastboot flash recovery. recovery.img Reboot the device if the stock Recovery is not sewn (error) FAILED), So the device has downgrade protection on, so you need to flash the full Fastboot. ROM via Mi Flash Tool.
    โ“ Will it work?