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:
- You have a backup of all the data (flashing over erases internal memory).
- Battery charge of at least 60% (to avoid shutdown during the process).
- The PC has ADB and Fastboot drivers installed (instructions below).
- 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.
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.
- Linking the Mi Account to the device (required to unlock).
- Wait 7 days (if the account is new or has not previously unlocked the device)
- Unlock directly through the Mi Unlock Tool.
Detailed instructions:
- Turn on the smartphone developer mode: go to Settings β About the phone β Assembly number and tap it 7 times.
- Back to Settings β System system β For developers and activate: π Unlocking OEM (OEM Unlocking) π Debugging by USB (USB Debugging)
ADB
adb reboot bootloaderThe 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 firmware | Advantages | Deficiencies | Download link |
|---|---|---|---|
| Stock Android One | Stability, OTA-Updates, pure Android | Limited functionality, no MIUI | Official website |
| MIUI (ported) | MIUI features, themes, optimization for Xiaomi | Possible bugs, no OTA, requires manual installation | Xiaomi.EU |
| Castomium (LineageOS, Pixel Experience) | New versions of Android, lack of Bloatware | Camera or NFC may not work, there is no official support | XDA 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?
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:
- Unpack the firmware archive in a folder on your PC (e.g., C:\MiA2\).
- Switch to Fastboot: Adb Reboot Bootloader
- Connect the device to your PC and check for detection: fastboot devices should show a serial number.
- 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).
- Press Power + Vol Up to enter recovery.
- Select Wipe β Wipe Cache.
- 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:
- Download the latest version twrp-3.7.0_9-0-jasmine_sprout.img.
- Fastboot: Fastboot Flash Recovery twrp-3.7.0_9-0-jasmine_sprout.img
- TWRP: Fastboot Reboot Recovery
- Make a backup of the current firmware (optional, but recommended).
- Wipe the Dalvik, Cache, System, Data sections (on the Wipe β Advanced Wipe menu).
- Install the firmware through Install by selecting the downloaded.zip file.
- 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 cause | Decision |
|---|---|---|
| The Invalid Sparse File Error in TWRP | A damaged firmware file or an incompatible version of TWRP | Download the firmware again, update the TWRP to the latest version |
| The smartphone does not turn on after firmware | Incompatible firmware or interrupted process | Try to flash stock firmware through Fastboot |
| No network after installing custom firmware | There are no validation modems for your model. | Switch stock vendor and firmware through Fastboot |
| Cyclical booting (bootloop) | Conflict between firmware and kernel or Gapps | Wipe 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.
- Download the camera fix (for LineageOS/Pixel Experience).
- 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.
- Download the official image for the Mi A2 (select the latest version).
- Unpack the archive and run flash-all.bat (Windows) or flash-all.sh (Linux/macOS).
- 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).