Install custom TWRP on Xiaomi: from unlocking the bootloader to firmware

Installing a custom TWRP recavator on Xiaomi smartphones is a key step for those who want to gain full control of the device, which allows you to sew informal firmware, back up the system, remove preinstalled applications and even restore bricks after unsuccessful experiments. However, the process requires care: an error at any stage can lead to the loss of warranty or complete failure of the device without the possibility of recovery through standard methods.

In this article, we will discuss the current methods of installing TWRP on modern Xiaomi models (2023-2026), including the Redmi Note 12, POCO F5, Mi 14 and others. Particular attention will be paid to unlocking the bootloader, the most difficult stage where many users face a freeze of 50% or 99%, and you will learn how to avoid typical errors, such as Anti-Rollback or problems with data encryption after firmware.

We warn you right away: the procedure is not official, and Xiaomi may refuse warranty service if it finds traces of interference. If you are not sure about yourself, it is better to contact specialists or use alternative customization methods (for example, Magisk without TWRP).

1.Preparation: What to Know Before Installing TWRP

Before you start firmware, make sure your device is custom-ready. Not all Xiaomi models support TWRP – especially new flagships with anti-Rollback protection (such as the Mi 13 Ultra or Redmi K60 Pro). Check the current information on the official twrp.me website or in thematic communities such as 4PDA or XDA Developers.

Also consider the following points:

  • πŸ”‹ The battery must be at least 70% charged, and interruption of the process due to discharge can lead to hard brick (irreparable damage).
  • πŸ“± Backup of all important data is mandatory! TWRP erase internal memory.
  • πŸ” Unlocking the bootloader will reset the device to factory settings and delete all files, including photos and apps.
  • πŸ› οΈ Tools: You will need a Windows PC 10/11 Linux, USB-cable (preferably original) and Mi Unlock Tool programs, ADB/Fastboot.

If your device is released after 2022, it probably comes with Anti-Rollback 4+ protection.This means that the firmware of the older version of TWRP or downgrade MIUI can lock the bootloader permanently.Always use the latest version of the recovery compatible with your model!

⚠️ Note: On some devices (e.g. Redmi Note 11 Pro)+ 5G) post-installation TWRP The module may stop working. NFC It's about hardware-based driver binding to stock firmware. Before you start, check the user feedback on your model!

πŸ“Š What Xiaomi model do you plan to use?
Redmi Note 12/Pro
POCO F5/X5
Mi 13/14 series
Redmi K60/K70
Another model

2 Unlocking the bootloader: the most difficult stage

Without an unlocked bootloader, you can’t install TWRP. Xiaomi has made this process more difficult in recent models: it now requires a Mi Account to be linked to the device and waits for 7–168 hours (depending on company policy).

  1. Activate Developer Modes: Go to Settings β†’ The phone. β†’ Version. MIUI and tap this item 7 times. Go back to Settings. β†’ Additionally. β†’ For developers and include: πŸ”“ Unlocking OEM (It may not be available on new devices). πŸ”Œ Debugging by USB.

Mi

In the same Developer Menu, find Mi Unlock Status and link your account. Without this step, Mi Unlock Tool won't work.

Mi Unlock Tool

Download the latest version of the utility from the official website, launch it on behalf of the administrator and log in under the same account as on your phone.

Fastboot

Turn off the device, then press Volume Down + Power until a bunny with the inscription FASTBOOT appears. Connect to a PC.

In Mi Unlock Tool, click Unlock. If you have a waiting message, wait until the specified time (usually 7 days for new accounts).

In the unlock phase, many people encounter errors, the most common ones being:

Mistake.Reason.Decision
Couldn’t unlock7/168 hours of waiting has passed.Wait until the time is set, do not untie your account.
Current account is differentThe account on the PC and the phone do not matchLog out of all accounts on your phone, log in again
Device not supportedThe model does not support unlockingCheck the list of supported devices on XDA
Hanging 50% or 99%Problems with drivers or USB-connectionTry another cable/port, disable the antivirus

⚠️ Warning: If after unlocking the phone stopped turning on or got stuck on the Mi logo, don't panic. boot up to Fastboot (Loudness down). + Power) and run the stock firmware through the Mi Flash Tool. 4PDA model-themed.

Linked to Mi Account in the developer settings|Debugging is on. USB|Drivers installed ADB/Fastboot|Battery charge >70%|Data backup made.-->

