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

Installing custom Recovery on Xiaomi smartphones is the first step to full control of the device. TWRP Or OrangeFox you can flash unofficial firmware, backup your system, restore data after crashes and even bypass some restrictions. MIUI. However, the process requires preparation: from unlocking the bootloader to choosing the correct version of Recovery for a particular model.

In this article, we will take a look at the whole way from obtaining permission to unlock through the Mi Unlock Tool to the final installation of Recovery with a health check. We will pay special attention to common errors (for example, Fastboot Unknown Command or Anti-Rollback) that can interrupt the process, and how to get around them.+, POCO F5 Xiaomi 13 Ultra – the instruction is adapted for modern models taking into account the latest changes in Xiaomi policy.

Why do I need to install custom Recovery?

Xiaomi’s stock Recovery is limited to basic features: reset to factory settings, firmware update through update.zip And check the integrity of the system. TWRP (TeamWin Recovery Project or OrangeFox Expands Opportunities:

  • πŸ“¦ Backup – Save full partition images (boot, system, data) to recover from failed experiments.
  • πŸ”§ Firmware ZIP-Files – installation of unofficial firmware (LineageOS, Pixel Experience), cores, mods (for example, Magisk for root rights).
  • πŸ”“ Bypassing restrictions – removing embedded applications MIUI, change of memory markup, reset of the pattern lock lock (subject to the availability of root rights).
  • πŸ› οΈ Recovery from the Brick – If the smartphone doesn’t boot, custom Recovery is often the only way to bring it back to life.

It’s important to understand that installing custom Recovery automatically resets the warranty and can lead to locking the device if you do not do the right thing. For example, Recovery firmware that is not compatible with your model’s anti-rollback version will turn your smartphone into a brick.

πŸ“Š What Xiaomi model do you plan to modify?
Redmi Note 10/11/12 series series
POCO F3/F4/F5
Xiaomi 12/13 Series
Another model
I haven't decided yet.

Preparation of the device: unlock bootloader

Before installing Recovery, you need to unlock bootloader, a secure mechanism that blocks changes to system partitions by default. Xiaomi requires official permission to unlock through the Mi Unlock service. The process takes 7 to 30 days (depending on manufacturer policy) and involves several steps.

Step 1: Linking your Mi Account to your device

Without a linked Mi Account, unlocking is not possible.

  • πŸ“± On the smartphone added Mi Account (check in Settings) β†’ Xiaomi account).
  • πŸ”— Account confirmed by email/phone and has no restrictions (for example, not blocked for suspicious activity).
  • 🌐 The device is connected to the Internet (preferably via Wi-Fi, as mobile traffic can be blocked).

Step 2: Requesting permission to unlock

Download the official Mi Unlock Tool from the site en.miui.com/unlock (Windows version. Action algorithm:

  1. Launch the utility and log in under the same account as on your smartphone.
  2. Put the device in Fastboot mode: turn it off, then press Volume down + Power before the appearance of the Fastboot logo.
  3. Connect your smartphone to your PC through USB-cable (preferably original).
  4. In Mi Unlock Tool, click Unlock, and the check will start. If the account is not linked to the device, the Couldn't unlock error will appear.

After a successful request, the countdown will begin (usually 168 hours or 7 days). After this period, repeat the procedure - the bootloader will be unlocked. 13T or POCO X5 Pro) may require additional confirmation through SMS.

πŸ’‘

If Mi Unlock Tool gives an error This Mi Account is associated with too many devices, try using another account or wait 30 days - the restriction will reset automatically.

Choosing custom Recovery: TWRP vs OrangeFox

Two of the most popular custom Recovery for Xiaomi β€” TWRP OrangeFox. Both offer access to advanced features, but have key differences:

CriteriaTWRPOrangeFox
Support for modelsA broad list, but some newer devices (like the Redmi Note 12 Turbo) may not have stable builds.It is often updated for fresh models, but there is less community to help.
Interface.Classic text with touch control.More modern design with support for themes and gestures.
Additional functionsBasic: backup, firmware, recovery.Built-in file manager, support for Magisk and OFOX script.
Compatibility with MIUIMay require patches to work with new versions MIUI (for example, MIUI 14).Better adapted for Xiaomi, less errors with data encryption.

