Recovery is a process that requires careful and understanding of each step. This method is relevant when a standard update through Settings โ About Phone โ System Update is not available: for example, when you switch to custom firmware, roll back to an old version of MIUI or recover from a crash. However, not all users know that an incorrectly selected firmware file or an interrupted process can turn a device into a brick.
In this article, we will analyze two scenarios: installation through stock recavery (Mi Recovery) and custom (TWRP), We'll also tell you how to prepare your smartphone, where to download official and unofficial firmware, and what to do if something goes wrong. TWRP Unable to use most Xiaomi models after 2017.
Preparation of the device: what to do before the firmware
Before you start installing firmware, you need to follow a few critical steps, and neglecting them can lead to data loss, locking the device or even breaking it.
First, back up all your important data. Firmware through the backups will often cause you to reset your settings, and when you switch to custom firmware (like LineageOS or Pixel Experience), you may need to clean up the /data partition completely. Use Mi Cloud, Google Drive, or local copy on your PC.
- ๐ฑ Contacts (export in.vcf format)
- ๐ธ Photos and videos (check folders) DCIM and Pictures)
- ๐ Local notes and SMS (apps SMS Backup & Restore)
- ๐ฎ Game savers (use Helium or manual backup)
Second, check the device model and the current firmware version. This can be done in Settings โ About Phone โ MIUI version or through the fastboot getvar product command (if the bootloader is unlocked). Installing firmware that is not designed for your model (for example, Redmi Note 10 Pro instead of Redmi Note 10) will cause the device to fail.
Unlocking the bootloader: a mandatory step for TWRP
If you plan to use TWRP (Team Win Recovery Project) to install custom firmware, unlocking the bootloader is an inevitable step. Xiaomi locks the bootloader on all devices released after 2017 to prevent unauthorized system changes.The unlocking process takes 7 to 30 days (depending on Xiaomi policy) and requires:
- ๐ฑ Linked Mi Account to the device
- ๐ Internet connection (necessarily via SIM-map)
- ๐ป Mi Unlock Tool (download from the official website)
- ๐ง Switched on. OEM Unlock in the Developer Settings
Instructions for unlocking:
- Activate Developer Mode by pressing the MIUI version 7 times in the settings.
- Enable OEM Unlock and USB Debugging in Settings โ Additional โ For Developers.
- Connect your phone to your PC, launch the Mi Unlock Tool and follow the instructions.
- Wait for SMS or unblock notifications (can take up to 720 hours).
โ ๏ธ Attention: Unlocking the bootloader resets the device to factory settings, and Xiaomi can block the account if it detects suspicious activity (for example, frequent unlocking of different devices).
What happens if you flash a phone with a locked bootloader?
Firmware selection: official MIUI vs custom builds
The type of firmware that determines not only the functionality of the device, but also the method of installation.
| Type of firmware | Advantages | Deficiencies | Is TWRP required? |
|---|---|---|---|
| Official MIUI (Fastboot) | Stability, support OTA-updates, warranty | Advertising, restrictions of regional versions | No. |
| Official MIUI (Recovery) | Quick installation, data retention (sometimes) | Not all versions are available in.zip format. | Yes (stock or TWRP) |
| LineageOS (Pixel Experience) | Pure Android, no Bloatware, advanced settings | No guarantee, possible bugs with camera or sensors | Yes (required) |
| Ported MIUI (EU, xiaomi.eu) | Advertising-free, multilingual, weekly updates | There may be problems with banking applications (due to lack of certification) | Yes. |
For beginners, we recommend starting with official firmware in.zip for recovery.
- ๐ On the official Xiaomi website (select a version for your model and region).
- ๐ Forums 4PDA or XDA Developers (Look for themes with a tagline "[ROM][OFFICIAL]").
Castom firmware should only be installed if you understand the risks.
- ๐ฑ xiaomi.eu (MIUI Advertising-free for European users).
- ๐ค LineageOS (Pure Android).
- ๐ฒ Pixel Experience (like the Google Pixel interface).
๐ก
Before downloading the firmware, check its hash amount (MD5 or SHA-1) using the HashMyFiles utility or online services.
Installation of firmware through stock recavery (Mi Recovery)
Xiaomi stock reavers allow you to install only official firmware in.zip format. This method is suitable for rollback to the previous version of MIUI or recovery after a software failure. Important: stock reavers do not support the installation of custom firmware or modified cores.
Step-by-step:
- Download the firmware in.zip format (for example, miui_BLOCKOTA_V12.5.1.0.RJBCNXM_20210913.0000.00_11.0_cn.zip) and rename it in update.zip.
- Move the file to the root folder of the phoneโs internal memory (not to folders!).
- Turn off the device and press the Volume Up + Power combination to enter Mi Recovery.
- Choose a language (usually English or Chinese).
- Go to Install update.zip to System and confirm the installation.
- After you complete the process, select Reboot to System.
โ ๏ธ Note: If E:footer is wrong occurs during installation, it means that the firmware file is corrupted or not intended for your model.
Download the official firmware in.zip format
Rename the file to update.zip
Charge your phone at least 50%
Disable protection with a pattern lock / password (optional)-->
Install firmware through TWRP: a step-by-step guide
TWRP (Team Win Recovery Project) is a custom recovery that offers enhanced capabilities over stock, which allows you to install any firmware, backup, mount partitions, and even restore data, but you must unlock the bootloader to use it.
Instructions for installing firmware through TWRP:
- Download the current version of TWRP for your model from an official website or trusted sources (e.g. 4PDA).
- Install. TWRP Fastboot: Fastboot Flash Recovery twrp-3.6.2_11-0-sweet.img fastboot reboot recovery
- In TWRP, make a full backup of the current system (Boot, System, Data sections).
- Go to Wipe โ Advanced Wipe and mark Dalvik/ART Cache, System, Data, Cache. Confirm the cleanup (this will delete all data!).
- Press Install, select a firmware file (.zip) and confirm the installation.
- After completion, install Magisk (if root is required) or Disable_Dm-Verity_ForceEncrypt (bypass encryption on some firmware).
- Reset the device.
The first download after the firmware can take up to 10-15 minutes. If the screen has been getting stuck on the Xiaomi logo for longer than 20 minutes, then something has gone wrong (maybe the firmware is incompatible with your model or Data is not reset).
๐ก
Installation via TWRP always requires a complete cleanup of the Data partition if the transition is between different types of firmware (for example, from MIUI to LineageOS), ignoring this step will lead to endless restarts (bootloop).
Solving common errors in firmware
Even with the correct following of the instructions, errors can occur, and let's consider the most common of them and how to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Error 7 in TWRP | The firmware is not designed for your model or Android version. | Check the compatibility of the firmware file with your device |
| E: unknown command [log] | Damaged update.zip file or lack of space | Check it out. MD5-file sum and free up memory |
| Hanging on the Xiaomi logo | Firmware incompatibility or uncleaned Data | Return to TWRP, run Wipe โ Format Data and reinstall the firmware |
| Anti-Rollback Protection | Reverse to the old version of MIUI | Install firmware no older than the current one or use XiaomiTool V2 to bypass |
If the device does not turn on after a failed firmware:
- Try going to fastboot (click Volume Down + Power).
- Flash the device through the Mi Flash Tool (requires.tgz firmware for fastboot).
- If the phone doesnโt respond to the buttons, plug it into charging for 30 minutes โ sometimes โresuscitationโ of the battery helps.
What happens if TWRP is not installed?
Additional advice and recommendations
Firmware through the Recovery is a process that can be simplified if you know a few nuances:
- ๐ Always charge your phone at least 60-70% before running your firmware.Discharge during the process can damage system files.
- ๐ Use the original. USB-cable USB 2.0 on PC (ports) USB 3.0 sometimes causes errors in fastboot data transfer).
- ๐ก๏ธ After custom firmware is installed, some banking applications (such as SberBank Online) may stop working due to lack of SafetyNet certification.
- ๐ก If after firmware lost mobile network, check the settings APN Or re-flash the modem (vendor and firmware sections).
For power users: If you experiment with firmware frequently, consider installing OrangeFox Recovery, a TWRP alternative with a more user-friendly interface and support for themes.