Firmware Xiaomi smartphone through MiFlash is the official way to restore or update software when standard methods do not work, such an approach is required for critical system failures, after failed custom firmware or for installing global versions of MIUI on Chinese devices. Unlike upgrades through Settings β About the phone, firmware through MiFlash completely rewrites the system partition, which guarantees a clean installation without residual files.
But the process has nuances, from having to unlock the bootloader to choosing the right firmware version (Fastboot or Recovery). Errors at any stage can turn the phone into a brick, so itβs important to understand each step. In this article, weβll look at the current 2026 requirements for MiFlash (including support for new models on HyperOS), discuss driver preparation in detail and analyze typical errors with codes, such as 0x80070002 or 0x80070490.
What is MiFlash and when is it needed?
MiFlash is Xiaomi's official Fastboot firmware utility, which works with the device's bootloader to allow you to install firmware directly without Recovery, and is used in three key cases:
- π Recovery after a crash: If the phone doesnβt turn on, it hovers on the logo or goes to bootloop (cyclical reboot).
- π Change of regional firmware: transition from Chinese (China) ROM) Global (Global) ROM) European (EEA).
- βοΈ Downgraid version MIUI/HyperOS: Return to the previous stable assembly if the new one is not working properly.
Unlike firmware via Recovery: MiFlash erases all data on the device (including internal memory), while Recovery firmware can save user files. MiFlash is also mandatory for devices with a locked bootloader if you want to unlock it before installing custom software.
β οΈ Note: On Xiaomi models from 2023 to 2026 (e.g. Redmi Note 13 Pro)+ Xiaomi 14) firmware via MiFlash may require authorization of the Mi Account even after unlocking the bootloader.
Preparation for firmware: what to do before the start
Incorrect preparation is the main cause of firmware errors. Before connecting your phone to your PC, follow the following steps:
- Check the device model: Go to Settings β About Phone β Model or look at the box. The firmware should match the model exactly (e.g. Redmi Note 12 Pro 5G and Redmi Note 12 Pro+ 5G are different devices!).
- Download the correct firmware: Use only official Fastboot firmware from websites: π Official portal MIUI (Choose Fastboot in the filters). π Xiaomi Firmware Updater (alternative source with archive of old versions).
Unlock the loader
MiFlash
Mi
Also prepare:
- π₯οΈ Windows PC 10/11 (on macOS/Linux MiFlash is not working).
- π Cable USB Type-C (preferably original, as cheap cables can cause connection errors).
- π Battery charge of the phone at least 50% (firmware can take up to 10-15 minutes).
Unlocking the loader: step-by-step instructions
The bootloader on all Xiaomi smartphones is locked by default, and to flash the phone through MiFlash, it must be unlocked.
- Linking your Mi Account to your device: Go to Settings β Xiaomi Account and log in. Go to Settings β Additional β Unlock OEM and activate the option. Enable USB Debugging in Settings β About Phone β MIUI Version (click 7 times on the version, then return to Additional β For Developers).
- Unlock Tool request: Download Mi Unlock Tool and install it on PC. Connect your phone in Fastboot mode (turn off phone, then press Volume Down + Power). Launch Mi Unlock Tool, log in to the same Mi Account and follow the instructions. Note: Xiaomi servers may require waiting up to 72 hours for new anchoring!
Once successfully unlocked, the phone will restart with a warning: This device is unlocked when turned on.
β οΈ Note: On HyperOS models (e.g. Xiaomi 14 or Redmi) K70) Unlocking may require additional authorization through SMS or email, even if your Mi Account is already linked.
Linked to Mi Account on phone|Debugging is on. USB|The option "Unlocking" has been activated OEM"|Fastboot drivers installed|Phone's 50-charged%+-->
Installation of drivers and configuration of MiFlash
Without the right drivers, the PC won't recognize the phone in Fastboot mode.
- π§ Android SDK Platform-Tools (for fastboot and adb commands).
- π±οΈ Xiaomi Drivers (Select the Version for Your OS).
After installing the drivers:
- Connect the phone in Fastboot mode (turn off, then press Volume Down + Power).
- Open Device Manager on PC and check that the Android Bootloader Interface is available in the Ports (COM and LPT) section.
- Download and unpack MiFlash (last version at 2026).
In MiFlash, select the folder with the unpacked firmware (.tgz or.zip archive must be pre-extracted!). The Device field should display your device.
| MiFlash version | Windows Support | Features |
|---|---|---|
| MiFlash 2023-12-15 | 10/11 (x64) | HyperOS support, Qualcomm 900E drivers bugs fixed |
| MiFlash 2022-03-07 | 7/10 (x86/x64) | The latest version supports older models (Redmi 4X, Mi A1) |
| MiFlash 2020-05-29 | 7/10 | Old but stable for the firmware on MTK-chip |
π‘
If MiFlash canβt see the device, try connecting the phone to another device. USB-port (preferably) USB 2.0 on the back of your PC or disable the antivirus β it can block drivers.
The firmware process: a step-by-step guide
Now, to the most critical stage, follow the instructions carefully.
- Select firmware mode: Clean All - complete cleaning (recommended for changing regional firmware); Clean All and Lock - cleaning + lock bootloader (use if you plan to sell a phone); Save User Data - data storage (does not work on new models with HyperOS).
Firmware launch
- Press Refresh in MiFlash to make sure the device is identified.
- Select Clean All mode (if you are not sure, this is the most reliable option).
- Press Flash and wait until it is completed (progress will be displayed in the log).
It takes 5 to 15 minutes. When it's done, it automatically reboots. It can take up to 10 minutes for the first time to turn on -- that's okay.
The successful log in MiFlash looks like this:
[100%] Flashing boot.img...
[100%] Flashing system.img...
[100%] Flashing vendor.img...
[100%] Done. Rebooting device...β οΈ Note: If there is an error in the log 0x80070002, This means that the firmware is not suitable for your model. Check the name of the archive - it must be the same as the code name of the device (for example, toco for Redmi Note 10 Pro).
What if MiFlash is 99% frozen?
Common mistakes and their solutions
Even with the exact following of the instructions, errors can occur.
| Error code | Reason. | Decision |
|---|---|---|
| 0x80070002 | Incompatible firmware | Download the firmware for the exact model (check the code name!). |
| 0x80070490 | Problems with drivers | Reinstall drivers manually through Device Manager. |
| 0x80004005 | bootloader locked | Repeat unlocking through the Mi Unlock Tool. |
| 0x8007001F | Damaged firmware archive | Download the firmware again and check the checksum (MD5). |
If MiFlash is not codeless, check:
- π Connecting a cable (try another cable or port).
- π₯οΈ Windows Version (Windows 11 may require additional drivers for Qualcomm chips).
- π₯ Firmware integrity (unpack the archive again, avoid Cyrillic characters on the way to the folder).
π‘
If the firmware is interrupted in the middle, DO NOT TRY to restart the phone! plug it back into MiFlash and repeat the process with the same mode (Clean All).
Firmware through fastboot manually (alternative method)
If MiFlash doesn't work, you can flash the phone through the fastboot command line, which requires knowledge of the basic commands, but gives you more control over the process.
Instructions:
- Unpack the firmware in the folder with fastboot (from Android SDK Platform-Tools).
- Open the Command Prompt in this folder (Shift + PCM β Open the PowerShell window here).
- Type commands in turn: fastboot flash boot.img fastboot flash system.img fastboot flash vendor.img fastboot flash dtbo dtbo.img fastboot reboot
For split-slot models (A/B, for example, Xiaomi 12T) use:
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash system_a system.img
fastboot flash system_b system.imgβ οΈ Attention: On devices with HyperOS (2026 year) may require additional command to firmware super: fastboot flash super super.img Without it, the phone won't turn on!
What to do after the firmware
After a successful firmware:
- π Set up your phone again: Since the data is erased, you will need an initial setup (language selection, Wi-Fi connection, login to your Mi Account).
- π Check bootloader status: If you used Clean All and Lock, the bootloader will be locked. Re-unlock will have to wait 72 hours to re-unlock.
- π± Update: Go to Settings β The phone. β Update the system and check the relevance of the version.
If the phone does not turn on after the firmware:
- Wait 10-15 minutes β the first turn on can be long.
- If the screen is black, try to pinch Volume Up + Power for 10 seconds for a forced reboot.
- If the phone vibrates but doesnβt turn on, then swipe it again by selecting a different mode in MiFlash.
π‘
After you run the firmware, check the sensors (fingerprint, gyroscope) and modules (Wi-Fi, Bluetooth). If something doesn't work, run the phone again with another version of the software.