Fastboot is the standard way to restore or update your smartphone when your device is not booting or you need a clean install. However, most guides assume that the bootloader is already unlocked, a procedure that erases all data and requires you to link to your Mi Account. But what if unlocking is impossible (for example, due to a forgotten password) or simply undesirable?
In the case of Xiaomi Mi A2 (codename jasmine_sprout) There is a workaround: Fastboot firmware using official packages that bypass bootloader status checks, which works because of Xiaomi's device architecture and policy for Android One models. It is important to understand that this method is not suitable for installing custom firmware - only for official versions. MIUI orthod.
Before you start, consider that the procedure requires precise execution of commands and can lead to data loss or even a βbrickβ of the device if the wrong firmware is selected. In this article, we will analyze Step-by-step how to flash the Mi A2 through the Fastboot, what tools you will need and how to avoid typical errors.
Why Fastboot Firmware Is Possible Without Unlocking the bootloader
Xiaomi Mi A2 is part of the Android One lineup, which has an impact on its software architecture. Unlike Xiaomiβs classic MIUI devices, it uses pure Android with minimal modifications.
- π The default bootloader has less stringent firmware integrity checks than the devices on the MIUI.
- π¦ Official firmware packages for Mi A2 Contain scripts that ignore the bootloader lock status when installed via Fastboot.
- π The firmware process does not require confirmation through Mi Account if the original package from Xiaomi is used.
However, this does not mean that you can install any version of the software. For example, trying to flash the Mi A2 firmware from Mi A2 Lite (codename daisy) will lead to the device failure, and you can not install custom recavators (for example, TWRP) or informal builds - for this, unlocking the bootloader is mandatory.
Another nuance: Once you have Fastboot running without unlocking, the bootloader will remain locked, meaning that in the future you wonβt be able to install unofficial firmware or modifications until you have completed the standard unlock procedure through the Mi Unlock Tool.
What you need for the firmware
Before starting the procedure, make sure you have everything you need, and the absence of at least one of the components can cause the device to fail or malfunction after the firmware is installed.
- π± Smartphone Xiaomi Mi A2 with a battery charge of at least 50% (to avoid shutdown during the process).
- π» Computer running Windows 7/10/11 (for Linux/macOS Additional adjustments will be required).
- π Cable USB Type-C (preferably original or high-quality to avoid communication breakdowns).
- π Official firmware for Mi A2 in.tgz or.zip format (you can download from the Xiaomi website or through the Mi Flash Tool tool).
- π οΈ Utility: Mi Flash Tool (for Windows) or Fastboot from Android SDK Platform Tools.
- π Qualcomm drivers HS-USB QDLoader 9008 (installs automatically when connected in Fastboot mode).
Pay special attention to firmware selection. There are two main branches for the Mi A2: MIUI (if you want to upgrade from Android One) and Android One (Google's stock firmware), which you can't mix, which will lead to loading errors.
| Type of firmware | Android version | Download link | Notes |
|---|---|---|---|
| Android One (stack) | 10.0 (last official) | Xiaomi Firmware | Suitable for restoring βcleanβ Android |
| MIUI Global Stable | 12.5 (based on Android 10) | Official Xiaomi website | Requires a transition from Android One via Fastboot |
| MIUI China Stable | 12.5 (Android 10) | Xiaomi Firmware | Contains Chinese services, not recommended for global models |
If youβre not sure which firmware is installed now, check this in the settings: Settings β About Phone β MIUI Version (if MIUI) or Settings β System β System Update (if Android One).
π‘
Before downloading the firmware, check its hash (MD5) with HashMyFiles or similar. This will help avoid errors due to corrupted files.
Preparation of a smartphone and a computer
Before you run the firmware, you have to prepare both the device and the PC, and let's start with the smartphone.
- Turn off the Xiaomi Mi A2.
- Press the Volume Down + Power buttons at the same time and hold them for 10-15 seconds until the Fastboot logo appears.
- Connect your phone to your computer via a USB Type-C cable.
Now set up the computer:
- π₯οΈ Install the Mi Flash Tool (if you use it) or unpack Android SDK Platform Tools in a separate folder (for example, C:\platform-tools).
- π Make sure Qualcomm drivers are installed.If the device is not identified, download them manually from the Qualcomm site or through DriverPack Solution.
- π Unpack the downloaded firmware in a folder without Cyrillic characters (for example, C:\MiA2_Firmware).
To check that the phone is correctly identified in Fastboot mode, open the command prompt (Win + R β enter cmd) and execute the command:
fastboot devicesIf you see a serial number (e.g. 1234567890abcdef fastboot) in response, it's set up correctly. If not, check the cable, USB port, or reinstall the drivers.
Make sure the battery is 50%+ charged
Download the correct firmware for Mi A2
Install Mi Flash Tool or Platform Tools
Connect your phone to Fastboot mode
Check the detection of the device by the command fastboot devices-->
Step-by-step instructions for firmware through Fastboot
Now, to the firmware itself, we'll look at two ways: through the Mi Flash Tool (easier for beginners) and through the command line (more control).
Method 1: Firmware with Mi Flash Tool
- Run the Mi Flash Tool on behalf of the administrator.
- In the Select field, specify the path to the folder with unpacked firmware.
- At the bottom of the window, select firmware mode: Clean all β complete cleaning (recommended when changing the Android version); Clean all and lock β cleaning + lock the bootloader (donβt choose this item!); Save user data β saving user data (does not always work correctly).
Refresh
Mi A2
Flash
Once the firmware is successful, the phone will automatically restart. The first run can take up to 10 minutes -- that's okay.
Method 2: Firmware through the command line
This method gives you more flexibility, but it requires accuracy. Open the command line in the Platform Tools folder and execute the commands in order:
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash dtbo dtbo.img
fastboot flash vbmeta vbmeta.img
fastboot rebootIf the firmware contains additional sections (for example, modem.img or bluetooth.img), You also need to stitch them separately. You can see the full list of files in the firmware in the file. flash_all.bat (for Windows or flash_all.sh (for Linux/macOS).
What if the Mi Flash Tool canβt see the device?
Common mistakes and their solutions
Even with the correct following of the instructions, errors can occur, and let's look at the most common ones and how to fix them.
- β Device not found error: Reason: the computer does not recognize the device in Fastboot mode. Solution: check the cable connection, reinstall the drivers, or try another port USB.
- β Flash not allowed in locked state: Reason: Trying to flash an unofficial firmware or modified image. Solution: use only official firmware for Mi A2.
- β Hanging on Xiaomi logo after firmware: Reason: incompatible firmware versions or corrupted files Solution: repeat firmware with full cleaning (Clean all).
- β Invalid sparse file format at header error: Cause: corrupted file system.img or vendor.img. Solution: Download the firmware again and check its hash sum.
If the phone doesnβt turn on or boots into a bootloop (cyclical reboot) after firmware, try the following steps:
- Enter Fastboot (Loudness Down + Nutrition).
- Run the command: fastboot erase userdata (this will reset the settings, but save the firmware).
- Refuse the device.
π‘
If the firmware is interrupted in the middle, DO NOT TRY to restart the phone. Connect it to the PC again and repeat the process from the beginning.
What to do after a successful firmware
Once the firmware is complete, the device will automatically restart. The first download can take up to 10-15 minutes, which is normal because the system adjusts the file structure.
When the phone boots:
- π± Perform the initial setting (choose language, connect to Wi-Fi, log in to Google account).
- π Check the firmware version in Settings β The phone.
- π If you've been stitching MIUI On top of Android One, you may need to reset to factory settings (Settings) β System system β Resetting settings).
- π² Install the required applications and restore data from the backup (if it was created).
If you notice unstable work (such as spontaneous reboots or application errors), this may indicate incomplete partition firmware (repeat the process with a full cleanup) or version incompatibility (download another firmware).
Also, pay attention to the status of the bootloader. To check its status, follow the command:
fastboot oem device-infoIn the answer, look for the line Device unlocked: false β this means that the bootloader remained locked.
fastboot erase modemst1
fastboot erase modemst2Then reflash the modem and fsg sections from the original firmware.-->
Can I flash custom firmware without unlocking the bootloader?
No, installing custom firmware (e.g. LineageOS, Pixel Experience or HavocOS) on the Xiaomi Mi A2 requires you to unlock the bootloader.
- π Castom firmware modify system partitions, which is blocked by the bootloader in the locked state.
- π For installation TWRP or other recavator also requires an unlocked loader.
- π« Trying to flash custom software through Fastboot without unlocking will lead to a Signature verification failed error.
The only exception is patches via Magisk (such as root or kernel modifications), but they are installed on top of the official firmware and do not require a complete system replacement. However, even this will require temporary unlocking of the bootloader or exploiting vulnerabilities (which is not recommended due to the risk of "briefing").
If you want custom firmware, you'll have to go through the standard unlock procedure through the Mi Unlock Tool.
- Link the device to your Mi Account.
- Wait 7-15 days (waiting time depends on Xiaomi policy).
- Use the official Mi Unlock utility in Fastboot mode.
π‘
Unlocking the bootloader on the Xiaomi Mi A2 resets all data on the device, including internal memory. backup ahead!