In this guide, we will show you how to root Xiaomi Mi A2 and Mi A2 Lite using Magisk, without installing/using TWRP recovery at all. The instructions in this guide will work on any Mi A2/A2 Lite device running Android, 10, Android Pie, and Android Oreo.
Like its predecessor, the Xiaomi Mi A2, and Mi A2 Lite quickly gained a lot of attention from the custom development community, thanks to the Android One program. Both the devices support TWRP recovery officially, which means you can easily flash custom ROMs/kernels, mods, and root your phone by flashing the Magisk zip file.
We already have a tutorial published on how to install TWRP on Xiaomi Mi A2/Mi A2 Lite and root it through it. So why would you need to root your phone without TWRP? There are various scenarios, for example:
- TWRP recovery for your device doesn’t support the latest software version or render issues.
- Also, using this method makes it easier to take OTA updates on your rooted Mi A2/A2 Lite.
- Or, you might only need root (and not TWRP) for things like enabling camera2 API and install a GCam Port on it.
- Finally, if you are not planning on flash any custom ROMs, kernels, or mods, then it’s quite redundant to install TWRP in the first place.
As you can see, there are several reasons why you would want to use this method. Now that you are here, let’s begin with the instructions.
Related Article: Enable Camera2 API on Xiaomi Mi A2/A2 Lite without Rooting
Table of Contents
Make sure that you fulfill all the instructions listed below.
- Like always, we can’t help but strain enough that you take a complete backup of all your data stored on the phone. Although this process will not wipe anything, it is best to safeguard your data in case anything goes unplanned. We also have a comprehensive guide on how to backup Android phones completely.
- In order to root, you must first unlock the bootloader of your Mi A2/A2 Lite.
- If you have previously rooted your phone or applied any sort of modifications to your phone, then it is strongly advised to flash the stock firmware (fastboot image) using the Mi Flash tool before proceeding. This will ensure that you do not face any issues while installing OTA updates on your rooted Mi A2 device.
- Download Android platform-tools package and extract it on your PC. When asked to launch PowerShell (on Windows) or Terminal (on Linux/macOS), use the following instructions.
- On Windows: Go to the ‘platform-tools’ folder that you extracted earlier. Now, while holding the SHIFT key, right-click on an empty space inside this folder. Select ‘Open PowerShell window here’ from the menu.
- On Linux/macOS: Open the ‘Terminal’ and cd to the location of the ‘platform-tools’ folder. Example:
Instructions to Root Xiaomi Mi A2 and Mi A2 Lite using Magisk
For your convenience and a better understanding of the rooting procedure, we have split the instructions into three different steps. These are as follows.
Step 1: Download Boot Images
The first step of the rooting process is to download the stock boot image for the Android build number/software version currently installed on your Mi A2/A2 Lite.
Along with the stock boot images, we have also provided links to download the corresponding patched boot images. If you choose to use them, you can skip step (#2) of patching the stock boot image using Magisk Manager, and directly head over to step #3 and flash the provided patched boot image to root your phone.
However, we strongly recommend that you patch the stock boot image by yourself, using the instructions in the next step. That’s because Magisk takes a backup of the stock boot image during the patching process. This will allow you to easily restore the stock images for installing OTA updates on your phone after rooting.
For Xiaomi Mi A2 (jasmine_sprout)
|V184.108.40.206.QDIMIXM||Stock Boot Image||–|
|V220.127.116.11.QDIMIXM||Stock Boot Image||–|
|V18.104.22.168.QDIMIXM||Stock Boot Image||Patched Boot Image|
|V22.214.171.124.QDIMIXM||Stock Boot Image||Patched Boot Image|
|V126.96.36.199.QDIMIXM||Stock Boot Image||Patched Boot Image|
|V188.8.131.52.QDIMIXM||Stock Boot Image||–|
|V184.108.40.206.QDIMIXM||Stock Boot Image||–|
|V220.127.116.11.QDIMIXM||Stock Boot Image||–|
|V18.104.22.168.QDIMIXM||Stock Boot Image||Patched Boot Image|
|V22.214.171.124.QDIMIXM||Stock Boot Image||Patched Boot Image|
|V126.96.36.199.QDIMIXM||Stock Boot Image||Patched Boot Image|
|V188.8.131.52.QDIMIXM||Stock Boot Image||Patched Boot Image|
|V184.108.40.206.QDIMIXM||Stock Boot Image||Patched Boot Image|
For Xiaomi Mi A2 Lite (daisy)
|V220.127.116.11.QDLMIXM||Stock Boot Image||–|
|V18.104.22.168.QDLMIXM||Stock Boot Image||–|
|V22.214.171.124.QDLMIXM||Stock Boot Image||Patched Boot Image|
|V126.96.36.199.QDLMIXM||Stock Boot Image||Patched Boot Image|
|V188.8.131.52.QDLMIXM||Stock Boot Image||Patched Boot Image|
|V184.108.40.206.QDLMIXM||Stock Boot Image||Patched Boot Image|
|V220.127.116.11.QDLMIXM||Stock Boot Image||Patched Boot Image|
|V18.104.22.168.QDLMIXM||Stock Boot Image||Patched Boot Image|
|V22.214.171.124.QDLMIXM||Stock Boot Image||Patched Boot Image|
|V126.96.36.199.QDLMIXM||Stock Boot Image||Patched Boot Image|
Huge thanks to Roy Goldberg, Nico van Draanen, and XDA Senior Member Aerobatic for contributing to this article by sharing the patched and stock boot images!
Step 2: Patch Stock Boot Image using Magisk Manager
- Download the stock boot image for your Xiaomi Mi A2/A2 Lite. Ensure that you download the version corresponding to the current software version (build number) installed on your phone.
- Transfer the downloaded file to your phone’s storage.
- Now download the latest Magisk Manager APK on your phone.
- Use a file browser app and install the downloaded APK file.
- Next, go to the app drawer and launch the ‘Magisk Manager‘ app.
- Tap on the ‘Install‘ button and select ‘Install‘.
- Tap on the ‘Select and Patch a File‘ option.
- Navigate through the phone’s storage and select the stock boot image file (e.g. stock_boot_10.0.14.0_mi_a2_lite.img).
- Magisk Manager will now start the patching process.
- Once finished, the resultant Magisk-patched boot image (magisk_patched.img) file would be placed in ‘[internal storage]\Download‘ of your phone.
Now that you have the Magisk Patched Boot Image, move down to the third step to finally root your Xiaomi Mi A2 device.
Step 3: Flash Patched Boot Image to root Xiaomi Mi A2/Mi A2 Lite
- Connect your Mi A2/A2 Lite to the PC using the USB cable.
- Transfer the ‘magisk_patched.img‘ file to the directory on the PC where the Android SDK platform-tools (ADB and fastboot) are present.
- Launch the PowerShell on Windows or the Terminal app if you’re using Linux/macOS PC (Refer to pointer #4 in Prerequisites).
- Power off your Mi A2/A2 Lite completely.
- Boot your phone into Fastboot Mode by pressing and holding the Volume Down and Power buttons together.
- Connect your phone to the PC using the USB cable once it is in Fastboot Mode.
- Enter the following code to flash the patched boot image and root Xiaomi Mi A2/A2 Lite using Magisk.
- If you downloaded the pre-patched boot image from above, then make sure to replace [“patched-boot-image.img“] with the actual filename of the downloaded patched boot image. For example, if you downloaded the V188.8.131.52 patched boot image for Mi A2, the command would the following.
fastboot flash boot patched_boot_184.108.40.206_mi_a2.img
- Since the Mi A2 and A2 Lite support the A/B partition scheme, Magisk will only be installed on your phone’s current active slot; leaving the inactive slot untouched.
- Finally, reboot your phone into the OS by entering the following code:
Your Xiaomi Mi A2/A2 Lite will reboot into the system (OS) and should be rooted now. To confirm that the process was successful, simply launch the Magisk Manager application from the app drawer.
With your phone rooted now, you can install Magisk Modules to add third-party features or to simply apply modifications systemless-ly. You can also use MagiskHide to hide root from root-detecting apps. To sum up, there’s a lot you can do on your phone now.
So, you have just succeeded to root Xiaomi Mi A2/Mi A2 Lite running Android 10/Pie/Oreo using Magisk, without installing TWRP. If you have any questions regarding the procedure, let us know via the comments.