Xiaomi Mi A2 โ One of the few smartphones of the brand, running on โpureโ Android One instead of the proprietary shell MIUI. This simplifies the installation of custom firmware, but requires a special approach to unlocking the bootloader and selecting software. MIUI, There's no built-in mode. EDL, a firmware error can lead to a โbrickโ (unworkable state) due to the features of the Qualcomm Snapdragon 660 hardware platform.
In this article - current ways of firmware Mi A2 (codename jasmine_sprout) on 2026 And we'll take a year, including formal and custom decisions:
- ๐ How to unlock the bootloader without waiting 720 hours;
- ๐ฅ Where to download verified firmware (stock and custom);
- ๐ ๏ธ Step-by-step instructions for Fastboot, Recovery and ADB Sideload;
- โ ๏ธ Common Errors and How to Avoid Them (Including Anti-Rollback and Modem Problems).
If you don't. A2 ยซIt doesn't turn on after a bad firmware or requires a rollback on an old version of Android, and here you will find solutions. Importantly, devices with a locked bootloader can't be flashed without unlocking it, even if you download the official firmware from Xiaomi.
1. Firmware Preparation: What to Do Before Starting
Mi firmware A2 โ Without it, you risk getting a brick or losing data. Start by checking the current state of your smartphone:
- ๐ฑ Make sure your device model is Xiaomi Mi. A2 (Not Mi. A2 Lite or Mi 6X). Check in Settings โ The phone. โ Model.
- ๐ Battery charge: at least 60%. When you run through Fastboot, the device doesn't charge.
- ๐พ Backup your data. The firmware erases internal memory (except for a microSD card if installed).
- ๐ฅ๏ธ Prepare a PC with Windows 10/11 It's not like Linux. MacOS can have driver problems. ADB/Fastboot.
Also check the status of the loader:
- Turn off the phone.
- Press Volume Down + Power to enter Fastboot.
- Connect the device to the PC and type in the command line: fastboot oem device-info
- If the answer is Device unlocked: false, the bootloader is locked.
โ ๏ธ Note: Firmware with a blocked bootloader is possible only through the official OTA-Any other method will result in flash not allowed in locked state error.
2. Unlock the bootloader on Xiaomi Mi A2
Xiaomi requires unlocking the bootloader to install unofficial software. A2 This process is different from the devices on MIUI:
- ๐ You need to link your Mi Account to your device (even if you havenโt used it before).
- โณ The wait for unlocking takes 7 days (168 hours), not 720 as it does for the first time. MIUI.
- ๐ฑ Unlocking erases all data from the device.
Step-by-step:
- Enable Developer Options: Go to Settings โ About the phone and 7 times click on the Assembly Number.
- Back to Settings โ System system โ For developers and activate: ๐ง Debugging by USB; ๐ Unlocking OEM (point!).
adb reboot bootloaderMi Unlock Tool
Mi Account
Fastboot
Unlock
Couldnโt unlock
โ ๏ธ Note: If you are buying a Mi A2 ยซThe previous owner could have linked his account, in which case it is impossible to unlock without his data. get_identifier_token.
A Mi Account is linked|Debugging is on. USB|Unblocking permitted OEM|Drivers installed ADB/Fastboot|Data backup made.-->
3. Selection of firmware: official vs custom
Mi A2 It supports several types of firmware, and it depends on your goals:
| Type of firmware | Advantages | Deficiencies | Where to download |
|---|---|---|---|
| Official (Stock) | Stability, support OTA-Updates, original camera drivers | Older version of Android (maximum) 10/11), no custom function | Xiaomi Firmware Updater |
| Castomic (AOSP) | New versions of Android (12-14), absence of bloat, extended settings | Camera bugs are possible, NFC or sensors, no Widevine L1 (Netflix HD) | XDA Developers |
| Ported (MIUI) | Branded shell Xiaomi, additional functions | Low stability, gesture problems, lack of updates | Xiaomi.eu (informally) |
| GSI (Generic System Image) | Any version of Android, flexibility | Camera, Wi-Fi, mobile network without patches do not work | GitHub Phhusson |
For most users, the best choice is:
- ๐ If you need to return the phone to the โfactoryโ state โ the official firmware.
- ๐ If you want a new Android โ custom based AOSP (LineageOS 20 or Pixel Experience).
- ๐ธ If the camera is important, avoid it. GSI ported MIUI.
Critical: firmware for Mi A2 incompatible with Mi A2 Lite (codename daisy)! Installing the wrong version will result in a "brickยป.
๐ก
Before downloading the firmware, check its hash (MD5/SHA1) via certutil -hashfile filename.md5 It's going to save you from corrupted files.
4. Firmware via Fastboot (recommended method)
The method is suitable for installing official firmware or custom recovery (for example, TWRP). It will:
- ๐ฅ๏ธ PC with installation ADB and Fastboot;
- ๐ Firmware in.tgz or.zip format (for official - image file);
- ๐ Cable USB (preferably original).
Instructions for official firmware:
- Unpack the archive with the firmware in the folder platform-tools (where are adb.exe and fastboot.exe).
- Transfer the phone to Fastboot (Loudness down + Power).
- Connect to your PC and check the connection: fastboot devices must display the serial number of the device.
- Start the firmware (for Windows): flash_all_except_storage.bat For Linux/macOS: chmod +x flash_all_except_storage.sh./flash_all_except_storage.sh
- Wait for the finish (5-10 minutes). The phone will reboot automatically.
If you need to sew TWRP:
- Download the current version TWRP for jasmine_sprout.
- Fastboot: Fastboot Flash Recovery twrp-3.7.0_9-0-jasmine_sprout.img fastboot boot twrp-3.7.0_9-0-jasmine_sprout.img
- After loading into TWRP run the Wipe โ Format Data (required!), then reboot to recovery again.
โ ๏ธ Note: If after the firmware TWRP The phone is stuck on the logo, so you haven't formatted the Data section. Repeat step 3.
What if the Fastboot canโt see the device?
5. Firmware through Recovery (TWRP)
The method is used to install custom firmware (e.g. LineageOS) or patches (Magisk, Disable Force Encryption).
- ๐ You must have unlocked the bootloader;
- ๐ฅ Installed TWRP Recovery;
- ๐๏ธ The firmware in.zip format is copied to a memory card or to the phone memory.
Step-by-step:
- Boot into TWRP: Turn off the phone, then press Volume Up + Power.
- Press the Wipe. โ Advanced Wipe and mark: ๐งน Dalvik / ART Cache; ๐๏ธ System; ๐ Data (if you are switching from another firmware); ๐ Cache.
- Return to the main menu and select Install, then specify the path to the firmware file.
- Add (if necessary): ๐ Magisk (for root rights); ๐ Disable Force Encryption (if the firmware does not support encryption); ๐ถ GApps (if not in the firmware).
Swipe for confirmation and wait for completion.
Reboot โ System
Typical errors and decisions:
- ๐ซ Error 7: Incompatible with the device. Check the Mi version. A2 (jasmine_sprout).
- ๐ด Failed to mount /data: Execute Format Data in TWRP and re-set.
- โ ๏ธ Logo getting stuck: vendor or firmware may not be enough. Set them separately.
๐ก
Always check firmware compatibility with your device's firmware version. Installing firmware with a newer firmware version than the current one can lead to a "brick" due to the anti-rollback mechanism.
6. Firmware through ADB Sideload
The method is useful if:
- ๐ฑ You don't have a memory card;
- ๐ You need to update the firmware without losing data;
- ๐ ๏ธ TWRP Does not see the internal memory.
Instructions:
- Download the firmware in.zip format on PC.
- Boot in. TWRP Stock Recovery (if the firmware is official).
- In TWRP, select Advanced โ ADB Sideload.
- On PC, do: adb sideload name file.zip
- Wait until the end (the progress will be displayed on the phone screen).
For Xiaomiโs official firmware through Stock Recovery:
- Rename the firmware file to update.zip.
- Put it at the root of your internal memory.
- Load to Stock Recovery (Loudness Up). + Nutrition).
- Select Apply update from ADB and do adb sideload update.zip.
โ ๏ธ Note: When using Stock Recovery, the firmware must be signed by Xiaomi.
7. Solving Typical Errors After Firmware
Even with the right firmware, you can have problems, and here are the most common ways to fix them:
| Problem. | Possible cause | Decision |
|---|---|---|
| Phone not turned on (black screen) | Incorrect firmware or interrupted process | Repeat the firmware via Fastboot with official software |
| Hanging on the Xiaomi logo | No vendor or data formatted | Enter in. TWRP, Run Format Data and run it. vendor.img |
| No network (IMEI missing) | Damaged modem or EFS | Fastboot Firmware or Restore it EFS backup |
| The camera's not working. | There are no libcamera drivers in custom firmware | Install the patch. ANX Camera or go back to stock firmware |
| Wi-Fi/Bluetooth is not included | Incompatible firmware or vendor | Scroll down the official firmware for your version of Android |
If IMEI is missing after the firmware:
- Check the current one. IMEI via *#06#.
- If it's displayed Null/Invalid, restore the section EFS: Download the backup. EFS for Mi A2 (look for XDA). Fastboot: Fastboot Flash Modem NON-HLOS.bin fastboot flash fsg fsg.mbn
Important: Recovery IMEI Menu (#4636##) on the Mi A2 It often doesn't work. Use only methods through Fastboot or QCN-file.
8. rollback to the previous version of Android
If the new firmware is unstable, you can return the old version. A2 The anti-rollback mechanism is in place:
- ๐ You canโt flash a version older than the one you installed earlier (for example, from Android 10 to Android 9).
- ๐ A rollback to an earlier version is possible, but requires a complete flashing through Fastboot.
Step-by-step instructions for rollback:
- Download the full firmware version (not the correct one) OTA!).
- Unpack it and delete the files: anti_rollback_db.mbn; anti_rollback_db_2.mbn (if).
Fastboot
fastboot flash anti_rollback_db empty_anti.img
fastboot flash all -w(file empty_anti.img You can create this tool through this tool).
โ ๏ธ Note: If you ignore the anti-rollback, the device will lock at the boot stage with the Anti Rollback Check Fail error. EDL (You need an authorized Xiaomi account).
๐ก
Before rolling back to the old version of Android, be sure to check the firmware version through fastboot getvar all. If the current version is newer than in firmware, a rollback is impossible without the risk of a "brick."