[Xiaomi Mi A2 / 6X Questions & Answers] MIN313:
Mi A2 Boot loop

The first thing you'll want to do here is extract the factory images archive that you downloaded from your manufacturer's website. For that part, I'd recommend using 7-Zip, as it's free and works with most archive formats , move all of the contents of the archive to the platform-tools folder inside of your ADB installation directory, then open an ADB Shell window in this folder.

Flash the system images individually. This method takes some extra work, but it can be used to un-root, update, or un-brick your device without losing existing data.

Start by extracting any additional archives from the factory images package. Sometimes, factory images packages can contain a series of three or four nested archives, so make sure to unzip all of them. From there, copy all of the image files to the main platform-tools folder—in other words, don't leave them in any sub-folders.

there are two images that you can get rid of: cache.img and userdata.img. These are the images that will overwrite your data and cache with blank space, so if you don't flash them, your existing data will remain intact.

Of the remaining images, six make up the core elements of Android: boot, bootloader, radio, recovery, system, and vendor.

The boot image contains the kernel, so if you just want to get rid of a custom kernel that's causing issues with your device, you only have to flash this one. To do that, type the following command into the ADB shell window:

//

fastboot flash boot <boot image file name>.img

//

Next is the bootloader image—this is the the interface that you're using to flash images with Fastboot commands. So to update your bootloader, type:

fastboot flash bootloader <bootloader image file name>.img

//

Once you've done that, you should reload the bootloader so that you can continue flashing images on the newer version. To do that, type:

fastboot reboot-bootloader

//

After that, we have the radio image. This one controls connectivity on your device, so if you're having problems with Wi-Fi or mobile data, or if you just want to update your radio, type:

fastboot flash radio <radio image file name>.img

//

Then there's recovery. This is something you may or may not want to flash, depending on the modifications you've made. For example, if you've installed TWRP custom recovery, flashing this image will overwrite your modification and replace it with the stock recovery interface. So if you're just updating your modded device, you should skip this one. Otherwise, if you plan to keep your phone stock and want the newer version of stock recovery, type:

fastboot flash recovery <recovery file name>.img

//

Next up is the big one: The system image. This one contains all of the files that make up the actual Android OS. As such, it's the most essential part of any update.

However you may not be updating your phone. You may just be re-flashing the stock firmware to recover from a soft brick. If this is the case, the system image is often the only image you need to flash in order to fix everything, because it contains the entirety of Android. In other words, if you flash this image and nothing else, it will undo any changes you made with root access and put everything back the way it was.

So as a cure-all in most soft brick situations, or as a method for getting the core part of an Android update, type:

fastboot flash system <system file name>.img

//

Finally, there's the vendor image. This is only present on newer phones, so don't worry if it's not in your factory images package. But if it's there, it contains a few important files, so type the following line to get this partition updated:

fastboot flash vendor <vendor file name>.img

//

After you've sent any or all of the above commands, you'll be ready to restart your device and boot into Android. To do that, type:

fastboot reboot

/

Thanks to Android gadget hacks .

P.S : Including today , it was 22nd time that i rooted , enabled camera2api .. but i think till know its useless .