Reflashing Xiaomi through Recovery: from Preparation to Installation

Reinstalling firmware on Xiaomi smartphones via recavators is a radical but effective way to bring the device back to work after crashes, viruses or failed updates. Unlike the standard update via Settings โ†’ About the phone, this method allows you to install both official and custom firmware (MIUI, Pixel Experience, LineageOS), bypassing system limitations. However, the process requires accuracy: an error in the process of selecting a file or reset can turn a smartphone into a โ€œbrickโ€.

In this article, we'll look at two scenarios: flashing through stock recaps (for official MIUI versions) and TWRP (for custom firmware), focusing on preparation, from unlocking the bootloader to checking file compatibility. If you've never worked with fastboot or ADB, don't worry: the manual is adapted for beginners, with explanations of each step.

1.Preparation: What to do before the firmware

Before you start reinstalling the firmware, make sure all the preconditions are met. Missing at least one item can lead to locking the device during the bootloader check stage or file incompatibility.

First, check your Xiaomi model. Go to Settings โ†’ About Phone โ†’ Model (like the Redmi Note 10 Pro or POCO X3 Pro). This information is critical: firmware for sweet (codenamed Redmi Note 10 Pro) will not work for vayu (POCO X3 Pro), even if the devices look similar. Code names can be specified on the Xiaomi Firmware Updater website.

  • ๐Ÿ”ง Unlock the bootloader (unless done before), without it, the stock recavator will not allow you to install the firmware, and TWRP It takes up to 7 days (due to Xiaomi policy).
  • ๐Ÿ“ฅ Download the correct firmware. Stock Recovery requires a.zip file marked recovery (e.g., recovery, miui_SWEETGlobal_V14.0.1.0.TKFMIXM_...). For TWRP Any custom firmware in.zip format is suitable.
  • ๐Ÿ”‹ Charge the phone at least 60%. interruption of the process due to battery discharge can damage system partitions.
  • ๐Ÿ’พ Back up. Use Mi Cloud, Google Drive, or ADB backup to save contacts, photos and apps. Data recovery after reset will be impossible.

โš ๏ธ Note: If your device was purchased in China (China version) ROM), global-stamp MIUI You will need to unlock regional restrictions via fastboot, otherwise, after installation, the phone may lose communication with networks.

๐Ÿ“Š What type of firmware do you plan to install?
Official MIUI (stock)
The Pixel Experience (LineageOS)
I don't know, I need help.
I tried it, but there were mistakes.

2 Unlocking the bootloader: a mandatory step

The bootloader on all Xiaomi smartphones is locked by default, a security measure that prevents uncertified software from being installed.

  1. Link your Mi Account to your device (in Settings โ†’ Xiaomi Account).
  2. Enable Developer Options (7 times click on the MIUI version in About Phone).
  3. Activate OEM Unlock and USB Debugging in the Developer Menu.
  4. Connect the phone to the PC and run the Mi Unlock Tool utility (download from the official website).

The unlocking process can take up to 168 hours (7 days) โ€” Xiaomiโ€™s restriction for new accounts.If youโ€™re trying to unlock a bootloader on a device with an account tied over 30 days, the wait is reduced to 72 hours.

โš ๏ธ Note: Do not use unofficial unlock tools (e.g., unblocking tools, EDL This can result in a hardware lock that can only be removed at a service center.

โ˜‘๏ธ Preparation for unlocking the loader

Done: 0 / 5

3. firmware selection: official MIUI vs custom builds

So the type of firmware that you use depends not only on the functionality of the device, but also on the way you install it.

CriteriaOfficial MIUI (stack)Custom firmware (TWRP)
Installation throughStock or TWRP recoveryOnly TWRP.
Requires unlocking of the loaderYes (for manual installation)Yes (required)
UpdatesThrough Settings โ†’ Update of the SoftwareManual (through recovery)
Support for Google ServicesYes (in global versions)Yes (in most assemblies)
Risk of "bricking"Low (with the right file selection)Medium (depending on assembly)

For beginners, we recommend starting with the official firmware. It is stable, it is tested by Xiaomi and contains all the necessary drivers. Custom firmware (for example, Pixel Experience) gives more freedom (pure Android, no advertising in MIUI), but can have bugs with the camera, sensors or mobile communication.

Download the firmware only from verified sources:

  • ๐ŸŒ Officially: MIUI Downloads (select the Recovery version) ROM).
  • ๐Ÿ› ๏ธ Castomy: XDA Developers (Search for themes for your model).
  • ๐Ÿ”„ Alternative: Xiaomi Firmware Updater (automatically detects current versions).
What is โ€œanti-rollbackโ€ in Xiaomi firmware?
Anti-rollback is a security mechanism that prevents you from installing firmware older than a particular version, for example, if your device is running on a computer. MIUI 14, and you'll try to set it up. MIUI 13, the system will block the boot. EDL-mode (risky) or waiting for an official update.

4. Installation of firmware through stock Recovery

Stock Recovery is Xiaomiโ€™s built-in tool for installing official updates, it does not support touch control (volume and power button management) and has limited functionality, and is only suitable for MIUI firmware in.zip format marked recovery.

Step-by-step:

  1. Rename the downloaded firmware file to update.zip and place it in the root of the phoneโ€™s internal memory (not in folders!).
  2. Turn off the device. Press the Power button + Volume up to enter the Recovery.
  3. With volume buttons, select the language (if available), then Install update.zip to System.
  4. Confirm the installation and wait until the completion (usually 5-10 minutes).
  5. After the reboot, reset the data to Settings โ†’ Additional โ†’ Restore and reset.

