How to reflash Xiaomi Mi A2: a complete guide with unlocking the bootloader and choosing firmware

The Xiaomi Mi A2 is one of the few smartphones released under the Android One program, which means that the device runs on pure Android without a MIUI shell, but also creates unique difficulties when flashing. Unlike standard Xiaomi devices, you can’t just install MIUI through recovery – you will need to unlock the bootloader, select a compatible firmware and follow the instructions carefully.

In this guide, we will analyze all the stages of reflashing Mi A2 (codename jasmine_sprout): from tool preparation to custom firmware installation or return to stock MIUI. We will focus on unlocking the bootloader, a key step without which further manipulation is impossible, and consider the risks associated with loss of warranty and how to minimize them.

If you’ve never been a firmware Android device before, we recommend you look carefully at each section. Mistakes in unlocking or selecting incompatible firmware can lead to a device β€œbrick” (inoperability). For experienced users, here are the current links to tools and firmware in 2026.

1. Preparation for flashing: what you need to know before starting

Reflashing Xiaomi Mi A2 is a more complex process than most Android smartphones.

  • πŸ”’ Blocked by default bootloader (requires official unlock via Xiaomi)
  • πŸ“± Absence MIUI in stock firmware (the device runs on pure Android)
  • πŸ”§ Features of the hardware platform (Snapdragon 660 processor, which requires specific drivers)
  • 🚫 Risk of loss OTA-Updates after installing custom firmware

Before proceeding, make sure that:

  1. You have a backup of all the data (flashing over erases internal memory).
  2. Battery charge of at least 60% (to avoid shutdown during the process).
  3. The PC has ADB and Fastboot drivers installed (instructions below).
  4. You have downloaded the correct version of the firmware for the model jasmine_sprout.

⚠️ Warning: Once the bootloader is unlocked, all data on the device, including photos, contacts and apps, will be reset. Google’s Find My Device feature may also stop working.

πŸ“Š Why do you want to re-examine the Mi? A2?
Install MIUI instead of Android One
Install custom firmware (LineageOS, Pixel Experience)
Correcting Firmware Errors
Unlock additional functions
Another option

2. Unlock the bootloader on Xiaomi Mi A2

The Mi A2 bootloader is locked by default, and unlocking it is a must before any firmware. Unlike MIUI devices, you can't use the standard Mi Unlock Tool without prior preparation.

  1. Linking the Mi Account to the device (required to unlock).
  2. Wait 7 days (if the account is new or has not previously unlocked the device)
  3. Unlock directly through the Mi Unlock Tool.

Detailed instructions:

  1. Turn on the smartphone developer mode: go to Settings β†’ About the phone β†’ Assembly number and tap it 7 times.
  2. Back to Settings β†’ System system β†’ For developers and activate: πŸ”“ Unlocking OEM (OEM Unlocking) πŸ”Œ Debugging by USB (USB Debugging)

ADB

adb reboot bootloader

The smartphone will be rebooted in Fastboot mode.

Official Mi Unlock Tool

Mi A2

Mi

⚠️ Warning: If you have a "Couldn't unlock" error when you unlock, check: Internet connection (tool requires online confirmation) Mi Unlock Tool version (outdated versions do not support Mi). A2). Account Status (must be linked to the device for at least 7 days).

Linked to the Mi Account to the device|Debugging is on. USB|Drivers installed ADB/Fastboot|Smartphone charged to 60%+|Download the Mi Unlock Tool of the latest version-->

3. firmware selection for Xiaomi Mi A2

After unlocking the bootloader, you can install one of three types of firmware:

Type of firmwareAdvantagesDeficienciesDownload link
Stock Android OneStability, OTA-Updates, pure AndroidLimited functionality, no MIUIOfficial website
MIUI (ported)MIUI features, themes, optimization for XiaomiPossible bugs, no OTA, requires manual installationXiaomi.EU
Castomium (LineageOS, Pixel Experience)New versions of Android, lack of BloatwareCamera or NFC may not work, there is no official supportXDA Developers

For Mi. A2 Critically choose a firmware with the correct code name β€” jasmine_sprout. Install firmware for jasmine (for Mi) A2 Lite) will cause the device to fail!

Recommended Firmware for 2026:

  • πŸ“± Pixel Experience 13/14 β€” Pure Android with Pixel features, stable camera performance.
  • πŸ”„ LineageOS 20 – minimalistic Android without unnecessary applications.
  • 🎭 MIUI 14 from Xiaomi.EU – if you want to return the branded shell.
How to check the compatibility of the firmware?
Open the archive with firmware and find the file board_info.txt Or build.prop. It should have the line: ro.product.device.=jasmine_sprout If another name is specified (for example, jasmine), the firmware is not suitable for Mi. A2!

