Fastboot flashing is one of the most reliable ways to upgrade or restore a Xiaomi smartphone when standard methods donβt work, a method that can be used to install official and custom firmware, fix bugs after a failed air update, and return to the stock version of MIUI after experimenting with alternative builds, but it requires caution: wrong actions can turn the phone into a brick or take away warranties.
Unlike an update via Recovery, Fastbootβs firmware interfaces directly with the hardware, which gives you more control but also increases the risk. In this article, we will discuss the entire process from preparation to final installation, including the nuances of unlocking the bootloader, choosing the right version of the firmware and solving typical errors, POCO F5 Xiaomi 13, where the procedure has its own features.
1. Firmware Preparation: What to Do Before Starting
Before you start firmware, make sure that all the preliminary steps are followed. Skipping at least one item can cause failures or inability to complete the process.
First, back up all your data. Fastboot completely erases your device's internal memory, including photos, contacts, and apps. Use Mi Cloud, Google Drive, or physical copying on your PC. This is especially critical for devices with a locked bootloader, since once unlocked, the data will be lost irretrievably.
Second, check the current firmware version and device model. This can be done from Settings β Phone β MIUI version and Device Model. Write down this data, which you will need to select the correct firmware file. For example, Redmi Note 11 Pro+ 5G (codename veux) and POCO X5 Pro (codename redwood) require different packages.
- π± Find out the code name of your device (for example, surya for the device). POCO X3). You can find the list on sites like Xiaomi Firmware Updater.
- π Charge the phone to at least 60%. interruption of the process due to battery discharge can make the device inoperable.
- π₯οΈ Prepare a PC with Windows 10/11 You can have driver problems on macOS. ADB/Fastboot.
- π Use the original. USB-Cheap cables may not provide stable connectivity.
β οΈ Note: If your device was purchased in China (market version) CN), firmware MIUI It can block the network due to differences in modem software. Before firmware, check compatibility on forums like 4PDA or XDA Developers.
2 Unlocking the bootloader: a mandatory step for firmware
Most Xiaomi smartphones are sold with a locked bootloader, a security measure that prevents unofficial software from being installed. To flash the device through the Fastboot, the bootloader must be unlocked, with the exception of some models for the EEA market (Europe), where unlocking may not be required for official firmware.
The unlocking process involves two steps: linking the Mi Account to the device and actually unlocking through the Mi Unlock Tool. Importantly, Xiaomi has introduced a restriction - after linking the account, you need to wait 72-168 hours (3-7 days) before unlocking, this rule has been in effect since 2022 and applies to all new models.
Instructions for unlocking:
- Turn on Developer Mode: Go to Settings β About Phone and click on MIUI Version 7 times.
- Back to Settings β Additionally. β For developers and activate OEM-unlocking and debugging USB.
- Connect the phone to the PC, confirm the debugging permission on the device screen.
- Download Mi Unlock Tool, log in to your Mi Account (should match the one tied to your phone).
- Turn the phone into Fastboot mode (turn it off, then press Volume Down + Power).
- In Mi Unlock Tool, press Unlock and wait until the end (if the wait time has not expired, an error message will appear).
β οΈ Note: Once the bootloader is unlocked, all data, including accounts and files in internal memory, will be deleted from the device, and this will also void Xiaomiβs warranty in most regions. For Redmi Note 10 Pro (sweet) and newer models, unlocking can lead to blocking data encryption (FDE), This will require additional steps when installing custom firmware.
What if the Mi Unlock Tool gives you a "Couldn't unlock" error?
3. Selection of firmware: official vs custom
Not only does the type of firmware affect the functionality of the device, but also the stability of its operation. Xiaomi offers several types of official firmware:
- π Global Stable is the official firmware for the international market, supports Google Services, but is updated less often.
- π¨π³ China Stable is a firmware for the Chinese market, without Google Services, but with more recent updates MIUI.
- π§ͺ Global/China Beta β test builds with new features, but bugs are possible.
- π¦ Fastboot ROM β complete firmware package via Fastboot (extension.tgz or.zip).
- π Recovery ROM β Package for installation via Recovery (not suitable for our task).
Fastboot requires a file marked Fastboot in the title, and it is recommended to download firmware from official sources:
- The official MIUI website (select Download full ROM package).
- Xiaomi Firmware Updater (alternative source with archived versions)
Custom firmware (e.g. LineageOS, Pixel Experience) requires additional knowledge and often does not support all of the deviceβs features (e.g. NFC or full-power camera) and may require a TWRP or modified Fastboot script to install them.
| Type of firmware | Advantages | Deficiencies | Suitable for |
|---|---|---|---|
| Official Global Stable | Maximum stability, support OTA-update | Long wait for updates, regional restrictions | Users who need reliability |
| Official China Stable | More recent features, frequent updates | No Google Services, language problems are possible | Enthusiasts ready to install GApps manually |
| Castomic (AOSP) | Pure Android, no Bloatware, advanced settings | There is no guarantee of stability, possible bugs with iron | Advanced users, developers |
π‘
If you are flashing a device with MediaTek (like the Redmi Note 11 or POCO M4 Pro), download the firmware strictly for your version of the chipset. Installing firmware for Snapdragon on MediaTek (and vice versa) will cause the device to fail.
4. Installation of drivers and tools on the PC
For successful firmware through Fastboot, the PC must have:
- ADB/Fastboot drivers provide communication between the PC and the phone in boot mode.
- Platform Tools is a set of utilities from Google, including fastboot and adb.
- Mi Flash Tool (optional) is the official utility from Xiaomi for firmware through Fastboot.
Download Platform Tools (unclick to the root of the C:\platform-tools drive) and Mi Flash Tool. Drivers can be installed automatically via the Mi Flash Tool or manually:
For manual installation of drivers:
- Connect your phone in Fastboot mode (clip Volume Down + Power when the device is off).
- Open Device Manager on your PC, and find a device with an exclamation point (usually Android or Other devices).
- Update the driver by specifying the folder with drivers from the Mi Flash Tool or Platform Tools.
Check the functionality of the connection by performing in the command line (from the platform-tools folder):
fastboot devicesIf the device is displayed (for example, 1234abcd fastboot) β the drivers are installed correctly.
The device is more charged. 60%|Drivers. ADB/Fastboot fixed|The firmware file is downloaded and unpacked|Backup copy of data created|The bootloader is unlocked (if required)-->
5. Step-by-step instructions for firmware through Fastboot
Now, to the firmware process itself, we'll look at two methods: through the Mi Flash Tool (recommended for beginners) and through the command line (for power users).
Method 1: Firmware with the Mi Flash Tool
- Unpack the downloaded firmware (.tgz or.zip) into a folder without Cyrillic characters (for example, C:\MIUI\proshivka).
- Run the Mi Flash Tool on behalf of the administrator.
- Connect the phone in Fastboot mode (the screen should display the hare in the hat-eared).
- In the Mi Flash Tool, click Select and specify the folder with the unpacked firmware.
- Select firmware mode: Clean all - complete cleaning (recommended for changing the version of MIUI); Clean all and lock - cleaning + lock bootloader (only for official firmware!); Save user data - data storage (not always working correctly).
Flash
Method 2: Firmware through the command line
This method gives you more control, but requires knowledge of commands. Open the command line in the firmware folder and do:
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash dtbo dtbo.img
fastboot flash vbmeta vbmeta.img
fastboot erase userdata
fastboot rebootSome devices (such as Xiaomi 12) may require an additional command to run modem and bluetooth firmware:
fastboot flash modem modem.img
fastboot flash bluetooth bluetooth.imgβ οΈ Note: If the firmware is interrupted at the stage system.img or vendor.img, Try repeating the command or restarting the PC and phone, then start over. Interrupting at this stage often leads to a bootloop cycle).
π‘
Always check the integrity of the downloaded firmware (compare the MD5 hash amount). A damaged file can cause firmware errors or unstable device performance.
Typical errors and their solutions
Even if you follow the instructions, you can make mistakes, and let's look at the most common ones and how to fix them.
| Mistake. | Reason. | Decision |
|---|---|---|
| fastboot: error: cannot load 'boot.img' | The firmware file is damaged or not unpacked | Check the integrity of the archive, unpack again |
| Mi Flash: "Flash done. Unlock fail" | The bootloader is not unlocked or the account is not tied | Repeat the unlocking with the Mi Unlock Tool |
| The phone does not turn on after the firmware (bootloop) | Incompatible firmware or interrupted process | Repeat the firmware by selecting Clean All |
| fastboot: error: Failed to boot into fastbootd | Problems with drivers or cable | Reinstall the drivers, try another one. USB-port/cable |
If the device does not boot after firmware or hangs on the MI logo, try:
- Perform a hard reset (clip Volume up + Power for 10-15 seconds).
- Switch the device over again by selecting a different mode in the Mi Flash Tool (e.g. Clean all and lock).
- Install firmware through Recovery if Fastboot doesn't help.
For models with Dynamic Partition (e.g. Xiaomi 11T Pro, vili), an additional command may be required:
fastboot flash super super.img7.After firmware: first settings and verification
Once the firmware is successful, the device will automatically restart, and it can take up to 10 minutes to start up, which is normal.
- π Do not restore data from the backup immediately. First check the stability of the firmware.
- πΆ Check the network and mobile Internet. If there is no signal, it may be that the firmware is incompatible with your region (especially for Chinese versions).
- π Charge the device to 100% and let it run for 1-2 hours to assess stability.
If you have a custom firmware, you may need to:
- Install GApps (Google Services) via Recovery.
- Set up Magisk to obtain root rights (optional).
- Calibration of the battery (discharge to 0% and charge to 100% without interruption).
To check the correctness of the firmware:
- Go to Settings β About the phone and make sure that the version of MIUI matches the installed one.
- Test the basic features: calls, camera, Wi-Fi, Bluetooth, NFC (if any).
- Check for updates in Settings β System Update.
π‘
If after firmware the device began to discharge faster, reset the battery statistics through Recovery (wipe β Battery Stats).