Smartphone firmware via Recovery is one of the most reliable ways to update or completely change the software on Xiaomi, Redmi or other devices. POCO. This method is suitable for installing official updates (if the standard is the same). OTA refuses to work), and for the installation of custom firmware like LineageOS, Pixel Experience or MIUI But the process requires care: a mistake at any stage can turn a phone into a brickΒ».
Unlike Fastboot, where commands are executed from a computer, Recovery installation takes place directly on the device itself, which makes it easier for beginners to do so, but imposes limitations: for example, you canβt flash anti-rollback versions (if theyβre newer than the current one), and some models require bootloader pre-unlocking. In this article, weβll take a look at the whole way from preparation to final setup, and how to avoid typical bugs and repair the phone if something goes wrong.
βββ
1. Device preparation: unlocking the bootloader and backup
Before you start firmware, you need to follow two critical steps: unlock the bootloader (if it is blocked) and create a full backup of data, TWRP) or unofficial firmware will be impossible, and without a backup you risk losing photos, contacts and settings.
To unlock the bootloader on Xiaomi will need:
- π Mi Account linked to the device (required to have a confirmed phone number).
- π» Computer with drivers installed ADB Fastboot (you can download from the site) XDA Developers).
- π± Developer mode enabled and permitted debugging USB (Settings β The phone. β Version. MIUI β tap 7 times).
- β³ Time: The unlocking process takes up to 720 hours (30 days) of waiting after the first account link.
After unlocking the loader, it is recommended to install TWRP Recovery β Custom Recovery that supports installation ZIP-Firmware files and backups. Official versions TWRP For most Xiaomi models, available at twrp.me. note that some new devices (such as Xiaomi 13 or Redmi Note 12) may require a special version with support for Dynamic Partition.
β οΈ Attention: Unlocking the bootloader resets all data on the device! Before starting the procedure, copy important files to your computer or cloud. Also note that some banking applications (such as Sberbank Online or Tinkoff) may stop working on unlocked devices due to the SafetyNet trigger.
For backup, use:
- π Built-in function MIUI Backup (Settings) β System and device β Backup).
- π TWRP (If already installed, it creates a complete image of the system, including /data and /system.
- βοΈ Google Drive, Mi Cloud for Contacts, Photos and Notes.
2. firmware selection: official MIUI vs custom builds
The type of firmware not only affects the capabilities of the device, but also the stability of its operation. MIUI Xiaomi is divided into two types:
- π¦ Stable - undergo long-term testing, are updated every 1-3 months, are suitable for daily use.
- π Weekly (Developer) - contain new features, but may have bugs, updated every week.
Custom firmware (for example, LineageOS, ArrowOS, Havoc-OS) offer:
- π More recent versions of Android (like Android 14 for devices that donβt officially support it).
- π No Advertising and Unnecessary Applications (Bloatware).
- π§ Advanced settings (e.g., kernel management, change) DPI screen).
However, custom firmware has disadvantages:
- π Possible problems with autonomy (fast battery discharge).
- πΈ Not all camera features work properly (especially on Xiaomi with proprietary drivers).
- π‘οΈ Lack of official support (updates depend on enthusiasts).
| Criteria | Official MIUI | Custom firmware |
|---|---|---|
| Stability | βββββ | βββ (build-dependent) |
| Android features | Standard. + brand-piece MIUI | Pure Android or close to it |
| Updates | Regular but slow | Frequent, but not for all devices |
| Security | Official support, encryption | Vulnerability risk (if the build is irrelevant) |
| Compatibility with banking applications | Yes (if the bootloader is locked) | Partially (required Magisk to pass SafetyNet) |
Where to download firmware:
- π Officially MIUI: en.miui.com (select the version for your model!).
- π Castomy: XDA Developers or Telegram-channels of developers.
β οΈ Warning: Never download firmware from questionable sites! ZIP-files may contain viruses or spyware. Check checksums (MD5/SHA-1) post-load.
Installation TWRP Recovery (if required)
TWRP (Team Win Recovery Project is a custom recovery that allows you to install firmware in the format ZIP, Xiaomiβs official Stock Recovery supports only the installation of official.zip digitally signed updates.
For installation TWRP Follow the following steps:
- Download the image TWRP for your model from the site twrp.me (file with the extension.img).
- Connect your phone to your computer in Fastboot mode (turn off the device, then press Volume down). + Nutrition).
- Open the command line in the folder with ADB The command is: fastboot flash recovery. twrp-3.7.0_12-1-redmi_note_10.img (Replace the file name with yours).
- Reboot to TWRP Team: fastboot boot twrp-3.7.0_12-1-redmi_note_10.img
After the first entrance to the TWRP The system may offer to allow modification of the partition /system. Swipe for confirmation (this is necessary for installing firmware).
βοΈ Preparation for installation TWRP
4. Step-by-step instruction: firmware through Recovery
Now, let's get to the process of installing the firmware, and it's good for Stock Recovery and for Stock Recovery. TWRP, but with some differences.
Step 1: Download to Recovery
Turn off your phone. Use the combination to log in to Recovery:
- π Stock Recovery: Volume up + Meals (hold until the Mi logo appears).
- π§ TWRP: Loudness up + Food (let go when the menu appears).
Step 2: Clean Partitions (Wipe)
Before installing a new firmware, be sure to reset:
- In Stock Recovery, select Wipe Data β Wipe All Data.
- V TWRP Go to Wipe. β Advanced Wipe and mark: Dalvik / ART Cache System Data Cache Then swipe to confirm.
β οΈ Note: If you install the firmware of the same version as the current one (e.g. update) MIUI 14.0.1 β 14.0.2), you can do without completely resetting. But when you change the type of firmware (for example, with a new type of firmware). MIUI on LineageOS) wipe is mandatory!
Step 3: Installation of firmware
Copy. ZIP-Firmware file on the phone (internal memory or SD-In the map. TWRP:
- Choose Install.
- Show the way to ZIP-file.
- Swipe for confirmation.
- Wait until it is completed (it can take 5-15 minutes).
In Stock Recovery:
- Select Install update.zip to System.
- Confirm the installation.
- After you complete the process, select Reboot to System.
Step 4: First download
The first run after firmware can take up to 10-20 minutes. Don't interrupt the process! If the device has been stuck on the logo for longer than 30 minutes, try:
- π Reboot to Recovery and Repeat the Installation.
- π± Check firmware compatibility with the phone model.
What to do if the firmware is not installed?
5. Typical errors and their solutions
Even with the exact following of the instructions, there can be problems.
| Mistake. | Reason. | Decision |
|---|---|---|
| Error 7 in TWRP | Incompatible firmware or incorrect code name | Download firmware for an exact model (check in fastboot getvar product) |
| The device does not load (bootloop) | Incorrect wipe or damaged ZIP-file | Repeat installation with complete System and Data cleanup |
| DM-Verity corruption | There is no support for DM-Verity in custom firmware | Sweep disable_dm-verity_forceencrypt.zip post-stitch |
| The sensor does not work after the firmware | Incompatible version of the kernel or drivers | Swipe another firmware option or roll back to the official MIUI |
If the phone doesnβt turn on after firmware (black screen, no button response), try:
- Connect to charging for 30 minutes - sometimes helps with the discharge of the battery.
- Hold the Loud down + Power for 10-15 seconds for forced reboot.
- Swipe the device through Fastboot (instructions are available at xiaomiflash.com).
π‘
If the mobile network does not work after firmware, check the settings APN. They're often reset when custom firmware is installed. β SIM-maps and mobile networks β Access points (APN).
6. Post-firmware setup: data optimization and recovery
After successful firmware installation, several steps must be taken to ensure stable operation of the device:
Data recovery
If you're backing up in TWRP, can be restored:
- Reboot to TWRP.
- Select Restore and specify the folder with backup.
- Mark the sections for recovery (e.g. Data for applications and settings).
To recover from MIUI Backup:
- Go to Settings β System and Device β Backup.
- Select the backup file and follow the instructions.
Optimizing productivity
After the firmware custom firmware is recommended:
- π Calibrate the battery: fully discharge and charge the phone 2-3 times.
- ποΈ Clear the application cache in Settings β Annexes.
- π οΈ Disable unnecessary services (e.g. Mi Cloud if not used).
Passing SafetyNet (for banking applications)
If you have custom firmware installed, banking applications may be blocked due to the SafetyNet trigger.
- Install Magisk (through) TWRP).
- Activate the MagiskHide and Universal SafetyNet Fix modules.
- Restart your device and check the status in the SafetyNet Checker app.
π‘
After you have custom firmware, always check the basic functions: calls, mobile internet, Wi-Fi, camera and sensors. If something doesn't work, it's likely that the firmware is incompatible with your device.
7. The rollback to the official firmware: how to get everything back
If the custom firmware is unstable or you need to return the official firmware MIUI (For example, for warranty repairs, follow the following steps:
- Download the official firmware in.tgz or.zip format from en.miui.com.
- Unclose the file and find the file inside the folder flash_all.bat (for Fastboot or update.zip (for recovery).
- To install via Recovery: Copy update.zip Reboot to Stock Recovery and select Install update.zip.
Fastboot
fastboot flash all flash_all.bat(This will completely re-interpret the device, including the bootloader).
After the rollback:
- π The bootloader will remain unlocked (if you have unlocked it previously).
- π± All data will be erased (including internal memory).
- π To block the bootloader again, run the command: fastboot oem lock Attention: this will lead to a complete reset!