Since all of the current versions of TWRP Custom Recovery won’t work on the Android 8.0 ROM, we will root our Mi A1 without Custom Recovery. Basically, this is just a temporary solution which can be used until TWRP for Android 8 is released, after we will get the working TWRP version, we can use the old rooting method.
Update your phone to Android 8.0.0.
Download modified kernel and copy to phone internal memory: boot.img
Open Magisk Manager > go to “Install” > “Patch kernel image” > and locate previously copied “boot.img” file on your device.
Kernel image modification process should start.
Now copy patched boot file to PC. By default it would be saved to “/sdcard/MagiskManager/patched_boot.img”.
Start your Mi A1 device in fastboot mode and check the Android 8.0.0 slot by typing the following line in terminal:
fastboot getvar current-slot
Now flash the patched boot image to the corresponding Android 8.0 slot by using the following commands:
fastboot flash boot_a patched_boot.img
fastboot flash boot_b patched_boot.img
Reboot your phone with the following command:
Now you’ve enabled root on your Mi A1 with Android 8 ROM.
We’ll update this post as soon as the working version of TWRP Custom Recovery for Android Oreo is released.
How to install TWRP and root Mi A1 with Android 8 Oreo ROM
Pay attention, that there’s a small chance that your device might go bootloop after using the suggested method below, in this case simply flash the stock MIUI kernel on your phone to restore it. If you’ve got this issue, then it means that there’s no working root method for your device yet.