4. Install firmware via Fastboot (official method)

The most reliable way to flash Mi A2 is to use Fastboot, which is suitable for installing stock Android One or ported MIUI.

  • πŸ–₯️ PC with installation ADB and Fastboot.
  • πŸ“ Firmware in.tgz or.zip format (unpacked).
  • πŸ”Œ Cable USB (preferably original).

Step-by-step:

  1. Unpack the firmware archive in a folder on your PC (e.g., C:\MiA2\).
  2. Switch to Fastboot: Adb Reboot Bootloader
  3. Connect the device to your PC and check for detection: fastboot devices should show a serial number.
  4. Start the firmware script: For Windows: flash_all.bat For Linux/macOS:./flash_all.sh

Wait until the process is completed (the process will take 5-10 minutes).

⚠️ Note: If the script gives an error "waiting for device", check: Connect the cable (try another port). USB). Installation of drivers (use Google) USB Driver Unlocking bootloader (if not unlocked, Fastboot will refuse recordings).

  1. Press Power + Vol Up to enter recovery.
  2. Select Wipe β†’ Wipe Cache.
  3. Reset the device.

5. Install custom firmware through TWRP

TWRP Recovery is required to install LineageOS, Pixel Experience or other custom firmware. The official version for the Mi A2 is available on the TWRP website.

Instructions:

  1. Download the latest version twrp-3.7.0_9-0-jasmine_sprout.img.
  2. Fastboot: Fastboot Flash Recovery twrp-3.7.0_9-0-jasmine_sprout.img
  3. TWRP: Fastboot Reboot Recovery
  4. Make a backup of the current firmware (optional, but recommended).
  5. Wipe the Dalvik, Cache, System, Data sections (on the Wipe β†’ Advanced Wipe menu).
  6. Install the firmware through Install by selecting the downloaded.zip file.
  7. After installation, run Gapps (if required) and Magisk (for root).

Critical! For the Mi A2, you need to use special Gapps for Android 10+ with the arm64 architecture. Installing the wrong packages will lead to a download cycle.

πŸ’‘

Always check firmware and Gapps compatibility! For the Mi A2, only packages marked arm64 and the firmware version of Android are suitable.

Possible problems and solutions

Even if you follow the instructions accurately, you can get errors.

Problem.Possible causeDecision
The Invalid Sparse File Error in TWRPA damaged firmware file or an incompatible version of TWRPDownload the firmware again, update the TWRP to the latest version
The smartphone does not turn on after firmwareIncompatible firmware or interrupted processTry to flash stock firmware through Fastboot
No network after installing custom firmwareThere are no validation modems for your model.Switch stock vendor and firmware through Fastboot
Cyclical booting (bootloop)Conflict between firmware and kernel or GappsWipe Cache and Dalvik in TWRP, reflash without Gapps

If the camera or NFC stopped working after the firmware, the firmware most likely lacks proprietary drivers.

  1. Download the camera fix (for LineageOS/Pixel Experience).
  2. Install it via TWRP as a regular.zip mode.

7. How to get back stock firmware Android One

If the custom firmware experiments were unsuccessful, you can return the original Android One.

  1. Download the official image for the Mi A2 (select the latest version).
  2. Unpack the archive and run flash-all.bat (Windows) or flash-all.sh (Linux/macOS).
  3. Wait until it is completed – the device will automatically reboot to the stock firmware.

After returning to Android One:

  • πŸ”„ Oh.TA-Updates will work automatically.
  • πŸ”’ The bootloader will remain unlocked (re-blocking is possible only through the service center).
  • πŸ“± All data will be erased (take backup in advance).

FAQ: Frequent questions about reflashing Xiaomi Mi A2

Can I flash the Mi A2 without unlocking the bootloader?
No, any firmware (except for the OTA-Updates) require an unlocked bootloader. This is a hardware-level limitation.
Will I lose my warranty after I unlock it?
Yes, unlocking the bootloader will void Xiaomi’s warranty, but in some service centers you can pay for a re-block (about 1000-2000 rubles).
Which firmware is best for the Mi A2 in 2026?
Depends on the goals: πŸ“± Stability: Stock Android One or MIUI from Xiaomi.EU. πŸ”„ New features: Pixel Experience (Android) 13/14). 🎭 Customization: LineageOS with Magisk.
How to check if the bootloader is unlocked?
Turn off your smartphone and turn it on by holding Power + Vol Down. If the bottom of the screen appears the inscription "Unlocked" with an open lock - the bootloader is unlocked.
Can I use Mi A2 with the Mi Flash Tool?
Technically yes, but not recommended.The Mi Flash Tool is designed for devices with MIUI and can cause bugs when running Android One.Use fastboot or TWRP.