How to flash Xiaomi Mi A2 through Fastboot without unlocking the bootloader: the complete guide

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.

πŸ“Š Have you ever flashed a smartphone through Fastboot?
Yeah, I did it myself.
Yes, but with the help of a master.
No, but I want to learn.
No, and no planning.

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 firmwareAndroid versionDownload linkNotes
Android One (stack)10.0 (last official)Xiaomi FirmwareSuitable for restoring β€œclean” Android
MIUI Global Stable12.5 (based on Android 10)Official Xiaomi websiteRequires a transition from Android One via Fastboot
MIUI China Stable12.5 (Android 10)Xiaomi FirmwareContains 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.

  1. Turn off the Xiaomi Mi A2.
  2. Press the Volume Down + Power buttons at the same time and hold them for 10-15 seconds until the Fastboot logo appears.
  3. 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 devices

If 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

  1. Run the Mi Flash Tool on behalf of the administrator.
  2. In the Select field, specify the path to the folder with unpacked firmware.
  3. 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 reboot

If 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?
1. Check that the phone is really in Fastboot mode (the robot logo on the screen). 2. Try another one. USB-port (preferably) USB 2.0 on the back of the PC). 3. Reinstall the drivers manually through Device Manager (look for an exclamation point device). 4. Disable the antivirus - it can block access to the Fastboot. 5. Try another cable (cheap cables often don't support data transfer in Fastboot).

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:

  1. Enter Fastboot (Loudness Down + Nutrition).
  2. Run the command: fastboot erase userdata (this will reset the settings, but save the firmware).
  3. 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-info

In the answer, look for the line Device unlocked: false – this means that the bootloader remained locked.

fastboot erase modemst1


fastboot erase modemst2

Then 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.

  1. Link the device to your Mi Account.
  2. Wait 7-15 days (waiting time depends on Xiaomi policy).
  3. 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!

FAQ: Frequent questions about the firmware Xiaomi Mi A2

❓ Can I get a Mi? A2 Android One on the MIUI loader-free?
Yes, this is possible with the official MIUI Fastboot firmware for the Mi A2. However, note that switching from Android One to MIUI can cause performance or app compatibility issues.
❓ Why Mi Flash Tool is Error: "Couldn't Find Partition"?
This error occurs if: The wrong firmware file is selected (for example, for another model). MD5-The device is not in Fastboot mode. Solution: download the firmware again, check for model compatibility. jasmine_sprout and repeat the process.
❓ What to do if there is no network after the firmware (IMEI missing)?
This is a typical problem when running through Fastboot if the modem or nvdata partitions were not written correctly. To restore IMEI: Download the original firmware for your model. Only run the modem and fsg: fastboot flash modem modem.img fastboot flash fsg fsg.img Reboot the device. If the IMEI does not recover, the nvdata partition may be damaged, in which case a service center will be required.
❓ Can I roll back with MIUI back to Android One?
Yes, but it requires a full Fastboot flashback with a Clean all mode option. Note that: All data will be erased. Some features (like the camera) may not work properly if the Android One version is older than it was on MIUI. It is recommended to use the latest available version of Android One for Mi A2 (Android 10).
❓ Why does Touch not work after the firmware? ID (printer)?
The fingerprint scanner on the Mi A2 depends on the persist partition working correctly. If it has been erased or damaged, the scanner will stop functioning. Solution: Scroll the persist partition from the original firmware: fastboot flash persist.img If the persist.img file is not in the firmware, download it separately (see forums like XDA Developers).