Rooting Xiaomi Mi A2 Lite: a complete guide with a security guarantee

Getting root rights to Xiaomi Mi A2 Lite (codenamed daisy) opens up access to hidden Android features, but requires strict compliance. This Android One smartphone has features in the process of unlocking the bootloader that distinguish it from standard Xiaomi devices on MIUI. Unlike models with a proprietary shell, there is no binding to the Mi Account, but there are nuances with drivers and firmware versions.

This article is relevant for all versions of the Mi A2 Lite (including global and European versions) based on Android 9-11.We will look at the official method of unlocking via fastboot, installing a custom TWRP recap, and Magisk firmware for obtaining root rights. Particular attention is paid to bypassing restrictions on unlocking the bootloader for devices purchased after 2020, where Xiaomi has tightened security policy.

Preparation of the device for rooting

Before you start the process, you need to perform a number of mandatory actions: skipping any step can lead to a device blink or data loss. Start by creating a full backup through ADB Backup or third-party applications like Swift Backup (requires a temporary root).

Make sure your Mi A2 Lite has the latest firmware installed. To check, go to Settings β†’ System β†’ System Update. Use only official firmware from Google (for Android One), as custom builds may contain modified bootloaders that are incompatible with the next steps.

  • πŸ“± Battery charge of at least 70% (optimum 100%)
  • πŸ”Œ Original. USB-cable (do not use cheap analogues)
  • πŸ’» Windows computer 10/11 Linux (macOS is not recommended due to driver issues)
  • πŸ” Disable all antivirus programs and firewalls
πŸ“Š What OS do you use for firmware?
Windows 10/11
Linux (Ubuntu/Debian)
macOS
Another.

Download the necessary files in advance:

  • πŸ“ Platform Tools (official package from Google)
  • πŸ“ TWRP for daisy (version 3.7.0 or later)
  • πŸ“ Magisk (last stable version)
  • πŸ“ Mi Unlock Tool (Even for Android One)

πŸ’‘

Use the Chrome browser to download files – some hosting sites block downloads through other browsers.

Unlock the bootloader on the Mi A2 Lite

The unlocking process on Android One devices is different from standard Xiaomi. You do not need to be linked to your Mi Account, but you need to get permission through the official tool. First activate the developer mode: go to Settings β†’ About phone and 7 times click on the build number.

Then turn on USB Debugging and OEM Unlocking in the Developer Menu, connect your phone to your PC, and execute a command to check the connection:

adb devices

If the device is determined, restart it to fastboot mode:

adb reboot bootloader

Start the Mi Unlock Tool and follow the instructions. During the account verification phase, use a Google account linked to your phone. Devices purchased after 2020 may require a wait of 72-168 hours (Xiaomi calls this the β€œcooling period”).

What if the Mi Unlock Tool can’t see the device?
Check the driver installation through Device Manager. Manually update the driver for Android Bootloader Interface by pointing the path to the platform-tools folder.

⚠️ Warning: Once the bootloader is unlocked, the device will be completely reset, and all data, including photos and apps, will be deleted without recovery.

PhaseAction.Implementation time
Activation of the developer mode7 taps on "Assembly Number"1 minute
Enabling OEM UnlockSwitch in the developer settings1 minute
Connect to Mi UnlockAuthorization and verification of the device5-10 minutes
Waiting to unlockFor new devices (2020+)3-7 days

Installation of custom TWRP Recovery

Once the bootloader is successfully unlocked, you can start installing TWRP. This customized recap will allow you to flash modified images and get root rights. The previously downloaded twrp-3.7.0-daisy.img file should be placed in the folder with the platform-tools.

Open the command line in this folder and do:

fastboot flash recovery twrp-3.7.0-daisy.img


fastboot boot twrp-3.7.0-daisy.img

The device will automatically reboot to TWRP. On the first screen, you will be asked to allow modifications to the system partition β€” swipe for confirmation. This is an important step, without which further Magisk firmware will not be possible.

Device unlocked |TWRP file rebranded twrp.img|ADB/Fastboot recognize device |All antiviruses disabled-->

If you reboot your phone and load it back into a standard recaveri, it means the firmware didn't apply, in which case, repeat the procedure, but do the following before you restart:

fastboot flash boot twrp-3.7.0-daisy.img

⚠️ Note: Some Android 11 firmware may be affected by protection AVB (Android Verified Boot, which blocks the download from the modified Recovery. AVB via fastboot-command:

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

Getting root rights through Magisk

Downloaded Magisk file (usually with a species name) Magisk-v26.4.zip) You need to transfer it to your phone, and it's best to put it in your internal memory, or SD-In the map. TWRP Select Install, find the archive with Magisk and confirm the installation.

