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

Installing custom Recovery on Xiaomi smartphones is the first step to full control of the device, which allows you to flash informal firmware, backup the system (nandroid backup), remove the bloatware and even restore the β€œbricks” after unsuccessful experiments.

Unlike most brands, Xiaomi officially allows you to unlock the bootloader, but with restrictions. For example, new models (released after 2022) require a wait of up to 7 days after the Mi Account is attached. In this article, we will analyze all the steps from preparation to installation of TWRP or OrangeFox Recovery, and also consider typical errors and their solutions.

Why install custom Recovery on Xiaomi?

The standard Mi Recovery, pre-installed on all Xiaomi smartphones, has strict restrictions, allowing you to only reset your settings, flash the official firmware through update.zip or clear your cache. Custom solutions like TWRP or OrangeFox offer much more options:

  • πŸ”§ Installation of unofficial firmware (LineageOS, Pixel Experience, HavocOS)
  • πŸ“¦ Creating full backups of the system (including: /data and /boot)
  • πŸ—‘οΈ Removing system applications without root rights
  • πŸ”„ Recovery from soft brick (when the device does not boot, but Reactivation Lock is not activated)
  • πŸ” Bypassing certain types of locks (e.g, FRP old-model)

However, there are risks, such as Reactivation Lock models (on default on Redmi Note 11/12, POCO F4/F5), incorrect firmware can lock the device permanently, and custom Recovery resets the Anti-Rollback counter, making it impossible to return to older versions of MIUI.

πŸ“Š What kind of firmware do you plan to install after Recovery?
Official MIUI
LineageOS
Pixel Experience
HavocOS
Another.

Preparation of the device: unlocking the loader

Without an unlocked bootloader, custom Recovery cannot be installed. Xiaomi requires you to follow several mandatory steps:

  1. Linking your Mi Account to your device: Go to Settings β†’ Xiaomi Account β†’ Mi Cloud and log in. Make sure the device appears in the list of associated gadgets on account.xiaomi.com.

You can then use the official Mi Unlock Tool, download it from en.miui.com/unlock (registration required). Importantly, new devices must wait 7 days (168 hours) after the account is attached. Old models (until 2020) will be unlocked immediately.

A tied Mi Account|Developer mode is on|Debugging activated USB|Download Mi Unlock Tool|Battery charge > 50%-->

⚠️ Attention: If you are using POCO F5 Or the Redmi Note 12 Pro.+, Reactivation Lock will work after unlocking the bootloader. To avoid blocking, disable this setting in Settings before unlocking. β†’ Password and security β†’ Reactivation Lock.

Recovery pick: TWRP vs OrangeFox

The two most popular custom Recovery games for Xiaomi are TWRP (TeamWin Recovery Project) and OrangeFox.

CriteriaTWRPOrangeFox
Support for modelsWide list, but some new devices are not coveredMore relevant builds for fresh models
Interface.Classic, minimalistColored themes, gesture support
FunctionsBasic: backup, firmware, cleaningAdvanced: Built-in file manager, Magisk support, encryption
StabilityMore tested, fewer bugsQuickly updated, but possible glitches on new devices
Support A/B-sectionPartial (requires manual slot selection)Full (automatic definition of an active slot)

For most users, OrangeFox is preferred due to its modern interface and support for new features. However, if your Xiaomi model is officially supported by TWRP (check on twrp.me), it is better to choose it - it is more stable.

πŸ’‘

Before downloading Recovery, check its compatibility with your exact model and MIUI version. For example, the firmware for the Redmi Note 10 Pro (sweet) will not work for the Redmi Note 10 Pro 5G (chopin).

Step-by-step installation of Recovery via Fastboot

The most reliable way to install it is through Fastboot mode.

  • πŸ–₯️ Computer with Windows/Linux/macOS
  • πŸ”Œ Cable USB (preferably original)
  • πŸ“± Unlocked loader
  • πŸ“‚ Recovery file in.img format
  • πŸ› οΈ Quickboot and Adb (part of Android) SDK Platform-Tools)

Instructions:

  1. Connect your phone to your PC in Fastboot mode: Turn off the device. Press Volume down + Power before the Fastboot logo appears.
  2. Check Connection: In the terminal (or command line) run: fastboot devices If the device is displayed (e.g., 1234abcd fastboot), you can continue.
  3. Recovery: Place the file recovery.img Tools and Fastboot Flash Recovery recovery.img For devices with A/B-sections (e.g, POCO F3, Xiaomi 11T) Use: Fastboot Flash recovery_ramdisk recovery.img
  4. Reboot to Recovery: Perform: fastboot reboot recovery If you see a standard Mi Recovery after the reboot, then the firmware did not apply. In this case, repeat step 3, and then manually reboot to Recovery via Volume Up + Power.
