Reflashing Xiaomi smartphone via MiFlash is one of the most reliable ways to bring the device back to life after crashes, update the software to the current version or install custom firmware. OTA-This method works even on bricks, when the phone does not turn on or hovers on the logo, but the process requires carefulness: a mistake at any stage can turn the gadget into a useless piece of plastic.
In this guide, we will analyze all the stages of flashing โ from unlocking the bootloader to choosing the correct firmware version (Fastboot or Firmware). EDL) and solving typical errors like flash_all_lock.bat Or invalid image format. We will pay special attention to the nuances for new Xiaomi models. 13/14 Redmi Note 12, If you've never flashed a smartphone before, don't worry: it's designed for beginners, but with professional life hacks in mind.
Preparation for firmware: what to do before the start
The first step is to save all the important data. Firmware through MiFlash completely erases the device's internal memory, including photos, contacts and messages. Even if the phone doesn't turn on, try extracting data via ADB or a PC connection in Fastboot mode (if the bootloader is unlocked).
- ๐ฑ Use the Mi utility PC Suite (official software from Xiaomi) for backup.
- ๐พ If the phone is seen as a removable disk, copy the files manually to the computer.
- ๐ง For devices with unlocked bootloader, the adb pull command is suitable /sdcard/.
Then check your Xiaomi model and its encoding. For example, the Redmi Note 11 Pro can have vili (global) or peux (China) versions. Install the wrong firmware is a sure way to get a broken smartphone with an error "Invalid IMEI." You can find out the exact model:
- ๐ On the device box (serial number sticker).
- ๐ In settings: Settings โ The phone. โ Model.
- ๐ป Fastboot: Connect your phone to your PC and type in the command fastboot getvar product
โ ๏ธ Note: Firmware for Chinese versions (China) ROM) If your Xiaomi is purchased in Russia or Europe, look for firmware marked Global or EEA.
The final step is to check the battery charge, the device must be charged at least 50%. If the battery is discharged, connect the phone to charge for 30 to 40 minutes before the firmware starts. During the flashing process, the smartphone must not turn off, which will lead to irreversible damage to the system partitions.
Unlock the bootloader: without this MiFlash will not work
The bootloader on all Xiaomi smartphones is locked by default, a security measure that prevents unofficial software from being installed. To flash the device through MiFlash, it must be unlocked. The process takes 3 to 7 days (due to checking the Xiaomi account) and requires:
- ๐ฑ Mi Account Account Linked to Phone.
- ๐ป Windows computer (official utility Mi Unlock Tool does not work on Windows) macOS/Linux).
- ๐ USB-cable (preferably original).
Instructions for unlocking:
- Download Mi Unlock Tool from the official website.
- Turn on the developer mode on the phone (7 times click on the MIUI version in the settings) and activate OEM Unlock.
- Connect your phone in Fastboot mode (clip Volume Down + Power).
- Launch the Mi Unlock Tool, log in to your account and follow the instructions.
โ ๏ธ Warning: Once the bootloader is unlocked, all data will be deleted from the phone, including Google and Xiaomi accounts. If you forget the password from the Mi Account tied to the device, unlocking will become impossible without contacting the service center.
On the newer models (Xiaomi 13/14, Redmi Note 12), the process is complicated: confirmation via SMS and waiting 168 hours (7 days) after the account is linked, and it is legally impossible to circumvent this restriction โ you have to wait.
What to do if Mi Unlock Tool says "Couldn't unlock"
Firmware Choice: Fastboot vs EDL and Where to Download Official Files
There are two types of firmware for Xiaomi that can be installed via MiFlash:
- Fastboot is a standard firmware mode that works on most devices, and is suitable for upgrades, downgrades or crash recovery.
- EDL (Emergency Download Mode) - Emergency mode, used when the phone does not respond to the Fastboot (for example, after a failed firmware) requires an authorized Xiaomi account or a special box.
For 90% of users, Fastboot firmware is enough, and you can download it from official sources:
- ๐ Official website MIUI (Choose a version for your model).
- ๐ฅ Xiaomi Firmware Updater (unofficial archive with the latest versions).
- ๐พ 4PDA (Russian-speaking community, there are firmware with Russification).
Pay attention to the types of firmware:
| Type of firmware | Description | When to use |
|---|---|---|
| Stable | A stable version of MIUI with minimal bugs. | For everyday use. |
| Developer | Beta version with new features but possible errors. | For testing or if you need fresh features. |
| Fastboot | Complete firmware package via MiFlash. | Recovery after a failure or change of region. |
| Recovery | Firmware for installation through stock recovery. | If MiFlash is not working or not PC. |
To use MiFlash, download files marked Fastboot and the extension.tgz or.zip. The archive size is usually 2-4 GB. After downloading, unpack it into a folder without Cyrillic characters (for example, C:\Xiaomi\ROM).
๐ก
If you are flashing Xiaomi to remove ads or bloatwar, look for firmware marked xiaomi.eu โ these are modified versions of MIUI without unnecessary applications.
Installation of MiFlash and drivers: without them, firmware will not begin
MiFlash Tool is the official tool from Xiaomi for firmware devices in Fastboot mode. You can download it from the official website. The utility works only on Windows (support) 7/10/11), for macOS/Linux You will need a virtual machine.
Before installing MiFlash, you need to install drivers:
Install Android SDK Platform Tools (for ADB/Fastboot commands)
Download and unpack Platform Tools
Install Xiaomi drivers with Mi Phone Manager
Disable driver signatures in Windows (if drivers are not installed)
-->
After installing the drivers:
- Connect your phone in Fastboot mode (click Volume Down + Power until a bunny with the word Fastboot appears).
- Open Device Manager and check that the Android Bootloader Interface is available in the Ports (COM and LPT) section.
- Launch MiFlash, press Select and point the path to the unpacked firmware.
If MiFlash can't see the device:
- ๐ Try another one. USB-port (preferably 2.0).
- ๐ Reinstall drivers manually through Device Manager.
- ๐ป Launch the utility on behalf of the administrator.
Step-by-step: how to flash Xiaomi through MiFlash
When you're done, we're going to start the firmware, and it's going to take 5 to 15 minutes, depending on the model and the speed. USB-port.
Step 1 Starting MiFlash and Selecting Firmware
- Open MiFlash (XiaoMiFlash.exe file).
- Press Select and select the folder with the unpacked firmware (should be files). flash_all.bat, images.).
- Connect your phone in Fastboot mode.
Step 2: Selecting a firmware method
At the bottom of the MiFlash window, there are three options:
- Clean all โ complete cleaning (recommended for region change or after viruses).
- Clean all and lock โ Clean + lock the bootloader (use if you want to return the phone to stock state).
- Save user data โ saving user data (not always working correctly)
Step 3. Start firmware
Press Refresh, your device (e.g. COM4) appears in the window, and then click Flash, and the process will start automatically, and the log will show lines like:
receiving file 'boot.img' (12345 KB)...
OKAY [ 0.5s]
sending 'boot' (12345 KB)...
OKAY [ 1.2s]
writing 'boot'...
OKAY [ 0.3s]When you're done, you'll see Flash Done in the log, and the phone will automatically reboot. USB-cable until you see the logo MIUI screen-on.
โ ๏ธ Note: If the firmware is interrupted during the waiting for device phase, check the cable connection or try another one. USB-Ports are often affected by port insecure power supply 3.0.
๐ก
Always use the clean all option when changing your firmware region (e.g. from Chinese to global), otherwise you may have problems with your mobile network or GPS.
Common mistakes and their solutions
Even with the correct instructions, errors can occur, and here are the most common ones and how to correct them:
| Mistake. | Reason. | Decision |
|---|---|---|
| flash_all_lock.bat doesn't work | The bootloader is locked or the firmware is not suitable for the model. | Unlock the bootloader or download the correct version of the firmware. |
| Invalid image format | Damaged firmware files or the wrong folder. | Pump the firmware and unpack it into a folder without spaces / Cyrillic. |
| Device not found | Drivers are not installed or the cable is faulty. | Install drivers manually or try another one USB-port. |
| Anti-rollback check fail | Trying to install the old firmware after the new one. | Look for firmware with the same or newer Anti-Rollback number. |
If after firmware the phone does not turn on or hovers on the logo:
- ๐ Try to re-sweeten with the clean all option.
- ๐ฑ Keep the Volume up. + Power 10-15 seconds for forced reboot.
- ๐ป If nothing helps, then go ahead and do it. EDL (Authorized account required).
For Xiaomi models 12/13/14 Snapdragon-powered 8 Gen may need to disable the antirollback check. flash_all.bat add a line:
fastboot oem edlEDL Firmware: When Fastboot is Not Working
EDL (Emergency Download Mode) is the last chance to bring the phone back to life if it doesn't respond to Fastboot or the firmware is constantly broken, and in this mode, the device connects to a PC on a low-level protocol, allowing you to flash even the bricks.
- ๐ Requires an authorized Xiaomi account (for new models).
- ๐ป Need a special firmware with the extension.mbn.
- ๐ Connection through EDL It requires short circuit test points (on some models).
Instructions for EDL:
- Download firmware for EDL (for example, with Xiaomi Firmware Updater).
- Connect the phone in mode EDL: For Snapdragon: Press the Volume Up + Loudness down + USB-For Mediatek: short circuit test points (see instructions for your model).
MiFlash
Flash
โ ๏ธ Attention: Firmware in mode EDL Without an authorized account, it can lead to a blocking IMEI. On new models (Xiaomi) 13/14, Redmi Note 12) This requires official access from Xiaomi.
If you do not have an authorized account, contact the service center or look for paid services to unlock EDL (cost - from 500 to 2000 rubles depending on the model).