It takes 1-2 minutes. Don't restart immediately after you're done, run Wipe β†’ Format Data first (this will delete all the data, but it's necessary for the root to work properly).

To check for root rights, install the Magisk Manager app from the official repository. Open it and perform status checks. If it's successful, you'll see the green checkmark and the Magisk version at the top of the screen.

πŸ’‘

Installing Magisk via TWRP is the only reliable way to get root on the Mi A2 Lite. Methods through boot.img patching often result in looping the boot.

  • πŸ”§ Root Check: Use the Su command in the terminal
  • πŸ”„ Magisk Update: Only through the official app
  • πŸ›‘οΈ Hiding the root: Enable MagiskHide for banking apps
  • πŸ“± Reset meter: SafetyNet (Universal SafetyNet Fix module required)

Solving common problems

Even with the correct following of the instructions, errors can occur.

"Invalid sparse file format at header magic" - an error occurs when trying to flash TWRP on some firmware versions. Solution: use an older version of TWRP (3.5.2) or run the official recovery image first through fastboot, and then re-install TWRP.

Located on the Mi logo indicates damage to the system partition. Solution: run the full firmware image through fastboot with -w setting (full reset):

fastboot flash system system.img


fastboot flash boot boot.img




fastboot -w

Magisk does not pass SafetyNet β€” relevant for Android 11. Solution: Install Universal SafetyNet Fix and MagiskHide Props Config modules through Magisk Manager. Once installed, restart the device and check the status in the YASNAC application.

How to restore IMEI after firmware?
If you have lost the IMEI, run the original image of nvdata.bin through the SP Flash Tool. The file can be extracted from the official firmware for your model.
Problem.Reason.Decision
Not defined in fastbootThere are no drivers.Install Mi Flash Tool for Automatic Driver Installation
TWRP is stitched but not launchedActive AVB protectionTurn off the check via fastboot --disable-verity
Apps don't work with the rootMagisk detectionActivate MagiskHide and add apps to the exclusion list
The mobile network is not workingDamaged modem.Sweep through the original modem.img and fsg.mbn

Security after rooting

Root rights give you full control of the system, but also open up potential vulnerabilities. Once rooted successfully, follow the following steps to protect the device:

1. Install AFWall+ to control application network access. This will block suspicious connections at the kernel level. 2. Disable ADB over Wi-Fi in the developer settings if you do not use it constantly. 3. Regularly update Magisk and its modules through the official application.

For banking applications (Sberbank, Tinkoff, etc.) you will need additional configuration:

  • 🏦 Activate MagiskHide in the Magisk settings
  • πŸ” Add Apps to the List of Hidden Processes
  • πŸ”„ Restart the device after adding each application
  • πŸ“± Install Safetynet-Fix module to pass certification

On root-right devices, never use the Smart Lock feature to unlock through trusted devices, creating a critical vulnerability for physical hacking.

Alternative methods of rooting

Beyond the classic TWRP approach, there are alternative approaches, one of which is patching boot.img through Magisk Manager and then running firmware through fastboot, which is suitable for users who don't want custom Recovery.

Instructions:

  1. Remove boot.img from the firmware for your model
  2. Transfer it to your phone and select Magisk Manager "Install β†’ Select and Patch a File"
  3. File received magisk_patched.img Fly through fastboot:
fastboot flash boot magisk_patched.img

The advantage of this method is to keep the original recovery, but it's less reliable: when you upgrade the system through OTA, the root rights fly off, and you have to repeat the procedure. For the Mi A2 Lite, with its infrequent updates, this may be an acceptable option.

πŸ“Š Which Rooting Method Do You Prefer?
Through TWRP
Patching boot.img
Through custom firmware
I haven't decided yet.

FAQ: Frequent questions about rooting Mi A2 Lite

Can I get a root without unlocking the bootloader?
No, on the Mi A2 Lite (as on all modern Android devices), unlocking the bootloader is a prerequisite for obtaining root rights. Any promises of β€œroot without unlocking” are fraud.
Will the rout fly after the system update?
Yes, when you upgrade through OTA, the root rights will be lost. You will need to repeat the Magisk firmware procedure. To avoid this, turn off automatic updates or use custom firmware with pre-sewn root.
How do you get it back (to roll back)?
To completely remove the root, swipe the original boot.img through fastboot, then execute the fastboot-w command to reset.The bootloader will remain unlocked - it can be blocked back through the Mi Unlock Tool (but this will delete all data).
Do Google Pay and other payment systems work with Root?
Officially, no, but you can get around the restrictions. Install MagiskHide Props Config and Universal SafetyNet Fix, then add Google Pay and Google Play Services to the MagiskHide settings. After the reboot, the services should work.
Can I root Mi A2 Lite on Android 12?
Officially, the Mi A2 Lite hasn't received an update to Android 12. If you see firmware with this version, these are unofficial ports that may contain critical bugs. Rooting such builds hasn't been tested and may cause the device to fail.