โš ๏ธ Note: If after installation the phone is stuck on startup the logo MI longer than 15 minutes, which means the firmware is incompatible with your model. Try repeating the process with another file or installing it via fastboot.

๐Ÿ’ก

If the stock recap does not see the file update.zip, Check its integrity (unpack the archive and compare the hash amount with the original on the site) MIUI). Also try to format the memory card in the FAT32 before copying.

5. Installation via TWRP: for custom firmware

TWRP (Team Win Recovery Project) is a custom touch-controlled recovery that allows you to install any.zip firmware, make backups, and modify system partitions, and you need to install it after unlocking the bootloader.

The process of installing firmware through TWRP:

  1. Download the current version of TWRP for your model from the official website (.img file).
  2. Install. TWRP Fastboot: Fastboot Flash Recovery twrp-3.7.0_9-0-sweet.img fastboot reboot recovery
  3. In TWRP, select Wipe โ†’ Advanced Wipe and mark Dalvik, Cache, System, Data (full reset!).
  4. Press Install, select a firmware file and confirm the installation.
  5. After completion, install GApps (if the firmware is without Google services) and Magisk (for root rights).

The first run after installing custom firmware can take up to 20 minutes.

๐Ÿ’ก

Installing custom firmware via TWRP requires formatting the Data partition, and skipping this step will result in a cyclic bootloop.

Typical errors and their solutions

Even with strict adherence to the instructions, problems can arise, and here are the most common mistakes and ways to correct them:

  • ๐Ÿšซ "Cannot load Android system" - damaged partition system. Solution: Repeat installing firmware through fastboot with a full reset.
  • ๐Ÿ”„ Hanging on the logo MI โ€” Incompatible firmware or rollback solution: check the version MIUI and download a newer build.
  • ๐Ÿ”Œ 7-in error TWRP โ€” Solution: download the correct version (check the code name of the device!).
  • ๐Ÿ“ต No network after firmware, no modem files. Solution: Set up separately firmware.zip for your model.

If the device does not turn on at all (black screen, no button response), try to log in to fastboot (clamp Power). + Volume down) and flash the stock firmware through the Mi Flash Tool. EDL-mode, but you need an authorized Xiaomi account (or contact the service).

How to enter EDL-Xiaomi?
EDL (Emergency Download Mode) is an emergency mode for firmware through Qualcomm tools. To enter it, you need to close the test points on the motherboard (location depends on the model) or use the ADB command: adb reboot edl. Be careful: wrong actions in EDL can permanently disable the device!

7. Data recovery after firmware

Re-installation of firmware through the Recovery is always accompanied by a factory reset, but some of the information can be recovered:

  • ๐Ÿ“ฑ Contacts and messages: If you have backup enabled in Mi Cloud or Google, the data is synced automatically after you log in to your account.
  • ๐Ÿ“ท Photo and video: Check the folder DCIM It can also be used on a memory card (if it is not formatted) and can be used to restore software such as DiskDigger or Recuva (plug your phone into your PC in mode). MTP).
  • ๐ŸŽฎ Game saves: many games (e.g. Genshin Impact or PUBG Mobile) Linking progress to your account Google/Facebook. Log in again.

If you were backing up through TWRP (Backup โ†’ System, Data, Boot), you can restore it after installing the firmware.

  1. Copy the TWRP/BACKUPS folder to your phone.
  2. Log in to TWRP, select Restore and point the path to the backup.
  3. Mark the partitions for recovery (usually Data and System).

โš ๏ธ Attention: Restore the Data backup to the new version MIUI If the phone is unstable after recovery, repeat the reset.

FAQ: Frequent questions about Xiaomi flashing

Can I use Xiaomi without unlocking the bootloader?
No, stock recavers only allow you to install official updates via update.zip, but even then the bootloader must be unlocked for manual firmware. Except for updates through Settings โ†’ Software Update, but they will not help in case of serious failures.
How do I know if my Xiaomi bootloader is unlocked?
Turn off the phone and log in to fastboot (clamp power). + Loudness down. If you have Unlocked at the bottom of the screen or an open lock icon, the bootloader is unlocked. If Locked, you'll need to unlock it.
What if IMEI disappeared after the firmware?
This is due to damage to the modem partition. Solution: Download the stock firmware for your model (firmware.zip file). Install it via TWRP or fastboot. If the IMEI is not restored, use the QCN Rebuilder tool (requires a backup of the original IMEI). Note: IMEI recovery through the engineering menu (#4636#) on new Xiaomi devices does not work.
Can I roll back the firmware to an older version?
Technically, yes, but only if the new firmware does not contain a rollback. For example, if you upgraded from MIUI 13 to MIUI 14, you can't go back - the system will block the download. Check the rollback list for your model on Xiaomi Firmware Updater.
Which firmware to choose for maximum productivity?
It depends on the goals: Stability: official MIUI Global (minimal bugs, full camera and sensor support). Performance: custom firmware based on Android 13/14 (e.g. Pixel Experience or ArrowOS). They are devoid of unnecessary MIUI services and work faster. Games: firmware with the Perseus kernel or StagOS (optimized for Genshin Impact, Call of Dutymark Mobile). For tests, use AnTuTu Bench or Geekbench, but remember: custom firmware can have problems with the L1 Widevine (net HDV).