[Xiaomi Mi A1 ROMs, Kernels, Recoveries, & Other De] JoKeRLeE:
Just a reminder ,

EDL mode uses rawprogram0 , prog_emmc_firehose_8953_ddr.mbn , patch0 or partition isn't it ? Flash_factory will erase all the partition and causes device lost of IMEI , ESN, PSN and others sensors settings . and only flash-able during Fastboot mode .

fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *tissot" || [MENTION=279333]ECHO[/MENTION] "error : Missmatching image and device" & exit /B 1

fastboot %* oem unlock || [MENTION=279333]ECHO[/MENTION] "unlock error" & exit /B 1

fastboot %* flash partition %~dp0images\gpt_both0.bin || [MENTION=279333]ECHO[/MENTION] "Flash gpt_both0 error" & exit /B 1

fastboot %* flash modem_a %~dp0images\NON-HLOS.bin || [MENTION=279333]ECHO[/MENTION] "Flash modem_a error" & exit /B 1

fastboot %* flash modem_b %~dp0images\NON-HLOS.bin || [MENTION=279333]ECHO[/MENTION] "Flash modem_b error" & exit /B 1

fastboot %* flash sbl1 %~dp0images\sbl1.mbn || [MENTION=279333]ECHO[/MENTION] "Flash sbl1 error" & exit /B 1

fastboot %* flash sbl1bak %~dp0images\sbl1.mbn || [MENTION=279333]ECHO[/MENTION] "Flash sbl1bak error" & exit /B 1

fastboot %* flash rpm %~dp0images\rpm.mbn || [MENTION=279333]ECHO[/MENTION] "Flash rpm error" & exit /B 1

fastboot %* flash rpmbak %~dp0images\rpm.mbn || [MENTION=279333]ECHO[/MENTION] "Flash rpmbak error" & exit /B 1

fastboot %* flash tz %~dp0images\tz.mbn || [MENTION=279333]ECHO[/MENTION] "Flash tz error" & exit /B 1

fastboot %* flash tzbak %~dp0images\tz.mbn || [MENTION=279333]ECHO[/MENTION] "Flash tzbak error" & exit /B 1

fastboot %* flash devcfg %~dp0images\devcfg.mbn || [MENTION=279333]ECHO[/MENTION] "Flash devcfg error" & exit /B 1

fastboot %* flash devcfgbak %~dp0images\devcfg.mbn || [MENTION=279333]ECHO[/MENTION] "Flash devcfgbak error" & exit /B 1

fastboot %* flash dsp %~dp0images\adspso.bin || [MENTION=279333]ECHO[/MENTION] "Flash dsp error" & exit /B 1

fastboot %* flash fsg %~dp0images\fs_image.tar.gz.mbn.img || [MENTION=279333]ECHO[/MENTION] "Flash fs_image error" & exit /B 1

fastboot %* flash sec %~dp0images\sec.dat || [MENTION=279333]ECHO[/MENTION] "Flash sec error" & exit /B 1

fastboot %* flash splash %~dp0images\splash.img || [MENTION=279333]ECHO[/MENTION] "Flash splash error" & exit /B 1

fastboot %* flash aboot %~dp0images\emmc_appsboot.mbn || [MENTION=279333]ECHO[/MENTION] "Flash aboot error" & exit /B 1

fastboot %* flash abootbak %~dp0images\emmc_appsboot.mbn || [MENTION=279333]ECHO[/MENTION] "Flash abootbak error" & exit /B 1

fastboot %* flash boot_a %~dp0images\boot.img || [MENTION=279333]ECHO[/MENTION] "Flash boot_a error" & exit /B 1

fastboot %* flash boot_b %~dp0images\boot.img || [MENTION=279333]ECHO[/MENTION] "Flash boot_b error" & exit /B 1

fastboot %* flash system_a %~dp0images\system.img || [MENTION=279333]ECHO[/MENTION] "Flash system_a error" & exit /B 1

fastboot %* flash system_b %~dp0images\system.img || [MENTION=279333]ECHO[/MENTION] "Flash system_a error" & exit /B 1

fastboot %* flash lksecapp %~dp0images\lksecapp.mbn || [MENTION=279333]ECHO[/MENTION] "Flash lksecapp error" & exit /B 1

fastboot %* flash lksecappbak %~dp0images\lksecapp.mbn || [MENTION=279333]ECHO[/MENTION] "Flash lksecappbak error" & exit /B 1

fastboot %* flash cmnlib %~dp0images\cmnlib.mbn || [MENTION=279333]ECHO[/MENTION] "Flash cmnlib error" & exit /B 1

fastboot %* flash cmnlibbak %~dp0images\cmnlib.mbn || [MENTION=279333]ECHO[/MENTION] "Flash cmnlibbak error" & exit /B 1

fastboot %* flash cmnlib64 %~dp0images\cmnlib64.mbn || [MENTION=279333]ECHO[/MENTION] "Flash cmnlib64 error" & exit /B 1

fastboot %* flash cmnlib64bak %~dp0images\cmnlib64.mbn || [MENTION=279333]ECHO[/MENTION] "Flash cmnlib64bak error" & exit /B 1

fastboot %* flash keymaster %~dp0images\keymaster.mbn || [MENTION=279333]ECHO[/MENTION] "Flash keymaster error" & exit /B 1

fastboot %* flash keymasterbak %~dp0images\keymaster.mbn || [MENTION=279333]ECHO[/MENTION] "Flash keymasterbak error" & exit /B 1

fastboot %* flash userdata %~dp0images\userdata.img || [MENTION=279333]ECHO[/MENTION] "Flash userdata error" & exit /B 1

fastboot %* flash persist %~dp0images\persist.img || [MENTION=279333]ECHO[/MENTION] "Flash persist error" & exit /B 1

fastboot %* erase modemst1

fastboot %* erase modemst2

fastboot %* erase config || [MENTION=279333]ECHO[/MENTION] "Erase config error" & exit /B 1

fastboot %* reboot bootloader

ping 127.0.0.1 -n 5 -w 1000 > nul

fastboot %* set_active a

fastboot %* reboot

also , those code are NOT compatible for Mi A1 as modem uses modem.img not NON-HLOS.bin, sbl.img not sbl.mbn etc . for more information you may compare with flash_all with flash_factory .