Why do you want to use the Xiaomi Mi A2 and what are the risks?
Smartphone Xiaomi Mi A2 (codename jasmine_sprout) came out 2018 The year as part of the Android One program, which guaranteed a clean Android without shell MIUI. However, over time, updates have stopped coming and users have experienced slowdowns, bugs or a desire to switch to custom firmware.
The main reasons for the Mi A2 firmware are:
Install custom software (LineageOS, Pixel Experience, HavocOS) for new features.
Return to stock firmware after failures or failed experiments.
Update to the latest version of Android (officially support ended on Android 10).
- Resolve critical errors, such as logo hovers or camera module problems.
But the process has risks: improper firmware can turn the phone into a βbrickβ, especially if you interrupt the process or use incompatible software. Also, unlocking the bootloader resets all data, and some banking applications (for example, Sberbank Online) may stop working due to the lack of certification Widevine L1 on custom firmware.
Preparation for firmware: what to do before the start
Before you install the Xiaomi Mi A2, follow the steps to avoid problems:
- π Charge your phone to at least 70% β the process can take up to 30 minutes, and a discharge in the middle will cause a failure.
- π± Make a full backup through Settings β System system β Backup copying or by means of TWRP (Photos, contacts and SMS It is better to copy it on PC.
- π₯οΈ Install it on the computer: ADB and Fastboot (part of Android) SDK Platform-Tools. Drivers for Xiaomi (download from official website). Archivator 7-Zip or WinRAR for unpacking firmware.
- π Download the correct firmware: For the drain: official files with Xiaomi Firmware Updater (select the version for the first time). jasmine_sprout). For custom: verified assemblies with XDA Developers (e.g. LineageOS) 20 or Pixel Experience 13).
Note: firmware for Mi A2 Lite (daisy) is not suitable for Mi A2 β itβs different devices! Also avoid files marked Global if your phone was originally bought for the Chinese market (they have different modems).
Unlocking the bootloader: a mandatory step before the firmware
Xiaomi blocks the bootloader on all devices, so it needs to be unlocked through the official Mi Unlock Tool.The process takes up to 720 hours (30 days) of waiting if you're doing it for the first time!
Step-by-step:
- Turn on Developer Mode: Go to Settings β About Phone and click on the Build Number 7 times.
- Activate USB Debugging and OEM Unlock in Settings β System β For Developers.
- Link your Mi Account to your phone: Settings β Xiaomi Account β Synchronization.
- Download Mi Unlock Tool, log in to your account and connect your phone in Fastboot mode (clip Volume Down + Power when the device is off).
- If you receive a message to wait, wait until the time is set (usually 168 or 720 hours).
β οΈ Warning: Once the bootloader is unlocked, the phone will reset completely to factory settings, and some features (such as Mi Pay or Game Turbo) may stop working.
What if the Mi Unlock Tool can't see the phone?
Firmware: Fastboot, Recovery or ADB Sideload
The choice of method depends on your firmware and goals, and here are three main ways to compare:
| Method | When to use | Pluses | Cons | Do you need to unlock the bootloader? |
|---|---|---|---|---|
| Fastboot | Installation of stock firmware, recovery after failure | The most reliable, even works on "bricks" | Deletes all data, requires PC | Yes. |
| Recovery (TWRP) | Installation of custom firmware, cores, mods | Save data (if you donβt wipe), flexibility | You need to install TWRP first, risk of errors. | Yes. |
| ADB Sideload | Updating the firmware without a complete reset | Does not require unlocking the bootloader for stock updates | It doesn't work with all firmware. | No (for drainage) |
For most users, Fastboot is the most versatile option, especially if the phone doesn't turn on. TWRP is suitable for experimenting with custom firmware, but requires additional steps (installation of the Recovery itself). ADB Sideload is convenient for updates "over the air", but will not help in case of serious failures.
βοΈ Preparation for firmware through Fastboot
Firmware through Fastboot: step-by-step instructions
This method is suitable for installing an official stock firmware or recovering a phone after a crash. All data will be deleted!
Steps:
- Unpack the downloaded firmware (for example, jasmine_sprout_global_images_V12.0.3.0.QDIMIXM_20210728.0000.00_10.0_global_4a1a4d5b7b.tgz) into a folder with platform-tools.
- Connect your phone in Fastboot mode (clip Volume Down + Power when the device is off).
- Open the command line in the firmware folder and execute: 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 can be used to simplify flash_all.bat (if it's in the archives).
If the process is successful, the phone will restart and start the initial setup. 10-15 minutes - don't interrupt it!
β οΈ If after firmware, the phone hung on the Xiaomi logo longer 20 For a minute, try re-sweeping. boot.img Or make fastboot erase userdata (this will erase all data, but often solves the problem).
π‘
If the script flash_all.bat Issuing a miscalculation system.img", Make sure you download the correct firmware version for your model. A2 File name must contain "jasmine_sprout".
Installation of custom firmware through TWRP
To install LineageOS, Pixel Experience or other custom firmware, you will need TWRP Recovery. The official version for the Mi A2 can be downloaded from TWRP.
Instructions:
- Please. TWRP Fastboot: Fastboot Flash Recovery twrp-3.7.0_9-0-jasmine_sprout.img fastboot reboot recovery After that, the phone should boot into the TWRP.
- Backup your current firmware (optional): select Backup and select Boot, System, Data sections.
- Wipe: Click on Wipe β Advanced Wipe and select Dalvik, Cache, System, Data (for clean installation).
- Install firmware: Install β choose ZIP-firmware β Swipe to Confirm Flash.
- If required, go to Gapps (Google Services) and Magisk (Root Services).
- Reboot: Reboot β System.
The first download of custom firmware can take up to 10 minutes. If the phone is getting stuck on the download animation, try:
- Firmware without Gapps (sometimes they conflict).
- Use a different version of TWRP (e.g. 3.6.2 instead of 3.7.0).
- Check the hash of the downloaded file (it may be corrupted).
π‘
After installing custom firmware, be sure to check the basic functions: calls, mobile Internet, Wi-Fi, camera and fingerprint sensor. If something does not work, most likely, the firmware is incompatible with your phone modification.
Solving common errors in firmware
Even with the correct following of the instructions, problems can arise. Here are the most common mistakes and their solutions:
| Mistake. | Reason. | Decision |
|---|---|---|
| fastboot: error: cannot load 'boot.img' | The firmware file is damaged or not unpacked | Check the path to the file, unpack the archive again |
| Phone is not defined in fastboot devices | No drivers or USB issues | Install drivers manually, try another cable/port |
| E: Unknown command [log] in TWRP | Incompatible version of TWRP | Install the recommended version (e.g. 3.6.2 for Mi A2) |
| Hanging on the logo after firmware | Incompatible firmware or incorrect boot.img | Scroll through the correct boot.img or make fastboot erase userdata |
| This package is for "jasmine_sprout" devices; this is a "" | The firmware is not for your model | Download the firmware just for the sake of jasmine_sprout |
If your phone has turned into a brick (it doesnβt turn on, doesnβt respond to buttons), try:
- Press Volume down + Power for 20-30 seconds (sometimes forced reboot helps).
- Connect to your PC and try flashing boot.img through Fastboot.
- Use the Mi Flash Tool for full flashing (requires authorization of Xiaomi account).
In extreme cases, contact the service center - some "bricks" are restored only through EDL-mode (emergency firmware), which requires special equipment.