Xiaomi Mi A2 firmware: a complete guide from unlock to installing software

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

πŸ“Š What kind of firmware do you plan to install?
Stock MIUI
LineageOS
Pixel Experience
Another custom
I haven't decided yet.

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:

  1. Turn on Developer Mode: Go to Settings β†’ About Phone and click on the Build Number 7 times.
  2. Activate USB Debugging and OEM Unlock in Settings β†’ System β†’ For Developers.
  3. Link your Mi Account to your phone: Settings β†’ Xiaomi Account β†’ Synchronization.
  4. 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).
  5. 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?
1. Check that the phone is actually in Fastboot mode (a screen with a rabbit and the words "Fastboot"). 2. Install the drivers manually through Device Manager (select "Android Bootloader Interface"). 3. Try another one. USB-cable (preferably original) and port USB 2.0 (USB 3.0 sometimes doesn't work). 4. Disable the antivirus - it can block the Mi Unlock Tool.

Firmware: Fastboot, Recovery or ADB Sideload

The choice of method depends on your firmware and goals, and here are three main ways to compare:

MethodWhen to usePlusesConsDo you need to unlock the bootloader?
FastbootInstallation of stock firmware, recovery after failureThe most reliable, even works on "bricks"Deletes all data, requires PCYes.
Recovery (TWRP)Installation of custom firmware, cores, modsSave data (if you don’t wipe), flexibilityYou need to install TWRP first, risk of errors.Yes.
ADB SideloadUpdating the firmware without a complete resetDoes not require unlocking the bootloader for stock updatesIt 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

Done: 0 / 4

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:

  1. 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.
  2. Connect your phone in Fastboot mode (clip Volume Down + Power when the device is off).
  3. 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:

  1. 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.
  2. Backup your current firmware (optional): select Backup and select Boot, System, Data sections.
  3. Wipe: Click on Wipe β†’ Advanced Wipe and select Dalvik, Cache, System, Data (for clean installation).
  4. Install firmware: Install β†’ choose ZIP-firmware β†’ Swipe to Confirm Flash.
  5. If required, go to Gapps (Google Services) and Magisk (Root Services).
  6. 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 unpackedCheck the path to the file, unpack the archive again
Phone is not defined in fastboot devicesNo drivers or USB issuesInstall drivers manually, try another cable/port
E: Unknown command [log] in TWRPIncompatible version of TWRPInstall the recommended version (e.g. 3.6.2 for Mi A2)
Hanging on the logo after firmwareIncompatible firmware or incorrect boot.imgScroll 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 modelDownload 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:

  1. Press Volume down + Power for 20-30 seconds (sometimes forced reboot helps).
  2. Connect to your PC and try flashing boot.img through Fastboot.
  3. 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.

FAQ: Answers to Frequent Questions

Can I flash the Mi A2 without unlocking the bootloader?
No, any firmware installation (except official updates via ADB Sideload) requires unlocking, except for the Airborne Updates (OTA), but these are only available for stock firmware.
Which firmware is better to choose for everyday use?
If you want a stable option: - Stock MIUI - maximum compatibility, but no updates. - Pixel Experience - pure Android with features from Google Pixel. - LineageOS - minimalist Android without unnecessary applications. For games and performance, HavocOS or CorvusOS with the Kirisakura core is suitable.
Will the warranty be lost after the firmware?
Yes, any unlocking of the bootloader or installing custom software will void the warranty, but service centers sometimes agree to restore the stock firmware for a fee before repairing under warranty.
How to return the official firmware after custom?
Download the stock firmware for your model and run it through Fastboot (as described above), after which you can block the bootloader again through the Mi Unlock Tool, but this will not return the warranty.
What to do if the mobile network does not work after the firmware?
The problem is typical for custom firmware Solutions: - Check that the firmware supports your phone modification (e.g, jasmine_sprout For the global version. - Install the correct modem through TWRP (file modem.img can be found XDA). - Manually select the operator in Settings β†’ Mobile network β†’ Network operators.