Installing firmware via Fastboot is one of the most reliable ways to upgrade or restore a Xiaomi smartphone when standard methods donβt work, and it allows you to flash the device even when the system doesnβt boot, there are critical errors or you need to roll back on the previous version of MIUI. However, the process requires care: wrong actions can turn the phone into a brick.
Unlike Recovery, Fastboot provides low-level access to the deviceβs memory, which allows you to bypass the limitations of a standard upgrade, but there are nuances: you need an unlocked bootloader, the right firmware and follow the instructions carefully. In this article, we will discuss the entire process from preparation to final verification, and also look at typical errors and how to fix them.
1. Firmware Preparation: What to Do Before Starting
Before you start running your firmware through Fastboot, make sure that all the preliminary steps are followed, which minimizes the risks and simplifies the process.
First, check your Xiaomi model and its code name (e.g., Redmi Note 10 Pro is sweet, Poco X3 Pro is vayu). You can find it in the settings (Settings β Phone β MIUI β Model) or through the fastboot getvar product command in the terminal. Using firmware for another model will cause the device to fail.
- π The battery charge is at least 50 percent, and the firmware can take up to 30 minutes, and the discharge in the process will interrupt the operation.
- π» Windows computer 10/11 (recommended macOS/Linux. Windows will require Mi Flash Tool drivers.
- π₯ Firmware in.tgz or.zip format for your model. download only from official sources (Xiaomi Firmware Updater or Xiaomi Firmware Updater).
- π Unlocked bootloader. Without this, the Mi Flash Tool won't be able to flash the device.
β οΈ Note: If you are flashing a device with a locked bootloader, first unlock it through the Mi Unlock Tool.The process takes up to 720 hours (30 days) of waiting for new Mi accounts.
Also prepare a USB cable (preferably the original) and disable the antivirus - it can block the Mi Flash Tool as potentially dangerous software. If you use a laptop, connect it to the network: a sudden power outage during firmware can damage the phone.
2 Unlocking the bootloader: a mandatory step before the firmware
The bootloader on Xiaomi smartphones is locked by default, a security measure, but it also makes it harder to run through Fastboot. Unlocking requires linking the Mi Account to the device and waiting (up to 30 days for new accounts).
The unlocking process:
- Download the Mi Unlock Tool and install it on PC.
- Turn on the phone Developer Mode (7 times click on the MIUI version in the settings) and activate OEM Unlock in Settings β Additional β For developers.
- Link your Mi Account to your device in Settings β Xiaomi Account β Mi Cloud.
- Launch the Mi Unlock Tool, log in to your account and connect your phone in Fastboot mode (clip Volume Down + Power when your phone is off).
- Press Unlock and wait until it's finished. If you get a wait message, try again after the time.
β οΈ Warning: Once the bootloader is unlocked, all data on the phone will be reset. Backup through Settings β Additionally. β Backup and reset.
If you already have the bootloader unlocked, skip this step. You can check the status by the command:
fastboot oem device-infoIn the answer, look for the line Device unlocked: true.
π‘
If the Mi Unlock Tool gives you a "Couldn't unlock" error, try using another one. USB-port or disable driver signatures in Windows via bcdedit /set nointegritychecks on (requires administrator rights).
3. Selection of firmware: official vs custom
The type of firmware depends on the stability of the device.
- π¦ Official firmware from Xiaomi (MIUI Stable/Developer). They are tested and optimized, but may contain bloatwar (pre-installed applications).
- π οΈ Custom firmware (e.g. LineageOS, Pixel Experience) gives more freedom, but requires experience and can work unstablely.
- π Downgrade Firmware, which allows you to go back to the previous version MIUI, if the new one is working with errors.
For beginners, we recommend official firmware.
| Source | Type of firmware | Reference |
|---|---|---|
| Official Xiaomi website | Stable/Developer | mi.com |
| Xiaomi Firmware Updater | Stable/Developer (archive) | xiaomifirmwareupdater.com |
| 4PDA (forum) | Castomic, ported | 4pda.to |
| SourceForge | Informal assemblies | sourceforge.net |
Pay attention to the firmware version:
- Stable is a stable version, suitable for everyday use.
- Developer is a test version with new features, but bugs are possible.
- Fastboot is a firmware for installation via Fastboot (file with the extension.tgz or.zip).
- Recovery is a firmware for installation via Recovery (not suitable for our method).
What is the danger of firmware from third-party sources?
4. Installation of drivers and Mi Flash Tool
Fastboot requires drivers to connect your phone to your PC, and Windows automatically installs them when you connect your device, but there are often problems. Here's how to fix them:
Download the Mi Flash Tool and unpack the archive.
- Connect your phone in Fastboot mode (clip Volume Down + Power when the phone is off).
- Open Device Manager in Windows (Win + X β Device Manager).
- Find a device with an exclamation point (usually Android Bootloader Interface or Other devices).
- Update the driver manually by specifying a folder with the Mi Flash Tool (for example, C:\MiFlash\driver).
If the driver is not installed:
- π§ Turn off driver signature verification in Windows (Perform) β gpedit.msc β User configuration β Administrative templates β System system β Installation of the driver β Disable the check).
- π Restart the PC and reconnect.
- π₯οΈ Try another one. USB-port USB 2.0, because USB 3.0 sometimes conflicts).
After installing the drivers, run the Mi Flash Tool on behalf of the administrator. The program must identify the connected device in the list.
Download the latest version of Mi Flash Tool| Unpack the archive to the root of the drive C:|Install drivers manually | Connect your phone in Fastboot mode | Run Mi Flash Tool on behalf of the administrator-->
5. Step-by-step instruction: firmware via Fastboot
Now, to the process itself, follow the instructions carefully, because errors at this point can lead to a brick in the device.
Step. 1: Unpack the downloaded firmware (.tgz or.zip) into a folder without Cyrillic characters (for example, C:\MiFlash\ROM). There's gotta be a file inside. flash_all.bat (for Windows or flash_all.sh (for macOS/Linux).
Step 2: Open the Mi Flash Tool and:
- Click Select and point the way to the folder with unpacked firmware.
- At the bottom, select firmware mode: Clean all β complete clean (deletes all data, including internal memory); Clean all and lock β clean + lock the bootloader (not recommended if you plan to further manipulate); Save user data β save user data (not always working correctly).
Refresh
Flash
Step 3: Once finished, the phone will automatically restart. The first launch can take up to 10 minutes - don't interrupt the process!
β οΈ If the Mi Flash Tool is an error 0x80070002 or 0x80004005, Check: Correctness of the firmware selected (for your model!). Archive integrity (jump if files are corrupted). USB 2.0 (not 3.0).
π‘
Always use Clean All mode when running through Fastboot if you want to avoid conflicts between old and new system files. Save user data mode can cause crashes due to incompatibility of settings.
Typical errors and their solutions
Even with the exact following of the instructions, there can be problems.
| Mistake. | Reason. | Decision |
|---|---|---|
| This package is for "XXX" devices; this is a "YYY". | The firmware is not suitable for your model. | Download the firmware for the correct device code (e.g., suryain instead of surya). |
| Flash is not done. Reboot the device manually. | The firmware process or driver error is interrupted. | Reboot your phone to Fastboot and try again. USB-connection. |
| The phone does not turn on after the firmware (black screen). | Incompatible firmware or error when writing partitions. | Repeat the firmware with Clean all mode. If it doesn't work, run through EDL (requires an authorized account). |
| MiFlash can't see the device. | There are no drivers or USB issues. | Install drivers manually (see section 4) or try another cable/port. |
If the phone boots up after firmware, but there are errors (e.g., the camera or mobile network is not working), it is likely that the firmware was assembled without considering the hardware features of your model.
- π Check the firmware version for compliance with the region (Global, China, EEA).
- π Try flashing another build (e.g. Stable instead of Developer).
- π± Reset the settings to factory (Settings) β Additionally. β Backup and reset).
For complex cases (such as hard bricks when the phone doesnβt respond to buttons), you may need to run through EDL (Emergency Download Mode), a technique that requires special hardware (Qualcomm HS-USB QDLoader 9008) and an authorized Xiaomi account.
7. Verification of the result and further actions
After a successful firmware, you need to make sure that everything works correctly.
- π± Check the basic functions: calls, SMS, mobile Internet, Wi-Fi, Bluetooth.
- π· Test the camera: take a photo on the main and front cameras, check the video recording.
- π Make sure the battery is running smoothly: If the phone is quickly discharged or overheated, it may not be the firmware that is optimized.
- π Check the status of the bootloader: if it is locked (fastboot oem device-info), unlock it again if you plan to further manipulate it.
If everything is working properly, you can start setting up the phone:
- Sign in to your Mi Account (if required).
- Restore the data from the backup (if you did a backup).
- Update your apps through Google Play.
- Set up your fingerprint/face (if supported).
If you have flashed the Developer version of MIUI, note that it may contain bugs. Keep an eye out for updates in Settings β About Phone β System Update. To return to the Stable version, repeat the firmware via Fastboot with the corresponding package.
π‘
After the firmware is installed, it is recommended to calibrate the battery: completely discharge the phone before turning off, then charge to 100% without interruption, which will help the system correctly determine the level of charge.