How to return stock recovery to Xiaomi: from unlock to firmware

Restoring stock Recovery on Xiaomi smartphones is a challenge that users face after experimenting with custom firmware, root rights or failed updates. Original recovery is necessary for proper operation OTA-But the process of returning it is often complicated, from locking the bootloader to bugging through the Mi Flash Tool.

In this article, we will discuss three official ways to install stock Recovery – through Fastboot, ADB We will also discuss how to avoid common errors such as anti-rollback or β€œsub-northern firmware” and the nuances of the blocked bootloader models (Redmi Note 10 Pro, POCO X3 Pro, Mi 11 and later), where additional unlocking is required via the Mi Unlock Tool.

Why Stock Recavators Are More Important Than They Think

Many users mistakenly believe that custom Recovery (such as TWRP) completely replace the original, and in practice, Xiaomi stock Recovery perform critical functions:

  • πŸ”„ OTA-Without the original recovery smartphone will not be able to install updates β€œover the air” – the system will issue an error E1001 Update process ended with ERROR.
  • 🏭 Warranty reset: Xiaomi service centers check firmware integrity.Kastom recovery can cause denial of warranty.
  • πŸ”’ Anti-Rollback Protection: On models with ARB 3/4 (For example, Redmi Note 9 Pro, POCO F3) installation of an inappropriate version of the recavery will lead to a "brick" (complete inoperability) of the device.
  • πŸ“± Functions MIUI: Some tools like Mi Assistant or Find Device require original software to work properly.

Moreover, stock recavators contain unique drivers for hardware modules (such as NFC in the Mi 10T or cameras in the Redmi K40) that may not work properly with alternative firmware, especially for devices running Qualcomm Snapdragon 8xx chips, where the manufacturer integrates proprietary libraries directly into the recovery section.

⚠️ Note: On HyperOS devices (starting with Xiaomi 14 and Redmi) K70) Stock recavator checks the firmware's digital signature, and installing modified software can lead to blocking. EDL-regime.

Preparation: What to do before the firmware

Before you start installing, make sure that all the preliminary steps are followed, and neglect of preparation is the main cause of errors such as fastboot: error: Command failed or "back-signature".

