How to install root rights on Xiaomi Mi A2 Lite: a complete guide with risks and nuances

Xiaomi Mi A2 Lite

Android One

MIUI

root-right

Xiaomi

Getting root rights on this device requires a special approach: a combination of official tools from Google and informal decisions from the community. In this article, we will examine all the steps from unlocking the bootloader to installing Magisk, and also talk about the critical differences between the process for the Mi A2 Lite compared to other Xiaomi smartphones, you will learn what mistakes users often make and how to avoid them.

Important: The procedure carries risks ranging from loss of warranty to build-up of the device. If you are not prepared for the possible consequences, consider alternatives (e.g. using ADB for individual tasks without a full root).

Why Mi A2 Lite Needs a Special Rooting Approach

The main problem with the Mi A2 Lite (codename daisy) is that it belongs to the Android One program. Unlike standard Xiaomi devices, here are:

  • πŸ”Ή There is no official tool to unlock the bootloader through the Mi Unlock Tool – Google’s fastboot utility is used instead.
  • πŸ”Ή There is no β€œAdvanced” section in the developer settings where it is usually activated. OEM Unlock.
  • πŸ”Ή Firmware updates are directly Google, not Xiaomi, which affects compatibility with custom recavers (TWRP).

In addition, due to the policy of Android One, some firmware versions can block the installation of unofficial images. For example, after upgrading to Android 11, many users have encountered an error avb verification failed when trying to flash TWRP. This is solved by disabling the check AVB (Android Verified Boot via Magisk patch.

Another nuance: on the Mi A2 Lite, you can’t just roll back to an older version of Android after unlocking the bootloader. This is due to the anti-rollback mechanism, which can lead to a complete loss of device performance. So before starting the procedure, be sure to check the current firmware version in Settings β†’ About Phone β†’ Android Version.

πŸ“Š You’ve already tried to get a root on your Xiaomi?
Yes, successfully.
Yeah, but it didn't work.
No, just planning.
I don't know what a ruth is.

Preparation of the device: what to do before unlocking

Before you start unlocking the bootloader, follow the mandatory preparatory steps:

  1. Back up all your data. Unlock the bootloader will erase all your user files, including photos, contacts and apps. Use Google Photos for media files, and for SMS and calls, apps like SMS Backup & Restore.
  2. Charge the phone at least 70%, interruption of the process due to battery discharge can lead to irreparable damage to system partitions.
  3. Install drivers for Xiaomi Mi A2 Lite on your PC. Download them from the official Xiaomi website or use the universal Google USB Driver package.
  4. Activate USB debugging: Go to Settings β†’ About Phone. Click 7 times on Build Number to turn on Developer Mode. Go back to Settings β†’ System β†’ Developer. Enable USB debugging and OEM unlock (if available).

If the OEM Unlock option is not on the developer menu, don’t panic. Some versions of the Mi A2 Lite firmware are hidden, but you can unlock it through fastboot.

Data backup created|Installed drivers on PC|Debugging is on. USB|Battery charged at 70%+|Verified version of Android-->

Warranty Warning: Unlocking the bootloader will void the official warranty from Xiaomi. If you need maintenance, you will have to first return the device to its original state (roll back the root and lock the bootloader).

Unlock the bootloader via fastboot

On the Mi A2 Lite, the bootloader is unlocked not through the Mi Unlock Tool, but using the standard fastboot command.

  1. Connect your phone to your PC through USB-cable (preferably original).
  2. Turn the device into fastboot mode: Turn off the smartphone. Press the Power + Volume down buttons for 10 seconds. The fastboot logo will appear on the screen.

Open the command line.

Win + R β†’ cmd

Terminal

Check the connection.

fastboot devices

If the device is identified (the serial number appears), move on. If not, check the drivers and cable.

Unlock the loader

fastboot flashing unlock

A warning will appear on your phone screen, and confirm the unlock using Volume Up.

Wait for completion

If the fastboot flashing unlock command doesn’t work, try the alternative:

fastboot oem unlock

Attention. ⚠️: On some firmware after unlocking the Mi bootloader A2 Lite can hang on the Google logo:

  1. Press Power + Volume Up for 15 seconds for forced reboot.
  2. If it doesn’t help, run the stock firmware through fastboot (instructions in the next section).

πŸ’‘

If the phone doesn't turn on after unlocking, don't panic. Connect it to charge for 30 minutes - sometimes "waking up" the battery helps.

Installation of custom TWRP Recovery

Once the bootloader is unlocked, you need to install a custom recap (TWRP) to be able to flash Magisk and other modifications. For the Mi A2 Lite, a special TWRP build with support for daisy is suitable.

Download the current version of TWRP from the official website: https://twrp.me/xiaomi/xiaomimia2lite.html

Pay attention to the Android version – Android 10 and Android 11 use different builds!

Installation instructions:

  1. Move your phone to fastboot mode (as in the previous section).
  2. Connect to your PC and check for device detection by the fastboot device command.
  3. Switch the TWRP command (replace twrp.img with the name of the downloaded file): fastboot flash recovery twrp.img
  4. Without disabling USB, go straight to TWRP: fastboot boot twrp.img
  5. In TWRP, swipe to allow modifications (if you request).

Attention. ⚠️: After installation TWRP The phone is loaded into the stock recap, so the firmware is overwriting the custom:

  1. In TWRP, go to Mount β†’ Enable MTP.
  2. Copy the file no-verity-opt-encrypt.zip (download here).
  3. Sweat it through Install in TWRP.

This will disable dm-verity checks, which prevent the modified system from booting.

What happens if TWRP is not installed?
If you see a FAILED error (remote: 'Not allowed in Lock State') when you are running TWRP, then the bootloader is not fully unlocked. Repeat the unlock procedure from the third partition. If the Invalid sparse file format at header error, download another TWRP image (possibly corrupted).

Install Magisk for root rights

Magisk is a universal tool for obtaining root rights without making changes to the systemless root, which allows you to pass SafetyNet check and use banking applications.

Step-by-step:

    To fix the bootloop:

    1. Press Power + Volume Up to Enter TWRP.
    2. Scan Magisk-uninstaller.zip (download on the same GitHub page).
    3. Delete any additional zip files that you have previously downloaded.
    4. Reboot and re-install Magisk with the correct version.

    πŸ’‘

    On Mi. A2 Lite cannot be installed by Magisk through a boot image patch (a method for devices with a locked bootloader). TWRP!

    Checking the efficiency and solving problems

    After successful installation, Magisk must ensure that:

    1. Root rights work: Open Magisk Manager and check the status at the top of the screen.
    2. SafetyNet passes: In Magisk Manager, click SafetyNet Check. If the test fails, install Universal SafetyNet Fix through the Modules section.
    3. Banking applications are launched: some applications (for example, SberBank Online) can block work on rooted devices.
    Problem.Reason.Decision
    Application won't startRoot foundEnable MagiskHide in the settings and add the app to the list of hidden
    SafetyNet does not passIncompatible boot imageInstall Universal SafetyNet Fix + Magisk v24+
    The phone's not charging.Misc section damagedFastboot Firmware without Userdata Formatting
    No net after the rootDamaged modem.Flow stock modem and fsg through TWRP

    Attention. ⚠️: If after rooting, navigation gestures or a fingerprint stop working, this is due to a modification of the vendor section. ROM Supports these functions (e.g. LineageOS).

    To check the integrity of the system, use the command in ADB:

    adb shell su -c "dmesg | grep -i error"

    If the conclusion is empty, there are no critical errors.

    How to get it all back: a rollback to stock firmware

    If you need to remove root rights (for example, for warranty repairs), follow the following steps:

    1. Download the stock firmware for your model from the Xiaomi Firmware Updater. For the Mi A2 Lite, choose the daisy section.
    2. Unpack the archive and find the file. flash_all.bat (for Windows or flash_all.sh (for Linux/macOS).
    3. Connect your phone to fastboot and start the script, and it will automatically stitch all the partitions.
    4. After the firmware, block the bootloader with the command: fastboot flashing lock Attention ⚠️: This will completely erase all data on the device!

    If the script flash_all.bat It doesn’t work, so you can manually run the firmware:

    fastboot flash boot boot.img
    
    
    fastboot flash system system.img
    
    
    
    
    fastboot flash vendor vendor.img
    
    
    
    
    fastboot flash dtbo dtbo.img
    
    
    
    
    fastboot erase userdata
    
    
    
    
    fastboot reboot

    To completely remove Magisk traces before locking the bootloader, perform in TWRP:

    1. Slice Magisk-uninstaller.zip.
    2. Format the data section (Wipe β†’ Format Data).
    3. Reboot to fastboot and block the bootloader.

    πŸ’‘

    Before blocking the bootloader, make sure that the phone has stock firmware without modifications, otherwise you risk getting a brick!

    Frequent Questions (FAQ)

    Can I get a root on the Mi A2 Lite without unlocking the bootloader?
    No. On all modern Xiaomi devices, including the Mi A2 Lite, unlocking the bootloader is a must for installing Magisk or SuperSU. Alternative methods (for example, through vulnerabilities in the kernel) for this model are not relevant due to regular security updates from Google.
    Why doesn't the NFC or camera work after the root?
    This is due to the modification of the vendor partition, which contains drivers for hardware components. Solutions: Sweat stock vendor.img through fastboot. Use custom ROM with corrected drivers (for example, Pixel Experience). Install the Magisk module to fix the vendor (if one exists for your firmware).
    How to update the firmware after receiving the root?
    Updating via OTA (over the air) is not recommended - it can lead to loss of root rights or bootloop. Instead: Download the full update image (payload.bin) from Google. Remove boot.img from it with Payload Dumper. Sweep boot.img through Magisk (Install to Inactive Slot option). Install the remaining partitions via fastboot. Or, more simply, wait for the community to release custom firmware based on the new update.
    Can I root Mi A2 Lite on Android 12?
    Officially Mi A2 Lite didn't get an update to Android 12, as Android One only guarantees 2 years of updates. However, unofficial ports (like LineageOS 19) support this version. ROM Android 12 based.Sweep Magisk for Android 12 (version) v24.0+). Use a kernel that is compatible with GKI 2.0 (required for new Android versions) Warning: Unofficial firmware may have camera bugs, NFC gestured.
    How to hide root from a specific application?
    Magisk Manager has a built-in MagiskHide feature, but it doesn't always work with modern root detection mechanisms. Alternative ways: Use the MagiskHide Props Config module to swap device fingerprints. Install Island or Shelter to isolate the application in a separate profile without a root. For banking applications, try BankApps Patch (a module for Magisk). If nothing works, temporarily disable the root via Magisk Manager (an option to disable Magisk) and restart the device.