Castom Recovery TWRP β It is an indispensable tool for Xiaomi owners who want to gain full control of their device, allowing them to install unofficial firmware, backup the system (nandroid backup), restore data after crashes and even bypass some restrictions. MIUI. But over time, TWRP may start to work incorrectly: errors occur when mounting partitions, recovery flies after updating MIUI, or the device stops loading in the recovery-mode, which requires reinstallation. TWRP.
The reinstallation process is different from the original installation: here it is important to take into account the current state of the bootloader, the version of the system. MIUI And even a processor model (Qualcomm or Mediatek), like on Dynamic Partitions devices like the Redmi Note 10 Pro or the Redmi Note 10 Pro. POCO F3) Standard methods may not work, but on older models (e.g. Redmi). 4X) You will have to use the fastboot utility with special flags, and this article covers all the nuances from preparation to fixing common errors, including bypassing the antirollback lock on new Xiaomi devices from 2023-2026.
Preparation for reinstallation TWRP: What to do before you start
Before you start manipulating a recavery, you need to follow a few critical steps, which can lead to brick or loss of data, starting with checking the current state of the device:
- π± Make sure the bootloader is unlocked. You can check this by restarting the phone to fastboot (hold Power). + Volβ) and type in: fastboot oem device-info In the answer, look for the line Device unlocked: true. If false, the bootloader is locked, it will have to be unlocked again through the Mi Unlock Tool.
- π Check the version. MIUI. On new firmware (e.g, MIUI 14/15 Android-based 13/14) Special versions may be required TWRP Support for Dynamic Partitions. You can find the version in Settings β The phone. β Version. MIUI.
- πΎ Back up your data. Reinstall it. TWRP It can erase user data, especially if you have to format a data partition. Use Mi Cloud, Google Drive, or physical copying on your PC.
- π₯οΈ Prepare your PC. Install the latest versions. ADB & Fastboot (you can download from the official website of Android Developers), drivers for Xiaomi (for example, Mi). USB Driver) and disable the antivirus β it can block utilities.
Pay special attention to the model of your device. POCO X3 Pro (codename vayu) and Redmi Note 11 Pro+ 5G (peux requires different versions TWRP, a on Mediatek chips (like in Redmi) 10C) The installation process is radically different from Qualcomm devices. To avoid errors, always check the official list of supported devices on the site. TWRP.
β οΈ Attention: On Android devices 12+ and MIUI 13+ post-installation TWRP Anti-Rollback protection can be triggered, blocking the system's boot. TWRP marked ARB (for example, twrp-3.7.0_12-vayu_ARB.img).
2 Unlock the bootloader: if it is blocked after the update
One of the most common problems is the automatic lock of the bootloader after the update. MIUI through OTA. Xiaomi is actively fighting custom firmware, and even if you previously unlocked the bootloader, the system can return it to a locked state. TWRP It wonβt work until you unlock it again.
The unlocking process includes several stages:
- Linking your Mi Account to your device, you need to go to Settings. β Xiaomi account β Mi Cloud and make sure the device is tethered. Without it, the Mi Unlock Tool won't work.
- Waiting 7-14 days (on new devices) Xiaomi has introduced a mandatory waiting period to unlock. If you have previously unlocked the bootloader, this stage can be skipped.
- Use the Mi Unlock Tool. Download the latest version of the utility from the official website, run it on behalf of the administrator and follow the instructions. Importantly, the program may give a Couldn't unlock error if you use a non-original cable or USB 3.0 port.
If the Mi Unlock Tool refuses to unlock the bootloader, try the following solutions:
- π Change. USB-port USB 2.0 (usually black) Ports USB 3.0 (blue) often causes errors.
- π΅ Turn off the Internet on your PC while unlocking β sometimes Xiaomi servers block requests.
- π Wait 24 hours and try again. Xiaomi servers can temporarily limit the number of requests.
β οΈ Note: On devices with Mediatek processors (e.g. Redmi) 10A or POCO C40) Unlocking the bootloader can lead to loss IMEI. Before the procedure, save it with the help of utility MTK Engineering Mode or ChimeraTool.
Linked to the Mi Account to the device|Xiaomi drivers installed|Used by the original USB-cable|Antivirus and firewall disabled|PC is connected to the Internet (but not via the Internet) VPN)-->
3.Selecting the Right TWRP Version for Your Xiaomi Model
Mistake in the choice of version TWRP β One of the main reasons for soft-brick (when the device does not boot, but reacts to fastboot) is that even within the same line (for example, the Redmi Note 11) there can be different modifications with unique codenames:
| Xiaomi model | Code name (codename) | Processor type | Features of TWRP |
|---|---|---|---|
| Redmi Note 11 Pro+ 5G | peux | Mediatek Dimensity 920 | Requires a version with support for Dynamic Partitions and Mediatek patches |
| POCO F3 / Redmi K40 | alioth | Qualcomm Snapdragon 870 | Standard version TWRP, but with a mandatory patch for ARB 4/5 |
| Xiaomi 12 Pro | zeus | Qualcomm Snapdragon 8 Gen 1 | Only unofficial builds (no official support) |
| Redmi 9A / 9C | dandelion | Mediatek Helio G25/G35 | Manual editing of the scatter file is required for SP Flash Tool |
To find out the code name of your device, use the command in ADB:
adb shell getprop ro.product.deviceor check in the settings β The phone. β The kernel version (look for a string like peux-user 12) SKQ1.211006.001, where peux is codename).
After determining the device code, download the appropriate version TWRP from one of the verified sources:
- π Official website TWRP (twrp.me β stable builds for popular models are published here.
- π§ Forum XDA Developers β unofficial ports for new devices (look for themes marked with a note) [UNOFFICIAL]).
- π¦ Telegram channels like Xiaomi TWRP Updates β current builds with support for the latest versions MIUI.
β οΈ Attention: Do not use TWRP For Qualcomm devices on Mediatek smartphones and vice versa, this will damage the boot partition and require complete flashing through the boot partition. EDL-regime.
π‘
If you're on the site TWRP If you don't have your model, try looking at the CPU code. G95 fit TWRP from another model with the same chipset (but the risks are higher!).
Step-by-step instruction: reinstallation TWRP via Fastboot
The most reliable way to reinstall TWRP β This method works on most Xiaomi devices with Qualcomm processors and part of Mediatek (for the latter may be required). SP Flash Tool. Follow the instructions strictly by step:
- Put the device in fastboot mode: Turn off the phone. Press Power. + Volβ Hold for 10-15 seconds until the Fastboot logo appears).
Connect the device to the PC
fastboot devicesYour phone's serial number should show up. If not, check the drivers.
Unlock the critical section
Qualcomm
fastboot flashing unlock_criticalThis command is necessary for devices with Android 10+.
Please TWRP.
fastboot flash recovery twrp.imgReplace. twrp.img to your file name (for example, twrp-3.7.0_peux.img).
Turn off the Recovery check.
fastboot flash vbmeta vbmeta.imgFile. vbmeta.img can be downloaded together with TWRP Or create an empty space with a team:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.imgReboot to TWRP
fastboot reboot recoveryIf the command does not work, manually press the Power. + Vol+ loading.
After successful loading into TWRP Don't rush to reboot to the system:
- π Backup boot, data and system partitions (Backup menu in the system) TWRP).
- π‘οΈ Turn off encryption (if enabled). Go to Wipe for that. β Format Data and enter yes. This will delete all data, but prevent partition mounting problems.
- π Sweep the patch for Anti-Rollback (if required). ZIP-file (e.g, Disable_Dm-Verity_ForceEncrypt.zip) and install it through Install in TWRP.
What happens if TWRP doesnβt start?
5. Reinstallation TWRP on devices with Mediatek: features and risks
Xiaomi devices on Mediatek processors (e.g. Redmi) 10A, POCO C40, Redmi 9C) They need to take a different approach because of the chipset architecture, and you can't use fastboot to run a recovery firmware, but instead you use a utility. SP Flash Tool or MTK Client, major difficulties:
- π§ You need a scatter file, a text file that describes the memory markup, which you can extract from the official firmware or download separately.
- π¨ Risk of loss IMEI β If the firmware is incorrect, you can damage the nvram partition where it is stored. IMEI.
- π Blocking the bootloader - on new devices (MTK Secure Boot requires authorization through Firehose protocol.
Step-by-step instructions for Mediatek:
- Download the SP Flash Tool (version 5.2 or later) and unpack the archive.
- You get a scatter file. You can extract it from the official firmware using the help of a scatter file. MTK Droid Tools or download from the forum (for example, for Redmi) 9A seek MT6765_Android_scatter.txt).
- Launch it. SP Flash Tool and upload the scatter file via Choose.
- Select only the recovery section in the list and specify the path to the file. TWRP (twrp.img).
- Connect the device to the PC (without the battery if it is removable).
- Press Download and wait until the process is complete (a green circle will appear).
If SP Flash Tool is an error SLA Auth or Authentication File, which means your device has Secure Boot protection enabled:
- π Use it. MTK Client with an authorization file (auth.svg) that can be obtained from official resellers or on paid services like ChimeraTool.
- π Try to sew it. TWRP via fastboot with a flag --disable-verity, But it's only going to work on older devices.
β οΈ Note: On devices with Mediatek Helio G85/G90 (For example, Redmi Note 9 Pro) poor firmware TWRP It can damage the preloader partition, making the phone unfit for repair without specialized hardware.
π‘
For Mediatek devices, always check compatibility. TWRP loader-produced (BL). For example, TWRP for Redmi 9A loader V12.0.1.0 not fit for V13.0.2.0.
6. Solving common errors in reinstallation TWRP
Even with the correct following of the instructions, errors can occur, and here is a list of the most common problems and ways to solve them:
| Mistake. | Reason. | Decision |
|---|---|---|
| FAILED (remote: 'Flashing is not allowed in Lock State') | bootloader locked | Unlock the bootloader through the Mi Unlock Tool (see Section 2) |
| Invalid sparse file format at header magi | A TWRP file or incompatible version is damaged | Download another image TWRP (Check the codename of the device) |
| The device is loaded into MIUI Recovery instead TWRP | The system overwrites the Recovery when loading | Switch vbmeta with a disabled check or patch disable_miui_anti_rollback.zip |
| E: Unable to mount /data in TWRP | Encryption FBE (File-Based Encryption) | Format the data in TWRP (Wipe β Format Data) |
| SP Flash Tool: S_FT_ENABLE_DRAM_FAIL | Incompatible scatter file or drivers | Update Mediatek Preloader drivers and check the scatter file |
If your error is not listed in the table, try the following universal steps:
- Check the integrity of the files. TWRP Re-emerge, possibly damaged archive.
- Use another PC. Sometimes the problem is driver or antivirus conflicts.
- Update the tools. Install the latest versions. ADB, Fastboot and SP Flash Tool.
- Check the cable. Use the original. USB-Xiaomi cable β cheap cables often cause data transmission errors.
For devices with Dynamic Partitions (e.g. Xiaomi) 11T pro POCO F4 GT) You may need to manually edit partition markup:
- Download the Dynamic Partition Tool from the forum XDA.
- Follow the instructions for resizing the super and vendor partitions.
- Squeeze the modified super.img fastboot.
How to Restore Your Device After a Hard Brick
7 How to save TWRP post-refresh MIUI
One of the most frustrating features of Xiaomi is its automatic deletion. TWRP post-refresh MIUI through OTA. The system replaces custom recapvery with standard, which makes it impossible to load into the system. TWRP. To avoid this, use one of the methods:
- π Turn off the updates OTA. Go to Settings. β The phone. β Update the system and click on the icon βοΈ In the upper right corner, disable Auto boot via mobile and Wi-Fi.
- π¦ Install updates manually through TWRP: Download the full ZIP-Firmware file from Xiaomi Firmware Updater. TWRP and sew ZIP Install, immediately after installation, click ZIP patchy disable_miui_anti_rollback.zip.
Block the re-recording of the Recovery
boot.img
If you have updated through OTA lost TWRP, Just repeat the reinstallation process (see section 4), but before that:
- Unlock the bootloader (if it is blocked).
- Switch vbmeta with the check turned off.
- Install. TWRP And immediately patch for Anti-Rollback.
β οΈ Attention: On devices with MIUI 14+ Android 13+ post-refresh OTA may trigger protection MIUI Protection, which blocks downloads to any Recovery other than the standard one, in which case you'll have to flash the full firmware image through fastboot with the flag. --skip-secondary.
Alternative methods: installation TWRP PCless
If you do not have access to your computer, reinstall TWRP You can use it directly from your phone, but this method is only suitable for devices that have custom Recovery or root access installed:
- π± Through the Official Appendix TWRP App (root required): Download the app from Google Play. Select your device model and download the image TWRP. Click Select a file to flash and select downloaded twrp.img. Confirm the firmware and restart to the Recovery.
- π Through the terminal in TWRP (If the current recap is working: Download the new twrp.img on the phone. TWRP Go to Advanced. β Terminal. Enter the command: dd if=/sdcard/twrp.img of=/dev/block/by-name/recovery Reboot to Recavator with the Reboot Recovery Team.
- π¦ Through ZIP-File (if supported): Some assemblies TWRP unpack ZIP-So you can download an archive that you can stitch up like a regular firmware. TWRP and install it through Install.
Dynamic Partitions
super.img
If the current Recovery is damaged, the method will not work.
π‘
Installation TWRP Without a PC, it's a temporary solution. A full reinstallation (especially on new devices) will still require a computer.