Fastboot is one of the most reliable ways to install official or custom software when standard upgrade methods donβt work, and itβs suitable for rebuilding bricks, changing regional firmware, or installing a new version. MIUI wait OTA-However, the process requires care: an error at any stage can lead to complete failure of the device.
Unlike firmware via Recovery, Fastboot interacts directly with the phoneβs hardware, which allows you to bypass the limitations of a locked bootloader (if it is unlocked). In this article, we will examine the entire process β from driver preparation to the final reboot β and also look at typical errors and their solutions. 12/13/14 series, Redmi Note 11/12 and POCO F4/F5, Since their firmware has nuances due to the new Qualcomm Snapdragon chipsets 8 Gen 2/3 MediaTek Dimensity.
1. Firmware Preparation: What to Do Before Starting
Before you start taking action, make sure that all the preliminary steps are followed, and ignoring them can make it impossible to restore the device through official Xiaomi service centers if something goes wrong.
First, check the status of the bootloader. Most Xiaomi devices have it locked by default. To flash the phone through Fastboot, it must be unlocked through the official Mi Unlock Tool. Except for some models for the Chinese market (for example, Xiaomi 13 Ultra), where unlocking can take up to 360 hours of waiting.
- π Battery charge at least 60 percent, and firmware can take up to 30 minutes, and it will fail in the process.
- π» Computer on Windows 10/11 (recommended macOS/Linux Linux may require additional fastboot and adb packages.
- π Backup of all important data. Fastboot firmware completely erases internal memory (except for the memory). SD-maps, if they are installed).
- π Original. USB-Cheap cables may not provide stable connections, leading to an error. FAILED (remote: 'command not allowed').
β οΈ Note: If your device was purchased in China (C-suffix version in model, for example Redmi Note) 12 Pro+ C), global firmware version MIUI can block the network 4G/5G Because of the differences in modem firmware, check the compatibility on the forum before you start. XDA Developers.
Also download the necessary tools:
- π₯ Mi Unlock Tool (to unlock the bootloader if it is blocked).
- π₯ Platform Tools (archived with fastboot and adb from Google).
- π₯ Firmware for your model (official or custom). Download only from trusted sources: Xiaomi official website (choose the Fastboot version). Xiaomi Firmware Updater (alternative source with firmware archives).
2. Unlock the loader (if required)
Most Xiaomi devices come with a locked bootloader, a security measure that prevents unofficial software from being installed. To flash a phone through Fastboot, the bootloader must be unlocked, except for devices purchased from official stores with the bootloader already unlocked (rare).
The unlocking process includes several stages:
- Link your Mi Account to your device in Settings β Xiaomi Account β Mi Cloud.
- Enable Developer Options (7 times click on the MIUI version in Settings β About Phone).
- Activate OEM Unlock and USB Debugging in Settings β Additional β For Developers.
- Connect your phone to your PC and start the Mi Unlock Tool by following the program instructions.
Important: Once the bootloader is unlocked, all data on the device will be erased. Also note that Xiaomi may limit the number of unlocks for a single account (usually no more than 1 device in 30 days).
β οΈ Note: Some models (e.g. Xiaomi) 13T Pro) after unlocking the bootloader may stop working Widevine function L1, What will reduce the quality of streaming on Netflix and Disney+ before 480p. It is incorrigible without re-locking the bootloader.
What if the Mi Unlock Tool canβt see the device?
3. Installation of drivers and setup of Platform Tools
To work with Fastboot, the computer must have the appropriate drivers and tools installed. Even if you have previously used adb, you will need a separate firmware setting.
Download and unpack the platform-tools to the root of the disk C:\ (for example, C:\platform-tools\). It'll make it easier to work with the command line:
- Connect your phone in Fastboot mode (clip Volume Down + Power when the device is off).
- Open Device Manager on PC. The list should include Android Bootloader Interface or Other Devices β Android with a yellow exclamation point.
- Update the driver manually by specifying the path to the platform-tools\drivers folder (if the drivers are not installed automatically).
Check the connection by running in the command line (Win + R β cmd):
cd C:\platform-tools\
fastboot devicesIf the device is determined (the serial number will appear), you can proceed to the firmware. If not, check the cable, port or drivers.
| Problem. | Possible cause | Decision |
|---|---|---|
| fastboot devices do not show the device | Drivers not installed | Install Android Bootloader Interface driver manually through Device Manager |
| Error waiting for any device | USB-Debugging is not enabled or the cable is faulty | Check the cable, turn on debugging, try another port |
| The device is determined, but the firmware does not begin | bootloader locked | Unlock the bootloader through the Mi Unlock Tool |
| Mistake. FAILED (remote: 'Flashing is not allowed') | Incompatible firmware or MIUI version | Download the firmware for your model and region |
brew install android-platform-tools
sudo apt install fastboot
4. Step-by-step instruction: firmware via Fastboot
When you're done, you can start running the firmware. We'll look at the process with the official MIUI Fastboot firmware. For custom firmware (like LineageOS or Pixel Experience), the steps may differ, usually requiring custom recovery (like TWRP) to be pre-installed.
Unpack the downloaded firmware (a file with the.tgz or.zip extension) into the platform-tools folder. flash_all.bat (for Windows or flash_all.sh (for macOS/Linux).
βοΈ Pre-firmware check
Follow the following commands in the command line (for Windows):
cd C:\platform-tools\
fastboot getvar product # Checking the device model
flash_all.bat # Run the firmware scriptIt takes 5 to 20 minutes depending on the model. Don't turn off the cable or interrupt the firmware! When it's done, the phone will automatically restart. It can take up to 10 minutes for the first turn on, which is normal.
β οΈ Attention: If the script flash_all.bat Issue of missing error system.img, Your firmware is damaged or not intended for Fastboot.
π‘
Use the script. flash_all_except_storage.bat, If you donβt want to format internal memory (for example, when upgrading without reset), however, this can lead to conflicts if the Android version changes (for example, with the help of a new version of Android). 12 on 13).
5. Typical errors and their solutions
Even if you follow the instructions strictly, you can get errors, most of them are related to firmware incompatibility, driver problems, or a locked bootloader.
Mistake: FAILED (remote: 'Flashing is not allowed in Lock State')
This error means that the bootloader is locked.
- Unlock the bootloader through the Mi Unlock Tool (see section 2).
- If the device is already unlocked but the error remains, try reconnecting the phone to Fastboot mode and repeat the command.
Mistake: FAILED (remote: 'command not allowed')
Most commonly occurring on new models (Xiaomi 13/14, Redmi Note 12) due to Anti-Rollback protection.
- π Install firmware of the same or newer version than the current one.
- π₯ Download the firmware marked Anti-Rollback (available on Xiaomi Firmware Updater).
Mistake: FAILED (remote: 'device is locked. Cannot flash images')
Similar to the first error, but can occur even after unlocking.
- Check the status of the bootloader command: fastboot oem device-info Device unlocked: true strings must be without false.
- If the bootloader is unlocked but the error persists, try using the command: fastboot flash. unlock_critical (It does not work on all models).
If neither method worked, check out the XDA Developers forum or Xiaomi support β your model may have unique limitations.
6. firmware custom ROM (LineageOS, Pixel Experience, etc.)
Install custom firmware via Fastboot is possible, but requires additional steps. Unlike the official MIUI, here you often need to pre-installe custom recovery (for example, TWRP), and then sew the ROM itself.
Common algorithm:
- Unlock the loader (required!).
- Please. TWRP Fastboot: Fastboot Flash Recovery twrp.img fastboot boot twrp.img
- In TWRP, reset (Wipe β Format Data).
- Copy custom firmware files to your phone and install them via TWRP.
Important: Custom firmware may not support some features (e.g. NFC on POCO F4 or cameras on Xiaomi 12 Pro).
β οΈ Note: On devices with a MediaTek chipset (e.g. Redmi Note 11 Pro)+ 5G) Custom Recovery Can Lead to Loss IMEI. It can only be restored through a service center.
7.Recovery after failed firmware
If the firmware is interrupted or the device is not turned on (called a "brick"), do not panic.In most cases, Xiaomi can be restored via Fastboot or EDL-Mode (Emergency Download Mode).
Recovery methods:
- π Re-firmware: Try flashing the device again using the same version MIUI.
- π οΈ EDL-Mode: Connect the device turned off to the PC by clamping Volume up + Loudness down + The device should be identified as Qualcomm. HS-USB QDLoader 9008. For firmware in this mode, you need an authorized Xiaomi account and a special Mi Flash Tool tool.
- π Service center: if self-recovery failed, contact the official service. The cost of repairing a brick is usually 30-50% of the price of the device.
For models on Qualcomm Snapdragon (most of Xiaomiβs flagships), EDL recovery is possible even with completely erased firmware. MediaTek is more complicated β soldering equipment may be needed to flash through the SP Flash Tool.