Why you need a full reflashing and when to do it
Xiaomi flashing is not just a system update through the settings menu, but a deep change in the deviceβs software. The procedure can be required in several cases: if the smartphone started to slow down due to accumulated errors in the system, if you want to install custom firmware (for example, LineageOS or Pixel Experience), or if the device was in a bootloop state (infinite boot) after a failed update.
It is important to understand the difference between firmware types: official (from Xiaomi via the slate). MIUI), Global (for the international market), custom (developed by enthusiasts) and stock (clean versions of Android without a shell). MIUI It's a global one, to get rid of all the Chinese services that are unnecessary, but without the right preparation, it could lead to a lockdown. IMEI or loss of data on the internal storage.
Another popular scenario is downgrade (a rollback to an older version). MIUI). This is true if the new update has brought a critical error, such as a camera problem on Poco. F3 post-exit MIUI 14.However, downgrade requires special care: some firmware versions block the possibility of rollback, and improper actions can turn a smartphone into a βbrickΒ».
Preparation for Flashing: What to Do Before Starting
Before you start the procedure, make sure that all the preliminary steps are followed, which will save you from data loss and unforeseen errors.
- π± Save all data: firmware erases internal memory. Use Mi Cloud, Google Drive or physical backup on PC via adb backup.
- π Charge the battery to at least 60%. interruption of the process due to discharge can damage the boot partition.
- π₯οΈ Install drivers: Windows will require Mi Flash Tool and Qualcomm drivers (if the chipset supports the device). EDL-regime).
- π Unlock the bootloader (unless done earlier) without it, you can't install unofficial software.
Pay special attention to the choice of firmware. For Xiaomi, there are three types of files:
- π¦.Zip is installed via Recovery (e.g, TWRP). Suitable for custom firmware.
- π.tgz or.img are full images for Fastboot.
- π OTA β Incremental updates. Not suitable for full flashing.
If you're re-flashing Poco X3 Pro or another device with MediaTek, check for the auth.ini file in the firmware archive. SP The Flash Tool will not be able to log in to write data. Snapdragon devices (such as Mi 11) do not require this file, but may need to unlock. OEM Unlock in the Developer Settings.
π‘
Before downloading the firmware, check its hash sum (MD5 or SHA-256) This will protect you from fake files with viruses.
Unlocking the bootloader: a mandatory step for custom firmware
The bootloader on all Xiaomi smartphones is locked by default, a security measure that prevents uncertified software from being installed.
- Activate OEM Unlock in the menu settings β The phone. β Version. MIUI (Press 7 times to create a developer section).
- Link your Mi Account to your device in Settings β Additionally. β Special facilities β Mi Unlock Status.
- Download the Mi Unlock Tool from the official Xiaomi website (only for Windows).
- Connect your smartphone in Fastboot mode (clamp Volume down) + Food) and follow the instructions of the program.
Important: Xiaomi has introduced a restriction on unlocking β after linking the account, you need to wait 7 days (on some models β up to 30 days), this rule has been in effect since 2022 and is aimed at combating device theft. If you bought a smartphone from hand, make sure that the previous owner untie his Mi Account, otherwise unlocking will be impossible.
What if the Mi Unlock Tool gives you a "Couldn't unlock" error?
Once the bootloader is successfully unlocked, the smartphone will reset to factory settings. All data will be erased, so transfer the photos and contacts to an external medium in advance. Also note that unlocking will void the warranty (if it is still valid) and may cause problems with Google Pay or Widevine. L1 (downgrade DRM streaming).
Firmware selection: official MIUI vs custom builds
Official firmware MIUI subdivided:
| Type of firmware | Region | Features | Suitable for |
|---|---|---|---|
| China Stable | China | Without Google, many Chinese apps | Users who do not need GMS |
| China Developer | China | Weekly updates, possible bugs | Testers and enthusiasts |
| Global Stable | International | Google Services, Without Chinese Apps | Most users |
| EEA (Europe) | Europe | Corresponding. GDPR, without Chinese services | EU residents |
For most users, Global Stable is the best choice. However, if you need weekly updates with new features, you can install the Developer version. K40 post-update MIUI 14.0.4.
Custom firmware like LineageOS, Pixel Experience or ArrowOS offer βcleanβ Android without shells MIUI. Their pluses:
- β Lack of advertising and unnecessary applications.
- β Longer support for older devices (for example, Redmi Note 7 gets Android 13 updates in custom builds).
- β Ability to fine-tune the interface.
Cons:
- β No official support from Xiaomi.
- β Possible camera problems (e.g. 48MP on Poco) X3 NFC).
- β Banking applications (e.g. Sberbank Online) may not work due to the lack of SafetyNet.
Before installing custom firmware, check its compatibility with your model on the forum XDA Developers or a developer's telegram chat, like a firmware for Mi. 9T (Davinci is not suitable for Mi 9T Pro (raphael), despite the similarity of the devices.
Download firmware from an official source (mi.com, xiaomifirmwareupdater.com or XDA)
Verify the device code name (e.g., "surya" for Poco) X3)
Check out the Android version (not all custom firmware supports Android 13)
Make sure you have installation instructions for your model
Download additional files (for example, Gapps for custom firmware)
-->
Fastboot Flashing: Step-by-step instructions
Fastboot Method Suitable for Installing Official Firmware MIUI It involves completely rewriting all the parts of the device, so all the data will be erased.
You will need to:
- π» Windows computer (or Linux/macOS with fastboot and adb installed).
- π± Cable USB Type-C (preferably original to avoid connection issues).
- π Firmware in.tgz or.img format (for example, surya_global_images_V12.5.3.0.RJGMIXM_20211020.0000.00_11.0_global_1d1a1a1a1a.tgz).
- π οΈ Mi Flash Tool (for Windows) or fastboot in the terminal.
Flashing steps:
- Unpack the firmware archive into a folder without Cyrillic characters (e.g., C:\MIUI\rom).
- Launch the Mi Flash Tool, press Select and specify the path to the firmware folder.
- Connect your smartphone in Fastboot mode (clamp Volume down) + Food before the appearance of a bunny with the inscription Fastboot).
- In the Mi Flash Tool, select Clean All (Full Clean) or Clean All and Lock (Clean + Lock bootloader).
- Press Flash and wait until it is completed (usually 5-10 minutes).
π‘
Clean all and lock will block the bootloader after you have firmware, and only use it if you are sure you won't install custom software.
If the Mi Flash Tool is a flash not done error, check:
- π Connecting the cable (try another port) USB cable).
- π The firmware version (it must match your device code).
- π Is the bootloader unlocked (if not, return to the unlock step).
For Linux/macOS Use commands in the terminal:
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot rebootBut note that manual firmware via fastboot requires knowing the exact partition structure of your device. A command error (e.g., fastboot flash userdata instead of fastboot erase userdata) can lead to data loss.
Flashing through Recovery (TWRP): custom-fix
If you install custom firmware (like LineageOS), custom recovery will be required β usually TWRP (Team Win Recovery Project, which allows you to install zip files and backups.
Instructions:
- Download. TWRP for your model from twrp.me (for example, twrp-3.7.0_9-0-surya.img POCO X3).
- Install it with fastboot: fastboot flash recovery twrp.img fastboot reboot recovery
- In TWRP, make a backup of the current firmware (Boot, System, Data sections).
- Wipe the Dalvik, Cache, System, Data (via Wipe) sections β Advanced Wipe).
- Install the firmware (Install) β Select.zip and, if necessary, Gapps (Google services).
How to avoid the Error 7 error in TWRP?
After installing the first download, it can take up to 15 minutes. Don't interrupt the process, even if the screen stays black for a long time. If the smartphone has got stuck on the Xiaomi logo for more than 30 minutes, try:
- π Reboot to TWRP repeat.
- π± Wipe the cache. β Cache).
- π§ Install another firmware version (possibly the current build contains bugs).
Some devices (such as the Mi 11 Ultra) may require additional dm-verity and forceencrypt setup to avoid data encryption issues. TWRP.
Solving common mistakes after flashing
Even if you install firmware properly, you can have problems, and here are the most common ones and how to fix them:
| Problem. | Possible cause | Decision |
|---|---|---|
| The smartphone is not turned on (black screen) | Incorrect firmware or interrupted process | Repeat the firmware through Fastboot with a full clean (Clean all) |
| Hanging on the MI logo | Conflict of the kernel or modules | Wipe Cache and Dalvik in TWRP |
| The sensor or display is not working. | Incompatible firmware (for example, for Mi 9 installed firmware from Mi 9) SE) | Install the correct firmware version for your model |
| No network (IMEI disabled) | The modem or nvram partition is damaged | Restore the nvram backup or re-flash modem separately |
| Google services are not working | Gapps or the incorrect version are not installed | Install Open Gapps (select the option) arm64 Android version) |
If it's gone after the firmware. IMEI, This is a critical error that needs to be addressed immediately:
- π‘ Nvram partition damage (often occurs when firmware is run through) SP Flash Tool on MediaTek devices).
- π§ Incorrect modem firmware (for example, the Note 8 modem was used for the Redmi Note 8 Pro).
To restore the IMEI:
- Find the backup nvram (if you did it before the firmware) and restore it through TWRP.
- Use the engineering menu (#4636##) and manually write IMEI (requires root rights).
- Only reflash the modem partition via fastboot flash modem modem.img.
π‘
If IMEI Lost, do not attempt to recover it through third-party programs (such as ChimeraTool or Maui). META). This can lead to hardware modem locking.
For Snapdragon devices (e.g. Poco) F3) sometimes helps QCN-file-through QPST. But this method requires a lot of knowledge and can permanently disable the modem.
Safety and Risks: What to Fear
Flashing is always a risk, and even experienced users face challenges, so it's important to understand the potential consequences:
- π¨ Brick: The device stops turning on, most often due to interrupted firmware or incompatible software.
- π Blocking Mi Account: if the smartphone was linked to another account, after reset, you may need to enter the username / password of the previous owner.
- π΅ Loss of loss IMEI Serial number: This makes the device unsuitable for calls and may require repairs at the soldering level.
To minimize the risks:
- π Use only verified firmware sources (official Xiaomi website, XDA Developers, xiaomifirmwareupdater.com).
- π Make backups through TWRP before any manipulation.
- π Check with at least 80% battery charge and network adapter (not through the battery) USB port).
- π‘ Check firmware compatibility with your model (e.g. Mi). 10T mi 10T Pros have different code names: apollo and apollopro).
If you are flashing a device with MediaTek (like the Redmi Note 9 Pro), be especially careful: a firmware error through the device. SP Flash Tool can damage the preloader, making it impossible to repair the device without a programmer. EDL-firmware.
π‘
Before the firmware check whether your model supports the mode EDL (Emergency Download Mode. To do this, connect the device turned off to a PC with the Volume Up button pressed. + Volume down. If a Qualcomm port appears in the Device Manager HS-USB QDLoader 9008, then, EDL available.