There's a guide already on XDA that covers this matter but in a general way and for all devices. That guide was based on the general info you may find on the original installation guide by @topjohnwu. So, all credits go to him.
Anyway, since there ins't a TWRP Recovery for Mi A3 (yet) and since I believe that many of you don't know about this, Iv'e decided to share here the steps I've done in order to root Mi A3.
NOTE: Now that we already have a working TWRP available for Mi A3, to root it you can now simply follow THESE steps after unlocking the bootloader.1 - Unlock the bootloader (if you haven't done it already...beware that this will erase all of your user data). To do so, you must:
The guide present on this thread, of course, works as well, so I'll leave it here for those of you who don't want to permanently install TWRP to your device.
- Enable developer options
- Enable the "OEM unlocking" option
- Enable USB debugging
- Have both adb and fastboot, from SDK Platform Tools available on your PC
- Connect your phone to your PC using the USB cable and run the following commands:
2 - Download Mi A3 stock boot.img that you may find on THIS GitHub(just to make sure that your phone is, in fact, recognized by your PC and that you're able to run adb commands)Code:adb devices
(so your phone will reboot into fastboot mode)Code:adb reboot bootloader
(after rebooting, boot the phone again into fastboot mode)Code:fastboot flashing unlock
(for full unlock)Code:fastboot flashing unlock_critical
- Copy this boot.img to your phone internal (or external) memory
- Leave a copy of it on your PC (on the same folder you have adb and fastboot...we never know if we don't need to use it again in the future...you know, to restore the stock boot.img, aka revert to stock...)
NOTES:At the time this post was written, the build on my phone was V10.3.5.0 (EU), that's why I've pointed to branch 10.3.5.0 on GitHub. If you're following this guide having a new or earlier build running, make sure to get the boot.img on the branch that matches your current build.
If, for your current build, there isn't a stock boot.img released yet, you may get one yourselves. How? READ THIS.
For all of you currently on 10.3.7.0 (EU) build, you may download stock boot.img HERE.
For all of you currently on 10.3.8.0 (EU) build, you may download stock boot.img HERE.
For all of you currently on 10.3.9.0 (EU) build, you may download stock boot.img HERE.
3 - Download latest Magisk Manager from HERE and install it on your phone
4 - Open Magisk Manager App and press:
- Install (again)
- Select and Patch a File
- Browse to the path where you saved stock boot.img and select it
5 - Copy the patched boot image from your device to your PC
- Store it on the same folder where you have adb and fastboot
- If you can’t find it via MTP, you can pull the file with ADB
6 - Uninstall Magisk Manager App from your phone (I'm not sure if this is really needed but I've done it anyway...)Code:adb pull /sdcard/Download/magisk_patched.img
7 - Flash the patched boot image to your phone by running these commands (remember, you must have patched boot image on the same folder you have adb and fastboot and, of course, your device must be connected to your PC...)
(THIS IS IMPORTANT! USE CONTINUE INSTEAD OF REBOOT! You have been warned!!!)Code:adb reboot bootloaderCode:fastboot flash boot magisk_patched.imgCode:fastboot continue
8 - After the phone boots up, hopefully with a normal boot (almost feels like nothing happened....), install Magisk Manager App again and watch Magisk doing it's magic!
9 - Enjoy!
All credits goes to topjohnwu and it's incredible work with Magisk.
I cannot be responsible if you turn your phone into a brick. Your phone, your choices, your responsibility!