Recovery is one of the most reliable ways to update or restore a Xiaomi smartphone when standard methods donβt work, a method that is suitable for installing custom firmware (like LineageOS), rolling back to the factory version of MIUI, fixing βbricksβ after a failed update, or even removing viruses that are not removed by antiviruses, but the process requires care: an error at any stage can turn the phone into a βbrickβ.
In this article, we will discuss two firmware scenarios: through standard Mi Recovery (for official firmware) and through custom TWRP (for informal builds), focusing on preparation, from unlocking the bootloader to choosing the right firmware version, and you will find a table of firmware compatibility with Xiaomi, Redmi and POCO models, and at the end, answers to frequent questions that users have when they first independently flash.
1.Phone Preparation: Unlocking the bootloader and Backup
Before you open the firmware through Recovery, you need to do two critical steps: unlock the bootloader and back up the data. Without unlocking the bootloader, the phone simply won't let you install the firmware, the system will return the error E: Footers is wrong or E: Signature verification failed.
To unlock the bootloader on Xiaomi, use the official Mi Unlock Tool. The process takes up to 720 hours (30 days) of waiting if the Mi Account is not tied to the device in advance. Once unlocked, all data on the phone will be erased - this is inevitable. So transfer photos, contacts and other important files to your computer or cloud in advance.
- π bootloader unlock: Download Mi Unlock Tool from Xiaomi site, log in to Mi Account on phone and PC, connect the device in Fastboot mode (clamp Volume down) + Food) and follow the instructions of the program.
- π± Backup: Use the Mi PC Suite or manual file transfer. Titanium Backup is suitable for saving applications and their data (requires root).
- π Battery charge: Make sure the charge level is at least 60% interrupted due to battery discharge can cause irreversible system damage.
β οΈ Note: If you are flashing a phone with a carrier-linked connection (e.g. Redmi Note) 11T 5G From MTS, unlocking the bootloader can cancel the warranty and block the network.
2. firmware selection: official MIUI vs custom builds
The type of firmware not only determines the functionality of the phone, but also the method of installation. Official MIUI firmware can be installed through standard Mi Recovery, and custom (for example, LineageOS or ArrowOS) require TWRP.
Download the firmware only from verified sources:
- π Official firmware: Site en.miui.com/a/miui/download (Choose a version for your model by code, for example, raphael for Redmi. K20 Pro).
- π οΈ Castom firmware: Forum XDA Developers or sourceforge.net (look for themes marked) [ROM] for your model).
- π Integrity Check: After downloading compare the hash file (MD5 or SHA-1) It's on the site, and it protects against corrupted files.
| Type of firmware | Advantages | Deficiencies | Recovery required |
|---|---|---|---|
| Official MIUI (Stable) | Maximum stability, support OTA-Updates, all camera and sensor functions are working | Advertising in system applications, limited customization | Mi Recovery or TWRP |
| Official MIUI (Developers) | Early access to new features, less advertising | Possible bugs, frequent updates (weekly) | Mi Recovery or TWRP |
| LineageOS (Pixel Experience) | Clean Android without ads, long-term support for outdated models | NFC, wide-angle camera or gestures may not work | Only TWRP. |
For Xiaomi models with MediaTek processors (such as Redmi 9A or POCO M3), be sure to check firmware compatibility with the chipset version. Installing firmware for Snapdragon on MediaTek will result in hard brick (irreversible damage).
π‘
If you are flashing a phone from Global to China version of MIUI (or vice versa), after installation, you may need to reset via Fastboot with the fastboot erase userdata command to avoid hanging.
3. TWRP Installation: When you need custom Recovery
TWRP (Team Win Recovery Project) is a touch-controlled alternative Recovery that allows you to install informal firmware, backup your system, and modify /system partitioning.
- π¦ Install custom firmware (LineageOS, Pixel Experience, etc.).
- π Make complete backups of the system (including boot and recovery).
- π§ Get root rights through Magisk.
To install TWRP:
- Download the image TWRP for your model from twrp.me (for example, twrp-3.7.0_9-0-raphael.img for Redmi K20 Pro).
- Reboot your phone to Fastboot mode (clamp Volume Down + Power).
- Connect to your PC and execute the command: fastboot flash recovery twrp-3.7.0_9-0-raphael.img
- Immediately after installation, restart in TWRP Team: fastboot boot twrp-3.7.0_9-0-raphael.img (This will prevent overwriting. TWRP Standard Recovery at the first boot).
β οΈ Note: Some Xiaomi models (e.g. Redmi Note 10 Pro) after installation TWRP You may need to disable the firmware signature check. TWRP Go to Mount. β Disable DM-Verity.
βοΈ Preparation for installation TWRP
4. Firmware through Mi Recovery: step-by-step instructions
The standard Mi Recovery is suitable for installing official MIUI firmware in.zip format. This method is safer because the system checks the digital signature of the file before installation. However, the functionality is limited: custom firmware or modified cores cannot be installed.
Instructions:
- Downloaded firmware (e.g, miui_RAPHAELGlobal_V12.5.3.0.RFKMIXM_11.0.zip) rename update.zip Put it in the root of the phoneβs internal memory.
- Turn off the phone and press Volume Up + Power to enter Mi Recovery.
- Select a language (if available), then go to Install update.zip to System.
- Confirm the installation and wait until it is completed (usually takes 5-10 minutes).
- After you complete the process, select Reboot to System.
If the process is interrupted with E: Can't install this package, check:
- π Compatibility of firmware with phone model (code name must match).
- π File integrity (download and check again) MD5).
- π Free space on your phone (requires at least 4 GB).
What if Mi Recovery doesnβt see update.zip?
5. Firmware through TWRP: installing custom firmware
TWRP provides more features, but also requires more care, and you can install not only official firmware, but also custom, as well as patches (Magisk for root, Disable Force Encryption for disabling encryption).
Step-by-step:
- Download firmware (e.g. lineage-19.1-20230610-nightly-raphael-signed.zip) and, if necessary, Gapps (Google services).
- Reboot your phone to TWRP (clamp Volume Up + Power after Shutdown).
- Make a full backup of the current system: click Backup and select the Boot, System, Data partitions.
- Run Wipe β Advanced Wipe and mark Dalvik, Cache, System, Data (donβt touch Internal Storage if the firmware is there!).
- Press Install, select a firmware file and confirm the installation.
- If you install Gapps, repeat the step. 5 packet-wise open_gapps-arm64-11.0-nano-20230610.zip.
- Reboot System: The first launch can take up to 15 minutes.
If the phone has been stuck on the Xiaomi or POCO logo for more than 20 minutes after the firmware was installed:
- π Reboot to TWRP Check the Logs (Install Log).
- π Try repeating the installation with the encryption turned off (Format Data) β type "yes").
- π If the firmware is custom, make sure it supports your bootloader version).
π‘
Always install firmware and Gapps in one session in TWRP. Rebooting between installations can lead to errors in the operation of Google services.
6. Common mistakes and their solutions
Even with the correct following of the instructions, errors can occur, and below are the most common problems and ways to correct them.
| Mistake. | Reason. | Decision |
|---|---|---|
| E: Footers is wrong | A damaged firmware file or incompatible version | Re-download the firmware, check MD5. For custom firmware, make sure it's compatible with the TWRP version. |
| E: Signature verification failed | Firmware not signed (castom) or bootloader blocked | Use TWRP and disable signature verification in Recovery settings. Unlock the bootloader for official firmware. |
| The phone does not turn on after firmware ("brick") | Incompatible firmware or interrupted process | Try flashing the official firmware through Fastboot using the Mi Flash Tool. If it doesn't work, contact the service. |
| Hanging on the Xiaomi logo | Module conflict or incorrect Wipe | Log in to TWRP, run Format Data (enter yes) and re-install firmware. |
If you encounter an error that is not described in the table, look at the installation logs in TWRP (Install Log) or Mi Recovery (View recovery logs), often with the specific file or partition that caused the problem.
7.What to do after firmware: setting up and checking
After successful firmware, several steps must be taken to ensure the stability of the system:
- π Version Check: Go to Settings β About the phone and make sure the version MIUI or the scaling of the scalings is the same as the.
- πΆ Communication test: Check mobile network, Wi-Fi and Bluetooth. Custom firmware may require manual adjustment APN.
- π Battery calibration: After firmware discharge the phone to 0% and charge to 100% without interruptions - this will help to reset the battery data.
- π Security: If you have installed Magisk for root, check SafetyNet status through the Magisk Manager app (banking applications may require root hiding).
For custom firmware (LineageOS, Pixel Experience) it is recommended:
- Install a GCam-enabled kernel (e.g., ANX Camera for better photography).
- Disable Force Encryption if it causes lags (via Disable Force Encryption in TWRP).
- Set up a CPU Governor for better performance (Kernel Adiutor or FrancoKernel applications).
β οΈ Note: Mi Account may not work on custom firmware, which means you wonβt be able to use the Mi Cloud or search for your device. XDA).