Xiaomiβs firmware via MiFlash is the only official way to return the device to factory status if itβs locked, unstable, or requires an update to the current version. MIUI. This method is suitable for all models of the brand, from the budget Redmi to the flagship Xiaomi 14, but requires strict adherence to the algorithm. OTA-Updates, firmware through fastboot allows you to choose any version of the software - from a stable global to a Chinese developer.
Many users fear this process because of the risk of βbrickingβ the device, but in practice, problems arise only when you ignore the key rules: incorrectly unlock the bootloader, use incompatible firmware or interrupt the process. In this article, we will discuss all the steps from preparation to the final restart, and also tell you how to avoid typical errors and what to do if something goes wrong.
Preparation of the device: unlocking the loader
Before you use MiFlash, you need to unlock the bootloader, a mandatory requirement for Xiaomi for all devices released after 2016. Without it, the program simply will not see your smartphone. The process takes 3 to 15 days (depending on company policy) and requires you to link your Mi Account to the device.
To start unlocking:
- π± Activate Developer Mode: Go to Settings β The phone. β Version. MIUI And tap it 7 times.
- π Turn it on. OEM-unlocking and debugging USB Settings menu β Additionally. β For developers.
- π Link your device to your Mi Account in the same menu (Mi Unlock Status).
- π₯οΈ Download the Mi Unlock Tool utility (official website) and run it on your PC under an account linked to your phone.
Once you submit a request to unlock, you will have to wait for confirmation. In 2026, Xiaomi tightened the rules: for new models (for example, the Redmi Note 13 Pro+), the wait can be up to 360 hours. Old devices (until 2020) unlock faster β in 72-168 hours.
β οΈ Warning: If you bought a smartphone with your hands, make sure the previous owner untie his Mi Account from the device. Otherwise, unlocking will be impossible without his participation.
2. Choosing the Right Firmware: Stable vs. Developer
Official firmware for Xiaomi is divided into three types: stable global (Global), stable Chinese (China) and developer versions (Developer). The first two versions are suitable for everyday use, and the third contain fresh features but may have bugs.
- π Global MIUI β International versions (the global designation in the file name).
- π¨π³ China MIUI β for Chinese devices (designation cn).
- π οΈ XiaomiROM β unofficial archive (use at your own risk).
It is important to choose the firmware that matches the model code of your device. For example, for the Redmi Note 12 Pro, it can be sweet (global version) or sweetin (Indian). You can find out the code in the Settings β About Phone β Model application or through the fastboot getvar product command in the terminal.
| Type of firmware | Advantages | Deficiencies | Who's right for? |
|---|---|---|---|
| A stable global | Maximum compatibility and support for Google services | Updates are less common than in Chinese versions. | 90% of users |
| Stable Chinese | More recent updates, optimization for iron | No Google Services, Chinese Apps | Enthusiasts ready to install GApps manually |
| Developer (Developer) | Newest features, weekly updates | Possible bugs, unstable work | Testers, developers |
β οΈ Note: Installing Chinese firmware on a global device (and vice versa) can lead to problems with the modem, camera or sensors, in some cases this can only be fixed by flashing it to the βnativeβ version.
3. Installation of drivers and setting up MiFlash
To work MiFlash on PC requires drivers Qualcomm HS-USB QDLoader 9008 (for most Xiaomi models) and the right environment. Download the latest version of the utility from the official website (avoid third-party sources - they may contain viruses).
Algorithm of installing drivers:
- Connect the switched off smartphone to the PC, holding Volume down + Power to log in to fastboot.
- In Device Manager, find a device with an exclamation point (usually Android Bootloader Interface).
- Update the driver manually by specifying the folder with drivers from the MiFlash archive.
- Restart your PC and check that the device is determined by the command of fastboot devices.
The MiFlash utility itself does not require installation - just unpack the archive. When you first start, select the language (there is Russian) and check the settings:
- π Select tab β specify the path to the unpacked firmware (folder should contain files with the.img extension).
- π Advanced tab β select firmware mode: clean all β complete cleaning (recommended when changing version) MIUI). Clean all and lock - cleaning + bootloader lock (only for power users!) save user data - saving user data (risky when switching to another version).
βοΈ Preparing MiFlash for work
4. Step-by-step instructions for firmware
When you are ready, follow this algorithm:
- Turn off your smartphone and press Volume Down + Power to enter fastboot. The screen should display the hare in the hat-eared (mode logo).
- Connect the device to the PC through the original USB-cable (use the port) USB 2.0 on the back of the system unit for stability).
- Run MiFlash on behalf of the administrator. The Device field should show the name of your model (e.g. sweet).
- Select firmware mode (clean all for most cases) and press Refresh to let the utility detect the device.
- Press Flash and wait for the process to be completed (usually 5-15 minutes).
- After success (Flash Done message), turn off the device and turn it on with the power button. The first start can take up to 10 minutes.
If a critical partition flashing is not allowed error appears in the log, it means you are trying to flash the locked device. Go back to the bootloader unlock step.
The firmware process is accompanied by a change in the color of the indicator on the smartphone:
- π΄ Red - Team waiting.
- π’ Green is a successful firmware.
- π΅ Blue - error (reconnection required).
What if MiFlash canβt see the device?
5. Typical errors and their solutions
Even with the correct instructions, errors can occur, and here are the most common ways to correct them:
| Mistake in MiFlash | Reason. | Decision |
|---|---|---|
| can't find 'flash_all.sh' | The wrong structure of the firmware folder | Unpack the firmware again, make sure that the folder has.bat and.sh files. |
| device not found | Drivers not installed or the device is not in fastboot mode | Reinstall drivers, check the connection (the red indicator should be on) |
| flash not done | Interrupted process or incompatible firmware | Try again with another firmware version, check the model code |
| anti-rollback check fail | Reversed to an older version of MIUI | Only use the new version or the one recommended for your model. |
If the device does not turn on after firmware or hung on the MI logo, try:
- π Repeat the firmware with the choice of clean all mode.
- π§ Switch another version MIUI (For example, instead of the Chinese, the Chinese).
- π‘ Use it. EDL-Mode (emergency download mode) via QFil utility (requires an authorized Xiaomi account).
β οΈ Attention: The anti-rollback error is one of the most dangerous, and it occurs when you try to install firmware older than the one already on the device. EDL or contacting a service center.
6. What to do after the firmware?
Successful firmware is only half the battle.
- Configure the device as new (do not restore the backup from the old firmware β this can lead to conflicts).
- Check the operation of key functions: πΆ Modem (calls, mobile Internet). π· Camera (all modules should be focused). π Charging (Make sure the battery is charging). π΅ Speakers and microphone.
Update the applications
Google Play
App Store
GApps
Lock the loader.
MiFlash
clean all and lock
If you have stitched the Chinese version of MIUI but want to use Google services, install Open GApps (choose arm64 for modern smartphones).
- Download GApps from OpenGApps (Nano or Pico version is recommended).
- Unpack the archive and run through fastboot with the command: fastboot flash system gapps.img
- Reset the device.
π‘
If the IMEI is missing after the firmware (no network), restore it using the engineering menu: dial ##4636## β Phone Information β Select SIM and enter the original IMEI (indicated on the box or under the battery).
7. Alternative methods of firmware
If MiFlash failed, consider alternative methods:
- π± Recovery firmware: through TWRP It is suitable for updating without loss of data, but requires an unlocked bootloader.
- π₯οΈ Fastboot commands manually: if MiFlash is buggy, you can flash each section separately: fastboot flash boot boot.img fastboot flash system system.img fastboot flash vendor vendor.img fastboot reboot
- π§ EDL-Mode: Emergency method for "brick" devices. Requires an authorized Xiaomi account and utility QFil or Mi Flash Pro.
For MediaTek processor devices (e.g. Redmi 9A or POCO C31), the SP Flash Tool is used instead of MiFlash. The algorithm is similar but requires separate drivers and a firmware scatter file.
π‘
EDL-The mode is the last chance to save the brick, but it requires authorization from Xiaomi. Unofficial methods of bypassing authorization (for example, through the Deep Flash Cable board) can lead to a breakage of the device.