3.Selection of TWRP version: official vs unofficial build

There are two types of TWRP assemblies:

  • πŸ”΅ Official – posted on twrp.me, tested by the development team, but often outdated.
  • 🟒 Unofficial – collected by enthusiasts (for example, on the XDA or 4PDA), Support new models, but may contain bugs.

For most Xiaomi devices from 2023 to 2026, there are no official builds. For example, for the Redmi Note 12 Pro+ or POCO F5, you will have to look for unofficial versions in the themes on XDA.

  • πŸ“… The newer the better (especially for Android devices) 13/14).
  • πŸ”„ Support A/B-Partitions – relevant for dynamic partition devices (e.g. Mi) 11/12/13).
  • πŸ”’ Encryption – some assemblies can’t decrypt /data.

Where to look for current assemblies:

  • 🌐 XDA Developers – sections on Xiaomi models.
  • πŸ‡·πŸ‡Ί 4PDA β€” thread-and-discussion.
  • πŸ“₯ Developer Telegram channels (e.g, TWRP for Xiaomi).

Example of the name of an unofficial assembly file: twrp-3.7.0_12-v7.4_A13-redwood-skkk.img, where:

  • 3.7.0_12 β€” version TWRP.
  • A13 supports Android 13.

⚠️ Note: Some unofficial builds may contain malicious code or backdoors. download files only from verified sources and check hash amounts (MD5 or SHA256) author-in-law.

πŸ’‘

If you can't find a TWRP for your model, try looking by device code. For example, for POCO F5, the code is marble, and for Redmi Note 12 Pro+ 5G, ruby. The full list of codes is on XDA.

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

When the bootloader is unlocked and the TWRP file is downloaded, you can start the firmware. We'll use Fastboot, the most reliable method.

  • πŸ–₯️ PC with installation ADB Fastboot (can be downloaded as part of Android) SDK Platform-Tools).
  • πŸ“± Phone in Fastboot mode (Loudness down) + Nutrition).
  • πŸ“ File. TWRP in.img format (e.g, twrp-3.7.0-redmi_note_12.img).

Instructions:

  1. Open the command line in the folder with platform-tools (press Shift + PCM β†’ Open the PowerShell window here).
  2. Check the device connection: fastboot devices Should show a serial number of the phone. If not, install the drivers or change the drivers. USB-cable.
  3. Please. TWRP: fastboot flash recovery twrp-3.7.0-redmi_note_12.img Replace the file name with yours.
  4. Stop replacing the recavΓ©ri with stock: fastboot flash recovery_ab twrp-3.7.0-redmi_note_12.img (Only for devices with A/B-partition!)
  5. Reboot to TWRP: fastboot boot twrp-3.7.0-redmi_note_12.img Or by hand: Volume up + Power on loading.

If after the reboot, the TWRP doesn't start and the phone loads into MIUI, then the stock firmware has overwritten the Recovery.

  • πŸ”„ Repeat the firmware. TWRP And immediately after the command, fastboot flash recovery:
  • πŸ”§ Install Magisk or another module that blocks Recovery replacement (e.g., Regaver, Disable_Dm-Verity_ForceEncrypt).
What if TWRP asks for a password when mounting /data?
If you used data encryption in MIUI, TWRP will require you to enter a password/pattern lock to decrypt the /data partition. If you forgot the password or it does not fit: 1. Go to Wipe β†’ Format Data (this will delete all data!). 2. Refuse the stock MIUI via Fastboot, then re-install TWRP. 3. For some models (for example, POCO X3 Pro) there are patches to bypass encryption - look for XDA.

5. Solving Common Errors After Installing TWRP

Even if the installation is successful, you may encounter problems.

Problem.Reason.Decision
The phone does not turn on after the firmwareIncompatible version of TWRP or interrupted processSwipe stock firmware through Mi Flash Tool in clean all mode
TWRP does not see internal memoryFBE encryption or damaged /data partitionFormat. /data into TWRP or Disable_Dm-Verity
Anti-Rollback error when downloadingThe old version of MIUI or TWRPSweep the newest stock firmware through Fastboot
The sensor is not working in TWRPThe wrong build for your modelFind another version. TWRP or use OTG-mouse