For most users, OrangeFox is preferred because of better integration with Xiaomi and additional tools. TWRP (Check on twrp.me, select it.

How to find the correct version of Recovery? Use model encoding (e.g., tissot for Redmi Note 7 or alioth for the Recovery model). POCO F3). Download files only from verified sources:

  • πŸ”— Official website TWRP (section).
  • πŸ”— OrangeFox repository (select the Stable branch).
  • πŸ”— Thematic forums (XDA Developers, 4PDA) β€” look for tagged tags [RECOVERY].
How to find out the encoding of your Xiaomi model?
Open the Settings app β†’ The phone. β†’ Version. MIUI. Tap 7 times on the kernel version line to activate the developer menu. β†’ Additionally. β†’ For developers and find the Device Code field (e.g., surya for POCO X3).

Install custom Recovery through Fastboot

After unlocking the bootloader and downloading the appropriate Recovery, you can start installing it.

  • πŸ–₯️ Computer with Windows/Linux/macOS and installed drivers ADB/Fastboot.
  • πŸ”Œ Cable USB (It is preferably original to avoid connection problems).
  • πŸ“± Recovery file in.img format (for example, twrp-3.7.0_12-alioth.img).

Step 1: Install ADB and Fastboot

Download Google’s Platform Tools and unpack the archive to the root of the disk C:\ (for example, C:\platform-tools\). Add a path to the folder to the environment variable PATH:

  1. Open Control Panel β†’ System β†’ Additional System Parameters β†’ Environment Variables
  2. In System Variables, find Path, click Change and add path to platform-tools.

Check the work of the team in the terminal:

fastboot devices

If the device is determined (the serial number will appear), the drivers are installed correctly.

Step 2: Recovery firmware

Transfer the smartphone to Fastboot mode (Loudness down) + Power, and connect to the PC:

fastboot flash recovery twrp-3.7.0_12-alioth.img


fastboot reboot recovery

Replace. twrp-3.7.0_12-alioth.img If the process is successful, the device will reboot to the new Recovery.

Device unlocked (unlocked status in Fastboot)

Recovery file rebranded as short name with no spaces

Antivirus disabled (can block fastboot)

Battery charge > 50%

-->

Note: on some models (e.g. Xiaomi) 12S Ultra) after the firmware Recovery may need to disable the signature verification:

fastboot flash vbmeta vbmeta.img


fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

File. vbmeta.img You can either remove the scaling or download separately.

Solving Typical Errors in Installation

Even with the correct following of the instructions, errors can occur, and let's consider the most common ways to eliminate them:

⚠️ Note: If after the firmware Recovery device does not boot (hang on the logo) MI), Don't panic. Try entering Recovery through Volume Up. + Power and sew stock firmware through Fastboot.

Fastboot Unknown Command: Fastboot Unknown Command

Reason: outdated version of fastboot or incorrect drivers.

  • πŸ”„ Update Platform Tools to the latest version.
  • πŸ”Œ Reinstall the driver via the Mi Flash Tool (download on the official website).
  • πŸ–₯️ Try another PC or virtual machine with Linux.

Error: Anti-Rollback (device blocked)

Modern Xiaomi devices have Anti-Rollback protection, which blocks rollbacks on older firmware or Recovery. If you see the message This package is for "tissot" devices; this is a, it means:

  • πŸ” You have flashed Recovery that is not compatible with the anti version of your model.
  • πŸ› οΈ Solution: Find Recovery marked Anti-Rollback or run the stock firmware through the Mi Flash Tool in clean all mode.

Error: Recovery is not saved after restart

On some models (such as the Redmi Note 10 Pro), stock firmware automatically restores the original Recovery.

  1. After installing Recovery, immediately swipe Magisk (for root rights) or patch disable_forced_encryption.
  2. Or turn off automatic Recovery updates via the command: fastboot flash recovery twrp.img fastboot reboot bootloader fastboot flash recovery twrp.img (Recovery is recovered twice in a row).

πŸ’‘

If the device does not boot into the system after installing Recovery, but Recovery works - the problem is in encrypting the data partition. Solution: do formatting data in Recovery (Warning, this will delete all user data!).

Actions after installing custom Recovery

Successful Recovery firmware is only half the battle, and to avoid future problems, follow a few critical steps:

