Firmware Xiaomi smartphone through MiFlash is one of the most reliable ways to bring the device back to life after crashes, update to the current version or install custom firmware. This method is suitable for most models of the brand, including Redmi, POCO, Mi and even the gaming Black Shark, but requires pre-unlock the bootloader and follow the instructions. Unlike the update via Ota Updater, firmware through MiFlash allows you to completely rewrite the system partition, which helps to eliminate critical errors caused by incorrect updates or viruses.
However, the process has its pitfalls: the wrong firmware can turn a phone into a brick, and errors when unlocking a bootloader can lock the device forever. In this article, we will examine all the stages of firmware from preparing drivers to the final restart, and also tell you how to avoid typical errors such as Invalid image format or Flash is not done. If you are a beginner, we recommend you to carefully study each section: skipping even a small step (for example, checking the version of MiFlash) can lead to irreversible consequences.
1. Firmware Preparation: What to Do Before Starting
Before you start firmware, make sure that all the prerequisites are met, which takes up to 70% of the success of the operation.
First, check your device model. Xiaomi firmware is strictly bound to the model code (e.g. Redmi Note 10 Pro has the code sweet, POCO F3 is alioth).
- ๐ฑ In the phone settings: Settings โ The phone. โ Model (or Version) MIUI).
- ๐ Through the command line, connect the phone to the PC and type: adb shell getprop ro.product.device
- ๐ ๏ธ On the device box or under the battery (for collapsible models).
Second, back up your data. The firmware in MiFlash erases all internal memory (partition /data). Use Mi Cloud, Google Drive, or local copying on your PC.
- ๐ธ Photo and video (folder) DCIM).
- ๐ฑ Contact and SMS (Export through Contacts โ Management โ Exports).
- ๐ฎ Game savers (use Helium or root managers if there is root).
โ ๏ธ Note: If the Find Device function is enabled on the phone, it must be turned off in Settings. โ Mi Account โ Find Device.Otherwise, after firmware, the phone may be locked with a requirement to enter a password from the old Mi Account.
2 Unlocking the bootloader: a mandatory step before the firmware
Without an unlocked bootloader, it is impossible to flash Xiaomi through MiFlash. By default, all Xiaomi devices come with a bootloader locked, and unlocking it requires official permission from the manufacturer. The process takes 3 to 15 days (depending on the model) and involves linking the Mi Account to the device.
Instructions for unlocking:
- Link your Mi Account to your phone: ๐ฑ Go to Settings. โ Mi Account โ Synchronize and enable all options. ๐ Make sure your phone is connected to the internet via mobile data (Wi-Fi may not work).
- Apply for unblocking: ๐ Go to the site. en.miui.com/unlock (Use your browser on PC). ๐ Fill out the form stating the reason for unlocking (for example, โInstall official firmwareยป). โณ Wait. SMS with confirmation (may come in a few days).
- Unlock the bootloader through the Mi Unlock Tool: ๐ฅ๏ธ Download the utility from the official website. ๐ Connect your phone in Fastboot mode (clip Volume Down) + Power with the device switched off). ๐ Launch Mi Unlock Tool, log in to Mi Account and click Unlock.
โ ๏ธ Note: Some models (e.g. Redmi Note 12 or Redmi Note 12) POCO F5) Unlocking may require confirmation via video call to Xiaomi support. Without this step, the utility will give an error Couldn't unlock.
What if the Mi Unlock Tool can't see the phone?
3. Selection of firmware: official vs custom
The type of firmware depends on the stability of the device and the available functionality. Xiaomi offers several options:
| Type of firmware | Description | Pluses | Cons |
|---|---|---|---|
| Official stable. | Xiaomi firmware with the mark Stable. | โ Maximum stabilityโ Support OTA-update | โ Delayed updates (released later than for Beta) |
| Official beta | Test builds (Beta or Developer) | โ New functions before allโ Frequent updates | โ Possible bugs and overheating |
| Castomic (AOSP) | Community Firmware (LineageOS, Pixel Experience) | โ Pure Android without a MIUIโ Additional settings | โ No guarantee of stabilityโ The camera may not be working or NFC |
| Port from another device | A firmware adapted for another model. | โ Unique functions | โ High risk of "brickingยปโ No support from developers |
For most users, the best choice is the official stable firmware.
- ๐ On the Miui Download website (select a version for your model and region).
- ๐ Through telegram channels, like, @MIUIUpdatesTracker (Relevant links to the latest builds).
- ๐ Forums 4PDA XDA-Developers (if you need a modified version).
Important: The firmware file name must match the model. For example, for Redmi Note 11 Pro+ 5G (veux) fits the file form: veux_global_images_V13.0.4.0.SKCMIXM_20221010.0000.00_12.0_global_100d0a3a0d.tgz
๐ก
If you downloaded firmware in.tgz format, it should be unpacked into a folder using 7-Zip or WinRAR. MiFlash works only with unpacked files (.img,.mbn, etc.).
4. Installation of drivers and setting up MiFlash
Without the right drivers, MiFlash wonโt see your device. For Xiaomi, Qualcomm chips (most models) will require QDLoader HS-USB drivers, and for Mediatek, MTK VCOM drivers.
Step-by-step installation:
- Download MiFlash: ๐ฅ๏ธ Official version: download page. ๐ง Alternative (if the official one does not work): MiFlash Pro or XiaoMiFlash.
- Install the drivers: โ๏ธ Driver Preparation Download Qualcomm Drivers (for Snapdragon)Install Mi Phone Manager (automatically installs basic drivers)Deactivate driver signature verification in WindowsReboot PCReloaded: 0 / 4
- Set up MiFlash: ๐ Unpack the firmware in a folder without Cyrillic characters (for example, C:\MIUI\veux). ๐ง In MiFlash, click Select and point the path to the firmware folder. ๐ Select firmware mode: Clean all - complete cleaning (recommended for changing region or after crashes). Clean all and lock - cleaning + Save user data - Save user data - data storage (not always working correctly).
If MiFlash doesn't see the phone in Fastboot mode, check:
- ๐ Connection to USB 2.0 (USB 3.0 may not work).
- ๐ Reinstall drivers through Device Manager (remove old and reinstall).
- ๐ฅ๏ธ Launching MiFlash on behalf of the Administrator.
5. Step-by-step firmware through MiFlash
Now, let's get to the most critical point.
- ๐ The phone is charged at least 50 times%.
- ๐ Used by the original USB-cable (cheap cables can interrupt communication).
- ๐ฅ๏ธ Antiviruses are disabled on PCs (they can block MiFlash).
Instructions:
- Transfer the phone to Fastboot mode: ๐ฑ Turn off the device. ๐ Hold the Loud down. + 10 seconds power. ๐ฅ๏ธ Connect your phone to your PC (should be defined as a Fastboot).
- Run the firmware: ๐ง In MiFlash, press Refresh โ your device should appear in the list. ๐ Make sure the path to the firmware is correct (the Device field displays the model). ๐ Press Flash and wait until the end (usually 5-15 minutes).
- Wait for completion: โ Successful firmware will end with a Flash Done message. โ Flash is not done error means driver or firmware problems.
What if the firmware is frozen? If the process doesn't move for more than 20 minutes:
- ๐ Restart your PC and phone and try again.
- ๐ Check the integrity of the firmware files (the archive may have been downloaded with errors).
- ๐ง Try a different version of MiFlash (e.g. MiFlash 2018 instead of MiFlash 2021).
๐ก
If the phone doesn't turn on after you've run the firmware, try slamming Volume Up + Power for 30 seconds to force you to restart. If that doesn't work, repeat the firmware with Clean all mode.
Typical errors and their solutions
Even if you follow the instructions accurately, you can get errors.
| Mistake. | Reason. | Decision |
|---|---|---|
| Invalid image format | Incorrect firmware format or corrupted files. | Download the firmware again, check the unpacking. |
| Flash is not done | Problems with drivers or connection. | Reinstall the drivers, try another one. USB-port. |
| Anti-rollback check fail | Trying to run the old version after the new one. | Use the firmware with a version not lower than the current one. |
| Device not found | MiFlash can't see the phone. | Check the Fastboot mode, drivers and cable. |
| The phone is stuck on the Mi logo | Incompatible firmware or recording error. | Repeat the firmware with a full clean (Clean all). |
The Anti-rollback bug deserves special attention. Xiaomi has implemented rollback protection on older firmware versions to prevent exploits. If you see this message, you're trying to install software older than what's already on your phone.
- Find firmware with the same or newer version of MIUI.
- Use custom recaps (such as TWRP) to bypass the check (risky!).
How to get around Anti-rollback without risk?
7. What to do after the firmware
Successful firmware is only half the battle, so you need to set up your phone properly to avoid problems in the future.
First steps:
- ๐ Restart your phone (sometimes the first download takes up to 10 minutes).
- ๐ถ Connect to Wi-Fi and check for updates in Settings โ The phone. โ Updating the system.
- ๐ Restore data from backup (but not immediately โ wait for the system to be fully initialized).
Checking of operability:
- ๐ Test in order: Calls and mobile Internet, Wi-Fi and Bluetooth, camera (main and front) Fingerprint sensor.
๐ Check charging (sometimes after firmware requires battery calibration).
If something's not working:
- ๐ For sensor or camera problems, try flashing modules separately through Fastboot: fastboot flash persist. persist.img
- ๐ก If there is no network, check. IMEI (Enter *#06# and restore it through QCN-file.
8. Alternative methods of firmware
If MiFlash failed, there are other methods:
- ๐ฅ๏ธ Through Fastboot manually: For power users. Commands for firmware: fastboot flash boot boot.img fastboot flash system system.img fastboot flash vendor vendor.img fastboot reboot
Which way to choose?
- ๐ For recovery after failure - MiFlash.
- ๐ฒ For custom firmware installation โ TWRP.
- ๐ง For point-by-point updates of individual sections โ Fastboot manually.