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 interact with the phoneβs hardware directly without the operating system, which is especially useful when you crash, βbrickβ or want to install custom firmware. However, the process requires care: a mistake at any stage can turn the phone into a βbrickβ, and incorrect firmware can deprive you of warranty.
In this guide, we will take a look at the entire process from unlocking the bootloader to installing official or unofficial firmware via fastboot. You will learn what tools you need, how to avoid common errors (such as anti-rollback or version incompatibility), and what to do if something goes wrong. POCO 2018-2026, but taking into account the specific features of specific devices.
1. Firmware Preparation: What to Do Before Starting
Before you take action, make sure that all the preliminary steps are taken, which will save time and reduce risks.
Basic requirements:
- π± Battery charge of at least 60% (optimum 80%) When discharged during firmware, the device may turn off, leading to hardware failures.
- π» Computer on Windows 10/11 Linux (macOS may need additional drivers) Virtual machines are not recommended due to problems with the software. USB-connection.
- π Original. USB-Cheap cables often don't transmit data in fastboot mode.
- π Backup data: Firmware through fastboot usually erases internal memory (except with fastboot update for some firmware).
Also check your device model in settings (Settings) β The phone. β It's critical: the firmware from the Redmi Note 10 Pro is not suitable for POCO X3 Pro, even if they're on the same chipset. ADB:
adb shell getprop ro.product.modelβ οΈ Note: If your device was purchased in China (suffix version) CN), Global version of the firmware (Global or EEA) It can block the network or the camera. Check compatibility on the forums. XDA Developers or 4PDA.
2 Unlocking the bootloader (Bootloader)
Without an unlocked bootloader, it is impossible to flash Xiaomi through fastboot. The manufacturer blocks it by default to protect against unauthorized changes. The unlocking process is official, but requires waiting and linking the Mi Account account to the device.
Steps to unlock:
- Link your Mi Account to your phone: Go to Settings β Xiaomi Account and log in. Make sure that the developer settings (Settings β About Phone β MIUI Version β 7 times tap) include OEM Unlock and USB Debugging.
- Request permission to unlock: Download the official Mi Unlock Tool utility, log in to it with the same account and connect your phone in fastboot mode (clamp Volume down + Power when the device is off).
- Wait for confirmation: Xiaomi can block the unlock for 7-30 days (depending on model and region), during which time you can not reset your phone or change your account.
Once successfully unlocked, the phone will display Unlocked in fastboot mode, and you can start running the firmware.
β οΈ Warning: Unlocking the bootloader resets the device to factory settings. If you don't backup, the data will be lost).
What if the Mi Unlock Tool canβt see the device?
3. Selection of firmware: official MIUI or custom
Not only does the type of firmware affect the functionality, but also the stability of the device. Xiaomi offers several types of official firmware, and there are many custom ones (for example, LineageOS, Pixel Experience).
Types of official MIUI firmware:
- π± Recovery ROM β Lightweight version for installation via Recovery (not suitable for fastboot).
For firmware through fastboot, you need Fastboot ROM. You can download it on the official MIUI Downloads website or through Xiaomi Firmware Updater (there is an archive of old versions).
Custom firmware (such as LineageOS) requires:
- Unlocked bootloader.
- Installed custom Recovery (TWRP or OrangeFox).
- Compatible with the device model (check for XDA or 4PDA).
| Type of firmware | Advantages | Deficiencies | Is it good for fastboot? |
|---|---|---|---|
| Official MIUI (Fastboot ROM) | Stability, OTG support, warranty is maintained (unless the bootloader is unlocked) | May contain Bloatware, regional version restrictions | β Yes. |
| LineageOS (Pixel Experience) | Clean Android, regular updates, no ads | Camera, NFC or sensors may not work; there is no official support | β No, you do. TWRP) |
| Port from another device | Unique features (e.g. MIUI from Redmi K40 on POCO F3) | High risk of "bricking", bugs with sensors | β οΈ Possibly, but not recommended. |
π‘
If you are flashing Xiaomi with a MediaTek chipset (such as Redmi 9 or POCO M3), use the SP Flash Tool utility instead of fastboot.
4. Installation of necessary tools
To run through fastboot, you will need:
- π₯οΈ ADB And Fastboot, which is a tool for interacting with the device, can be downloaded as part of Android. SDK Platform-Tools.
- π Firmware in.tgz format (unpack it into a folder with fastboot).
- π§ Drivers for your device (usually installed automatically when you first connect in fastboot mode).
How to install ADB/Fastboot:
- Download Platform-Tools and unpack to the root of the disk C:\platform-tools\.
- Add a path to the folder to the PATH environment variable: This computer β Properties β Additional System settings β Environment variables β PATH β Add β C:\platform-tools
- Check the work, open it. CMD and entering: fastboot --version The utility version should be displayed.
For Linux, installation is even easier β just perform:
sudo apt install adb fastbootβ οΈ Note: If you are using Windows, disable driver signatures before connecting your device in fastboot mode. CMD (on behalf of the administrator) do: bcdedit /set nointegritychecks on After firmware return settings back with bcdedit command /set nointegritychecks off.
βοΈ Pre-firmware check
5. Step-by-step instruction: firmware via Fastboot
Now, to the process itself, make sure the phone is off and the battery is high enough.
Step 1: Transfer the device to fastboot mode
Press the buttons Volume down + Power on the phone turned off and hold for 5-10 seconds until the Mi Bunny logo with the words Fastboot appears.
Step 2: Connect to the PC and check the connection
Connect the phone to your computer and enter into the CMD:
fastboot devicesIf the device is determined (the serial number will appear), you can continue. If not, check the drivers and cable.
Step 3. Starting the firmware
Go to the folder with unpacked firmware and do:
- For Windows: fastboot flash all or (if there is a script) flash_all.bat
- For Linux/MacOS: chmod +x flash_all.sh./flash_all.sh
It'll take 5 to 15 minutes, and when it's done, it'll automatically restart. USB-cable and do not interrupt the process, even if it seems that the device is getting stuck - this can damage the boot partition.
Step 4. First setup
Once rebooted, the device will be as new as it is, you will need to go through the initial setup, and if the firmware was informal, you may have to manually stitch the vendor or modem (this is a separate topic).
π‘
If the firmware is interrupted with an anti-rollback error, you are trying to install an older version of MIUI than the one that was before, in which case you need to flash only those partitions that do not affect anti, or find firmware that is newer than the current one.
Typical errors and their solutions
Even with the exact following of the instructions, there can be problems.
| Mistake. | Reason. | Decision |
|---|---|---|
| fastboot: error: cannot load 'persistence.img' | The firmware file is damaged or not unpacked | Re-download the firmware and check the checksum (MD5) |
| Device not found or empty list in fastboot devices | Drivers are not installed, the cable is faulty | Try another port/cable, install drivers manually through Device Manager |
| This package is for "tissot" devices; this is a "surya" | The firmware is not suitable for your model. | Download the firmware specifically for your device code (e.g., surya for POCO X3) |
| phone is stuck on startup MI logo after firmware | Incompatibility of bootloader or modem versions | Sweep separately boot.img and dtbo.img from old firmware |
If the device does not turn on after the firmware ("brick"), try:
- Switch only boot.img and dtbo.img from the working firmware.
- Use the Mi Flash Tool with the Clean All option (Erase everything, including userdata).
- For MediaTek, use the SP Flash Tool with the scatter file.
β οΈ Note: If you have lost your firmware after IMEI If the network is not working, it means that the modem partition has been damaged. NVRAM (Look for backups on 4PDA forecast).
7. Custom Recovery firmware (TWRP) via Fastboot
If you plan to install custom firmware (like LineageOS), you first need to flash TWRP or OrangeFox. This is an alternative recovery that allows you to install informal builds.
Instructions:
- Download the TWRP image for your model from the official website (file with the extension.img).
- Transfer the phone to fastboot and connect to the PC.
- The command is fastboot flash recovery. twrp-3.7.0_12-0-surya.img (Replace the file name with yours).
- Immediately after the firmware, go to TWRP, holding Volume Up + Power. If you skip this step, the standard recap will rewrite TWRP.
In TWRP, you can make a backup of current firmware (Backup), flash custom firmware (Install), or modify system files.
π‘
So TWRP not reset when restarting, after installing it, patch disable_dm-verity_forceencrypt.zip (available XDA).
8.After firmware: optimization and verification
Successful firmware is only half the battle, so that the device works steadily.
- π Reset the settings (Settings) β Additionally. β Recovery and resetting) if stitched over the old system.
- πΆ Check the network and IMEI In *#06# If IMEI No, no, restore it through QCN-file (instructions are available on the 4PDA).
- π Calibrate the battery: fully discharge and charge the phone 2-3 times.
- π‘οΈ Update security: check for patches in Settings β The phone. β Updating the system.
If you have a custom firmware, install:
- Magisk for root rights (via TWRP).
- GApps (if not in the assembly) β a package of services Google.
- Core (optional) to improve performance or save charge.
To check the stability, use the following tests:
- #4636## - information about the battery and network.
- CPU Throttling Test (from Play Market) β check overheating.
- Geekbench β Performance assessment.
π‘
If the phone is quickly discharged or warmed after firmware, check the background processes in Settings β Battery. Often unoptimized services or an improperly stitched vendor are to blame.