The Anti-Rollback error is especially dangerous if you try to flash firmware or TWRP older than the one installed on the device. For example, on the Redmi Note 10 Pro with MIUI 14, you can not flash the TWRP collected for MIUI 12.

  • 🚨 Phone hangs on Mi logo with red warning.
  • πŸ”΄ Fastboot features the Anti Rollback Check Fail.

The only solution is to flash the full stock firmware package through the Mi Flash Tool with a clean all and lock tick, and then the bootloader locks, and you have to repeat the unlock.

πŸ’‘

Always check your device’s Anti-Rollback version before running TWRP. This information is in the 4PDA or XDA themes for a particular model.

6. Additional TWRP settings: what to do after installation

After a successful TWRP installation, it is recommended to follow several important steps to avoid problems in the future:

  1. Backup: Go to Backup and select the Boot, Data, System partitions. Save the backup to Backup. SD-It's going to save you from a bad firmware experiment.
  2. Turn off forced encryption: If you plan to use custom firmware, swipe through a zip file Disable_Dm-Verity_ForceEncrypt (download XDA). This will prevent problems with installation /data.
  3. Install Magisk for root rights: Download the latest Magisk.zip from GitHub and stream through Install to TWRP.
  4. Set up TWRP Auto Update: Some builds have a TWRP App option that lets you update your recaps directly from your phone.

If you plan to flash custom firmware (like LineageOS or Pixel Experience), first check their compatibility with your XDA model.

πŸ’‘

To avoid problems with OTA-update MIUI post-installation TWRP, Turn off automatic update checks in settings or stitch full packages manually through Recovery.

7. Alternative methods of installing TWRP (without Fastboot)

If you can’t flash TWRP through Fastboot (for example, due to a blocked bootloader or driver errors), you can try alternative methods:

  • πŸ“± Through stock recavator: Some devices (e.g. old Redmi Note) 5/6) Allows you to flash a.zip file TWRP And you can do it through a standard Recovery. twrp-installer.zip Rename the file to your model. update.zip And put it in the root of the memory. Load into the stock Recovery. + Power) and select Apply update from SD card.

Through ADB Sideload:

If the TWRP is already installed, but you need to update it, you can use:

adb sideload twrp-3.7.0-redmi_note_12.zip

TWRP Manager

The Google Play app (requires root) allows you to flash and update TWRP directly from your phone, and is suitable for devices with an already unlocked bootloader.

For devices with a locked bootloader and Android 10+, these methods are likely not to work. The only reliable way is to unlock through the Mi Unlock Tool and firmware through Fastboot.

FAQ: Answers to Frequent Questions

Can I install TWRP without unlocking the bootloader?
No, on all modern Xiaomi devices (after 2018), installing a custom recavator requires an unlocked bootloader, except for some older models (such as the Redmi 4X or Mi A1) where you can flash TWRP through exploits, but this is not relevant for new devices.
Why does the TWRP install not boot your phone to the system?
It could be related to: πŸ”΄ Incompatible version TWRP (slice through another assembly). πŸ”΄ Damaged section /data (Try Format Data in the Format Data TWRP). πŸ”΄ Anti-Rollback error (swipe stock firmware through Mi Flash).If the phone hangs on the logo, download to the logo. TWRP (Loudness up + Meals) and sew a stock boot.img.
How to return stock recap after TWRP?
Download stock firmware for your model from the site MIUI Downloads, unpack it and find the file. recovery.img. Fastboot: Fastboot Flash Recovery recovery.img For devices with A/B-Also, please do this: fastboot flash. recovery_ab recovery.img
Can I update my MIUI after installing TWRP?
Yes, but with reservations: βœ… Normal. OTA-Update through Settings β†’ Update system will not work (the system will detect changes in the Recovery). βœ… You can download full firmware packages (.zip) from MIUI Downloads and stitch them through TWRP (Choose Install β†’ Select ZIP). ⚠️ After updating MIUI squashing can be rewritten TWRP. To avoid this, immediately after the update, re-sweeten the custom Recovery.
Will Google Pay and banking apps work after TWRP is installed?
Most banking applications (including SberBank Online, Tinkoff) and Google Pay refuse to work on devices with an unlocked bootloader or root rights: πŸ”„ Use Magisk with MagiskHide Props Config to mask SafetyNet status. πŸ”„ Install the Universal SafetyNet Fix module. πŸ”„ For Google Pay, changing the region to the supported one can help (for example, USA) No guarantee – some apps (e.g. Alpha Click) are locked at the kernel level and don’t work even with MagiskHide.