Download the official firmware for your model from [miui.com](https://new.c.mi.com/global/miuidownload/index)

Install Qualcomm HS-USB QDLoader 9008 drivers (for EDL mode)

Unlock the bootloader through the Mi Unlock Tool (if it is blocked)

Charge your phone at least 60% (to avoid shutting down during firmware)

Disable Mi Account and Find Device in Security Settings-->

Pay special attention to the choice of firmware. For installation of stock recavers only official build from Xiaomi site is suitable. Versions from forums (for example, XDA Developers) can contain modified partitions, which will lead to conflicts. Download files with the extension.tgz or.zip, avoiding "port" firmware (the name has the words port, unofficial, custom).

For models with MediaTek (e.g. Redmi 9A, POCO M3), you will additionally need:

  • πŸ”§ Utility. SP Flash Tool instead of Mi Flash.
  • πŸ“„ scatter.txt file from firmware archive (determines partition structure).
  • πŸ”Œ Disable Driver Signature Enforcement in Windows (for MediaTek drivers to work correctly).

Redmi (Series Note, K, Number)

POCO (F, X, M)

Mi (11, 12, 13, etc.)

Black Shark

Another model-->

The Fastboot method is the most reliable and versatile, and it works for most models, including the Redmi Note 11, POCO X4 Pro, and Mi 12 Lite, with the main advantage of being able to selectively run only the recovery partition without affecting user data.

Steps:

  1. Unpack the downloaded firmware (for example, courbet_global_images_V13.0.6.0.SKOMIXM_20221010.0000.00_12.0_global_10d5a04a0d.tgz) and find the file. recovery.img picture-folder.
  2. Turn your phone into Fastboot mode: Turn off the device, then press Power + Volume Down.
  3. Connect your smartphone to your PC and check the connection with the command: fastboot devices In response, the serial number of the device should be displayed.
  4. Fastboot flash recovery recovery recovery.img
  5. Restart the device to the recavator to check: fastboot boot recovery.img

If you see the MIUI logo and menu in Chinese/English after the reboot, the recovery is installed successfully. For models with HyperOS (e.g. Xiaomi 13T), follow the command:

fastboot flash recovery2 recovery.img

This is due to the duplication of the recovery section in new firmware.

⚠️ Note: On Dynamic Partition devices (all Android models) 10+) merely recovery.img Invalid sparse file format at header can cause an error, in which case use the full firmware via Mi Flash. 2). πŸ’‘If the fastboot flash recovery command is an error FAILED (remote: 'Not allowed in Lock State', which means the bootloader is locked. Unlock it through the Mi Unlock Tool (requires a tied Mi Account and waiting). 72–168 Method. 2: Mi Flash Tool is the official utility from Xiaomi, which allows you to flash the full image of the firmware, including Recovery. This method is suitable for devices with a locked bootloader, but requires a complete data reset (internal memory will be formatted). 20200314). Unpack the firmware in a folder without Cyrillic characters (for example, C:\MiFlash\rom). Run Mi Flash, press Select and point the path to the firmware folder. Connect your phone in Fastboot mode (as in the method). 1). Select the firmware method: Clean all - full reset (recommended). Clean all and lock - reset + Lock the bootloader (only if you plan to sell the phone); Save user data - does not work to restore the recaveri (leaves traces of custom software); Press Flash and wait until it is completed (usually). 5–10 Error Cause Decision Can't find script file No file flash_all.sh Download the firmware again or unpack the archive again Anti-rollback check fail Try to flash the old version MIUI Use firmware with a version not lower than the current Device is locked bootloader is locked Unlock via Mi Unlock Tool (see below. method 1) Invalid image format Damaged file recovery.img Check the checksum (MD5) After successful firmware, the phone will automatically restart. 15 It's okay if the device is stuck on the logo. MI longer 20 For a few minutes, perform a forced reboot (Power). + Volume Up on the 10 seconds). πŸ’‘Use the Mi Flash Tool only for official firmware. Trying to flash custom software through this utility will lead to a device "brick" due to signature verification boot.img and recovery.img. Method 3: Recovery through ADB (for experienced users) The method through ADB This is good if you have a scalp (for example, TWRP), But you want to return the stock without completely flashing it, and the main advantage is that you save user data, but it requires root rights, and it doesn't work on all models. Algorithm of actions: Download the official firmware and extract recovery.img. Connect your phone to your PC and enable debugging. USB (Settings β†’ The phone. β†’ Version. MIUI β†’ 7 press β†’ Additionally. β†’ Open the terminal and check the connection: adb devices Copy recovery.img on the device: adb push recovery.img /sdcard/ Reboot to the custom reboot recovery. TWRP Choose Install β†’ Install Image, show the way to recovery.img Reboot to stock Recovery: adb reboot recovery If you reboot after you get back into the reboot TWRP, So the stock Recovery didn't stand up. That's typical of Dynamic Partition devices: πŸ”§ Please. recovery.img via Fastboot (method) 1). πŸ“΅ Turn off signature verification in TWRP (Settings β†’ Disable signature verification). πŸ”„ Repeat steps. 6–7, Preliminary Recovery Section in TWRP. ⚠️ Note: On HyperOS devices (e.g. Xiaomi) 14 Pro) attempt to flash recovery.img through TWRP This can lead to anti-Rollback. 5 And lock the bootloader, and you'll need to run the firmware through the bootloader. EDL (Even when you follow the instructions, users encounter errors. Consider the most common ones and how to fix them. What if the phone doesn't turn on after you've run the firmware? If the device doesn't respond to the buttons and it doesn't charge, it could be a soft breeze: 1. Hold the Power. + Volume Up + Volume Down on the 30 seconds (forced rebuttal). 2. Connect to charging on 1 Sometimes it helps to restore food. 3. Squeeze through EDL (You need an authorized Xiaomi account and a Deep Flash cable). If the screen is on but there's no image, the firmware is not correct. Repeat the process with another version of MIUI. Problem Probable cause Fastboot error: error: Command failed Incompatible version of fastboot or drivers Update Platform Tools to the latest version or use Mi Flash Device not defined in Fastboot No Android Bootloader Interface drivers Install drivers via Mi Flash Tool or manually through Device Manager After firmware left TWRP Incorrectly specified section when firmware Repeat firmware with the explicit section indication: fastboot flash recovery_a recovery.img (for devices A/B-Mi Flash: Critical partition flashing is not allowed bootloader is locked and Save user data mode is selected Unlock bootloader or select Clean all If you encounter an Anti-rollback error (e.g. anti-rollback check fail: 4), This means you are trying to flash the firmware with a lower version. ARB, more current. Solution: Check the current version ARB Fastboot: fastboot getvar anti Download firmware with higher or equal version ARB. If there is no suitable firmware, contact the service center - self-bypassing Anti-Rollback can lead to an irreversible breeze. It can be done in a number of ways: πŸ” Appearance: Stock Recovery Xiaomi has a minimalist interface with a logo MIUI There are no items like Install. ZIP or Mount, characteristic of TWRP. πŸ“‹ Firmware Log: Fastboot: Fastboot Getvar Product 2>&1 | grep -i Recovery should be provided in the response line: Yes. πŸ”§ Signature verification: Download the utility MIUI Version Checker from Google Play. The Recovery section must specify Official Checker. πŸ“‘ OTA-Test: Try to update the device through Settings β†’ System Update: If the update is downloaded and installed without errors, the backup is stock. For HyperOS devices, check the integrity of the partition. recovery2: fastboot getvar recovery2 If the team returns recovery2: On some models (for example, Xiaomi 13 Ultra) stock reavers can hide part of the menu - this is normal and is due to the security policy of Xiaomi. πŸ’‘If you've checked all the time OTA-Updates are still not installed, the reason may be a modified partition vendor or system, in which case you need full firmware through Mi Flash with the choice Clean all. FAQ: Frequent questions on the stock recavator on Xiaomi Can you return stock recavator without data loss? Yes, but only if the bootloader is unlocked and you use the method via Fastboot (method 1) or ADB (Firmware through Mi Flash always results in a data reset. On Dynamic Partition devices (all Android 10 models)+) Data retention is not guaranteed, there may be errors when you boot the system. Why does the phone not boot after you install the stock back? This is typical for devices with Anti-Rollback Protection, if you have firmware with a lower version. ARB. Solutions: Sweat firmware with a higher version ARB. Use Mi Flash with Clean All option. HyperOS models may require firmware through EDL (If the screen is black but the phone vibrates when you connect to a charger, try clamping the Power. + Volume Up for 20 seconds for forced reboot. How to find out the version ARB on my Xiaomi? The Anti-Rollback version can be checked in two ways: Fastboot: fastboot getvar anti will be a line like anti: 4 (where the number is ARB). Through the phone menu: Go to Settings β†’ The phone. β†’ Version. MIUI. Tap. 10 logo-wise MIUI, then enter the code ##4636##. Select Information about the Software - Version ARB It's listed in the Anti Rollback Version. ARB may be displayed as ARB 5 or ARB X (where X is version number). Can I flash stock recavers on Xiaomi with the bootloader locked? No, if the bootloader is locked, stitch separately recovery.img Not allowed in Lock State: Unlock the bootloader via Mi Unlock Tool (requires a tied Mi Account and wait until the end of the day) 7 Use Mi Flash with Clean All and Lock (but this will result in a complete reset). For new models (e.g. Xiaomi) 13) Authorization may be required through EDL (Note: unlocking the bootloader resets all data on the device. Which Xiaomi models don't support stock recapture? Technically, stock recap can be returned to any Xiaomi device, but there are nuances: Devices with HyperOS (Xiaomi) 14, Redmi K70 and newer: require firmware through Fastboot with both sections (recovery and re-covery) recovery2). Models with ARB 5 (POCO F5, Redmi Note 12): In case of incorrect firmware, they are blocked EDL-Devices for the Chinese market (with the C suffix in the model, for example, Mi) 11 Ultra C: may require Chinese firmware, otherwise the recaveri will not stand. All of these models are recommended to use Mi Flash with full firmware, rather than selective installation. recovery.img.