1. Create a backup (Nandroid Backup)

V TWRP Or OrangeFox go to Backup and select the saved partitions:

  • πŸ“ Boot - Boot section.
  • πŸ“ System - System files.
  • πŸ“ Data – user data (messages, applications).
  • πŸ“ EFS β€” modem (IMEI, networking).

Save the backup on SD-This will save the device if the firmware fails or if it fails.

2. Magisk installation for root rights (optional)

If you need root rights, download the latest version of Magisk from GitHub and click on it. ZIP-file through recovery:

  1. Download. Magisk-v26.4.zip (version may differ).
  2. In Recovery, select Install β†’ Select a file β†’ Magisk-v26.4.zip.
  3. After installation, restart.

Attention: on devices with MIUI 14 and later Magisk may not work due to changes in the dm-verity mechanism. In this case, use the MagiskDelta module or alternative rooting methods.

3. System integrity check

After all the manipulations, make sure that:

  • πŸ“Ά Mobile network and Wi-Fi are working (check out) IMEI in *#06#).
  • πŸ”‹ Charging and sensors (gyroscope, accelerometer) are functioning.
  • πŸ”’ No errors in Logcat (can be checked through the MatLog app).

Compatible with different Xiaomi models

The Recovery installation process may vary depending on the model and year of release, and the following are features for popular lines:

ModelFeatures of installationRecommended Recovery
Redmi Note 12 Pro+Requires bootloader unlock via Mi Unlock with account binding. Supports Fastboot and EDL regimes.OrangeFox (Best Support) MIUI 14)
POCO F5Anti-rollback 5 versions block old Recovery. Use tagged builds ARB 5.TWRP (Official assemblies on twrp.me)
Xiaomi 13 UltraDifficulty encrypting data. After the firmware Recovery may require formatting data.OrangeFox (built-in tools for working with the f2fs)
Redmi K60 ProSupports Dynamic Partition – requires special Recovery builds with support super.img.OrangeFox or TWRP dynamic-patched

For older models (e.g. Redmi Note 7 or POCO X3 NFC) It's a simpler process, you just unlock the bootloader and flash Recovery through Fastboot. New devices (2022 and later) may require you to do this:

  • πŸ”§ Use of the EDL Mode (requires an authorized Xiaomi account).
  • πŸ”„ Reverse to an older version MIUI before unlocking.
  • πŸ›‘οΈ Bypassing Anti-Rollback through patched firmware.

FAQ: Frequent questions about installing Recovery on Xiaomi

Can I install custom Recovery without unlocking the bootloader?
No, it's impossible.Bootloader on all Xiaomi devices is locked by default, and any attempts to flash Recovery without unlocking will result in the Fastboot: command not allowed error.The only exception is the use of exploits (like DirtyCOW), but they only work on very old models (until 2018).
What if the device does not turn on after Recovery firmware?
Chances are there was a compatibility error (wrong version of Recovery or conflict with Anti-Rollback).Try: Clutch Volume up + Power to log in to Recovery (if installed). Swipe stock firmware through Fastboot with Mi Flash Tool (select Clean All mode). If the device doesn't respond, use EDL Mode (requires authorization from Xiaomi).
How to upgrade custom Recovery to a new version?
Update is done in the same way as the original installation: Download the new.img file. Reboot to Fastboot and run it with the command fastboot flash recovery. new_recovery.img. Or update directly from Recovery (in) TWRP There is an option Install β†’ Install Image β†’ Important: Before upgrading, check that the new version is compatible with your model and version. MIUI.
Can stock recovery be brought back?
Yes, to do this, scrolle the original Recovery file from stock firmware. Download the official firmware for your model (for example, with Xiaomi Firmware Updater), extract the file from the archive. recovery.img Fastboot: Fastboot Flash Recovery recovery.img After that, bootloader unlock will remain, but Recovery will become standard.
Will Google Pay work after installing custom Recovery?
No, if you get root rights through Magisk. Google Pay and other banking apps block work on rooted devices due to security requirements (SafetyNet).However, there are workarounds: Use the MagiskHide Props Config module to mask root rights. Install alternative payment systems (such as Revolut or Samsung Pay, if supported). Temporarily disable root rights before using Google Pay.