[Xiaomi Mi A1 Questions & Answers] jimmyhurr:
I have been trying, unsuccessfully to sort out my Mi A1 phone - this phone was running stock Android 7.1.2 and had never been rooted. Initially I wanted to give the phone to someone else and so I wanted to do a factory reset - however this would not work from within Android or using the Power+Volume Up buttons. In both cases the phone would reboot and nothing had changed.

I was then suggested to try using adb and try to boot into recovery from there, but that didn't work either.

Anyway, I am now at a situation where the phone is stuck in a reboot. The Mi logo shows and then an immediate reboot occurs, ad-infinitum!

I can get into fastboot however, and have therefore tried to re-flash the phone with the stock Mi A1 image using the Mi Flash GUI tool. However, this always fails with this error "Flash modem_a error". The log from the Mi Flash tool shows this:

[13:40:06 994d6a4f0604]:MiFlash 2018.5.28.0
[13:40:06 994d6a4f0604]:Thread id:20 Thread name:994d6a4f0604
[13:40:06 994d6a4f0604]:image path:C:\tissot_images_7.12.19_7.1
[13:40:06 994d6a4f0604]:env android path:"C:\Users\j_a_h\Downloads\MiFlash2018-5-28-0\MiFlash2018-5-28-0\Source\ThirdParty\Google\Android"
[13:40:06 994d6a4f0604]:script :C:\tissot_images_7.12.19_7.1\flash_all.bat
[13:40:06 994d6a4f0604]:Physical Memory Usage:1785856 Byte
[13:40:06 994d6a4f0604]:start process id 4256 name cmd
[13:40:06 994d6a4f0604]:info:$fastboot -s 994d6a4f0604 getvar product 2>&1 | findstr /r /c:"^product: *tissot" ||
[13:40:06 994d6a4f0604]:info:product: tissot
[13:40:06 994d6a4f0604]:info:$fastboot -s 994d6a4f0604 oem unlock ||
[13:40:06 994d6a4f0604]:err:Warning: Device A/B support is outdated. Bootloader update required.
[13:40:06 994d6a4f0604]:info:$fastboot -s 994d6a4f0604 flash modem_a C:\tissot_images_7.12.19_7.1\images\modem.img ||
[13:40:06 994d6a4f0604]:err:...
[13:40:06 994d6a4f0604]:err:(bootloader)	Device already : unlocked!
[13:40:06 994d6a4f0604]:err:eek:KAY [ 0.030s]
[13:40:06 994d6a4f0604]:err:finished. total time: 0.030s
[13:40:09 994d6a4f0604]:err:Warning: Device A/B support is outdated. Bootloader update required.
[13:40:09 994d6a4f0604]:err:target reported max download size of 536870912 bytes
[13:40:09 994d6a4f0604]:info:"Flash modem_a error"
[13:40:09 994d6a4f0604]:err:sending 'modem_a' (86016 KB)...
[13:40:09 994d6a4f0604]:err:eek:KAY [ 2.977s]
[13:40:09 994d6a4f0604]:err:writing 'modem_a'...
[13:40:09 994d6a4f0604]:err:FAILED (remote: partition table doesn't exist)
[13:40:09 994d6a4f0604]:err:finished. total time: 2.988s
[13:40:09 994d6a4f0604]:error:"Flash modem_a error"
[13:40:09 994d6a4f0604]:process exit.
[13:40:10 994d6a4f0604]:flashSuccess False
[13:40:10 994d6a4f0604]:isFactory False CheckCPUID False
[13:40:10 994d6a4f0604]:before:flashSuccess is False set IsUpdate:True set IsDone True
[13:40:10 994d6a4f0604]:after:flashSuccess is False set IsUpdate:false set IsDone true

fastboot getvar all:

fastboot getvar all
(bootloader) version:0.5
(bootloader) slot-active:b:no
(bootloader) slot-active:a:no
(bootloader) slot-unbootable:b:yes
(bootloader) slot-unbootable:a:yes
(bootloader) slot-successful:b:no
(bootloader) slot-successful:a:no
(bootloader) current-slot:
(bootloader) slot-suffixes:_a,
(bootloader) slot-count:1
(bootloader) battery-soc-ok:yes
(bootloader) battery-voltage:4273000
(bootloader) variant:QRD eMMC
(bootloader) secure:yes
(bootloader) version-baseband:
(bootloader) version-bootloader:
(bootloader) display-panel:
(bootloader) off-mode-charge:1
(bootloader) charger-screen-enabled:1
(bootloader) max-download-size: 0x20000000
(bootloader) partition-type:cache:ext4
(bootloader) partition-size:cache: 0x10000000
(bootloader) partition-type:userdata:ext4
(bootloader) partition-size:userdata: 0xd43779e00
(bootloader) partition-type:system:ext4
(bootloader) partition-size:system: 0xc0000000
(bootloader) serialno:994d6a4f0604
(bootloader) kernel:lk
(bootloader) product:tissot
all:
Finished. Total time: 0.292s

If anyone can offer any advice...? Thank you.