Of course rooting your smartphone helps you a lot, but it voids your warranty so you should do it at your own risk. You should be able to figure out the consequences earlier of rooting and you should also have a proper purpose of rooting your smartphone. If you have rooted your Xiaomi Mi A1 and you probably want to take down all the things back from where it was started, you need to unroot your device again. So, here I'm going to tell you how you can unroot your smartphone Xiaomi Mi A1 in very simple steps.
This guide is only for Xiaom Mi A1. Don't try this on other devices.
Take a full backup of your data before unrooting to save any loss of data.
Stuffcompare will not be responsible for bricking of any devices.
You have to unlock the bootloader and lock it back after you are done.
Here I'm providing stock boot file which will help you in reverting your Xiaomi Mi A1
Xiaomi Mi A1 Stock Boot Image File (Download from here)
How to Unroot Xiaomi Mi A1 smartphone
Download the Mi A1 Fastboot Image File (from above link)
Untick all the Magisk Modules
Click on the delete icon besides them
Reboot your Xiaomi Mi A1
Open Magisk Manager and completely uninstall it
Turn off the device
Press Volume Down+ Power Button to enter the Xiaomi Mi A1 in fastboot mode
Unlock the OEM Command using command : fastboot oem unlock
Perform check for the current slot by command: fastboot getvar current-slot
Flash the fastboot image by:fastboot flash boot_a boot.img
Now you also have to lock your OEM using command: fastboot oem lock
Reboot your device using command: fastboot reboot
There you go, your Xiaomi Mi A1 is finally unrooted now. I checked itself in my smartphone and it's working. Ping the comments if you get stuck somewhere