What if fastboot doesn’t see the device?
Make sure that the Mi drivers are installed. USB Driver (downloadable on official website) Also try: Change USB-port (better to use) USB 2.0) Disable driver signatures in Windows (reboot with Shift pressed and select Disable Mandatory Driver Signature Verification) Use another cable (some cheap cables don’t support data transfers)

⚠️ Note: On devices with dynamic partitions (e.g. Xiaomi) 12/13 The standard Recovery firmware via fastboot flash recovery will not work. boot.img using Magisk or using special scripts like XiaomiTool V2.

Install Recovery without PC (via ADB Sideload)

If you don't have access to your computer, you can flash Recovery through ADB Sideload directly from your smartphone, which only works if you already have custom Recovery installed (for example, temporary via fastboot boot).

Instructions:

  1. Download the Recovery file (.img) to your phone.
  2. Reboot to the current Recovery (e.g., via Volume Up + Power).
  3. Select Advanced β†’ ADB Sideload.
  4. Connect your phone to your PC and do: adb sideload recovery.img
  5. Once completed, reboot to Recovery.

If you don't have a PC at all, you can use Android terminal applications like Termux, but this method is more complicated and requires manual partitioning.

πŸ’‘

ADB Sideload is only suitable for upgrading the already installed Recovery. Fastboot is a must for the first installation!

Typical errors and their solutions

Even with the exact following of the instructions, there can be problems.

  • πŸ”΄ Invalid sparse file format at header magic error: Cause: corrupted file recovery.img. Solution: Download the image again, preferably from an official source (e.g. OrangeFox or the other). TWRP).
  • πŸ”΄ The device is loaded into Mi Recovery instead of TWRP: Reason: New Xiaomi devices use the Anti-Rollback mechanism, which resets Recovery when booting.Solution: Once you have firmware, immediately reboot to Recovery via fastboot reboot recovery, preventing the system from booting up.
  • πŸ”΄ Fastboot: Reason: Failed to process command error error: Failed to process command error: Failure to fastboot version or drivers. Solution: Update Platform-Tools to the latest version and reinstall drivers.
  • πŸ”΄ Touch doesn't work. TWRP: Reason: Recovery builds incorrectly for your model.Solution: Find an alternative build (e.g., Redmi Note 10 Pro has separate versions for sweet and sweetin).

If after installing Recovery, the device stopped booting (black screen or logo hover), try:

  1. Reflash boot.img from the official firmware via Fastboot.
  2. Run fastboot erase userdata (Erase all data!).
  3. Use the Mi Flash Tool for full flashing.

What to do after installing Recovery?

Successful custom Recovery installation is only half the battle, and to avoid future problems, follow these steps:

  1. Build a full backup: In Recovery, select Backup and mark all partitions (Boot, System, Data, Vendor). SD-card.
  2. Install Magisk for root rights: Download the latest version of Magisk (.zip) and run through Install β†’ Select Storage.
  3. Disable Forced Encryption (optional): On some devices (POCO X3, Redmi Note 9) Recovery may not see internal memory due to encryption.Solution: squeak through disable_forceencrypt.zip (You'll find it on the forum. XDA).
  4. Check Reactivation Lock: On Reactivation Lock models (such as Xiaomi 12T) you may need to enter a Mi Account password when you reset after installing Recovery. To avoid blocking, disable this setting in the settings before installing Recovery.

If you plan to flash custom firmware, make sure it is compatible with your version of Anti-Rollback. For example, on the Redmi Note 8 Pro (begonia), you can not install firmware older than the ARB 3, otherwise the device will turn into a β€œbrick”.

FAQ: Frequent questions about installing Recovery on Xiaomi

Can I install Recovery without unlocking the bootloader?
No. Xiaomi blocks entry to the recovery section at the bootloader level. The only exception is a temporary boot boot recovery.img, but after the reboot, the changes will reset.
Why does the TWRP phone not boot after installation?
Probable reasons: Incompatible version of Recovery (for example, for another modification of the device); damaged boot.img (you need to flash the original from the official firmware); Reactivation Lock activated (requires you to enter a password from Mi Account); Solution: run the full official firmware through the Mi Flash Tool in clean all mode.
How do I know if my Xiaomi bootloader is unlocked?
Turn off your phone and press Volume Down + Power. If you see UNLOCKED at the bottom of the screen, the bootloader is unlocked. If LOCKED, you need to unlock.
Can I get back the standard Mi Recovery?
Download the official firmware for your model from Xiaomi, extract the recovery.img file from it and run it through Fastboot: fastboot flash recovery.img
Will Google Pay work after installing Recovery and Magisk?
Not if you get root rights.Google Pay and banking apps (like SberBank Online) block work on devices with unlocked bootloader or root rights.Solution: use Magisk modules to hide the root (like MagiskHide Props Config) or Universal SafetyNet Fix.