[Xiaomi Mi A2 / 6X Questions & Answers] ffpp.2003:
I got this phone from my friend, and he said that his phone was charging when it suddently shut off and never ever woke up again. The screen is in very bad contition, so I opened the phone and plugged it in to see if the battery died and did not wanted to take charge. The battery (thus old) appears to work fine and hold a charge. The thing is that when I plug it in onto my computer, it gets detected as Qualcomm HS-USB QDLoader 9008. I read that when you plug in your phone and it gets like that, it means that its on EDL mode. Well, it appears that no matter what i do it stays on EDL mode. I tried flashing the stock rom again on MiFlash20181115, but I get an error from miflash. Here is what the .log file looks like:

[19:51:39 COM5]:MiFlash 2018.11.15.0
[19:51:39 COM5]:flash in thread name:COM5,id:22
[19:51:39 COM5]:sw in images
[19:51:39 COM5]:flash in thread name:COM5,id:22
[19:51:39 COM5]:[COM5]:start flash.
[19:51:39 COM5]:received hello packet
[19:51:39 COM5]:download programmer D:\Users\ffpp2\Downloads\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\prog_emmc_firehose_Sdm660_ddr.elf
[19:51:39 COM5]:sahara read 64b data:imgID 13,offset 0,length 64
[19:51:39 COM5]:sahara read 64b data:imgID 13,offset 64,length 728
[19:51:39 COM5]:sahara read 64b data:imgID 13,offset 4096,length 4096
[19:51:39 COM5]:sahara read 64b data:imgID 13,offset 8192,length 2760
[19:51:39 COM5]:sahara read 64b data:imgID 13,offset 12288,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 16384,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 20480,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 24576,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 28672,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 32768,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 36864,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 40960,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 45056,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 49152,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 53248,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 57344,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 61440,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 65536,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 69632,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 73728,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 77824,length 4096
[19:51:40 COM5]:sahara read 64b data:imgID 13,offset 81920,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 86016,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 90112,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 94208,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 98304,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 102400,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 106496,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 110592,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 114688,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 118784,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 122880,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 126976,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 131072,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 135168,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 139264,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 143360,length 4096
[19:51:41 COM5]:sahara read 64b data:imgID 13,offset 147456,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 151552,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 155648,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 159744,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 163840,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 167936,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 172032,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 176128,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 180224,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 184320,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 188416,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 192512,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 196608,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 200704,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 204800,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 208896,length 4096
[19:51:42 COM5]:sahara read 64b data:imgID 13,offset 212992,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 217088,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 221184,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 225280,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 229376,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 233472,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 237568,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 241664,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 245760,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 249856,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 253952,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 258048,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 262144,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 266240,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 270336,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 274432,length 4096
[19:51:43 COM5]:sahara read 64b data:imgID 13,offset 278528,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 282624,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 286720,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 290816,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 294912,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 299008,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 303104,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 307200,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 311296,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 315392,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 319488,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 323584,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 327680,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 331776,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 335872,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 339968,length 4096
[19:51:44 COM5]:sahara read 64b data:imgID 13,offset 344064,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 348160,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 352256,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 356352,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 360448,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 364544,length 3216
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 367760,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 371856,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 375952,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 380048,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 384144,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 388240,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 392336,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 396432,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 400528,length 3776
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 404304,length 4096
[19:51:45 COM5]:sahara read 64b data:imgID 13,offset 408400,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 412496,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 416592,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 420688,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 424784,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 428880,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 432976,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 437072,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 441168,length 2312
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 443488,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 447584,length 3708
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 451296,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 455392,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 459488,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 463584,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 467680,length 4096
[19:51:46 COM5]:sahara read 64b data:imgID 13,offset 471776,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 475872,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 479968,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 484064,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 488160,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 492256,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 496352,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 500448,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 504544,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 508640,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 512736,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 516832,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 520928,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 525024,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 529120,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 533216,length 4096
[19:51:47 COM5]:sahara read 64b data:imgID 13,offset 537312,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 541408,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 545504,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 549600,length 2280
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 551888,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 555984,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 560080,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 564176,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 568272,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 572368,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 576464,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 580560,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 584656,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 588752,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 592848,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 596944,length 4096
[19:51:48 COM5]:sahara read 64b data:imgID 13,offset 601040,length 4096
[19:51:49 COM5]:sahara read 64b data:imgID 13,offset 605136,length 4096
[19:51:49 COM5]:sahara read 64b data:imgID 13,offset 609232,length 4096
[19:51:49 COM5]:sahara read 64b data:imgID 13,offset 613328,length 4096
[19:51:49 COM5]:sahara read 64b data:imgID 13,offset 617424,length 4096
[19:51:49 COM5]:sahara read 64b data:imgID 13,offset 621520,length 4096
[19:51:49 COM5]:sahara read 64b data:imgID 13,offset 625616,length 3520
[19:51:49 COM5]:sahara read end imgID:13 status:0
[19:51:49 COM5]:Send done packet
[19:51:49 COM5]:file D:\Users\ffpp2\Downloads\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\prog_emmc_firehose_Sdm660_ddr.elf transferred successfully
[19:51:51 COM5]:send nop command
[19:51:51 COM5]:send command:<?xml version="1.0" ?><data><nop verbose="0" value="ping"/></data>
[19:51:51 COM5]:get response from target
[19:51:51 COM5]:resdump:<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Binary build date: May 11 2021 @ 09:50:14"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Chip serial num: 0 (0x0)"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Supported Functions: program configure nop firmwarewrite patch setbootablestoragedrive ufs emmc power benchmark read getstorageinfo getsha256digest erase "/>
</data>

[19:51:51 COM5]:resdump:<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Binary build date: May 11 2021 @ 09:50:14
"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="fh.attrs.Verbose is set to 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Chip serial num: 0 (0x0)"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Supported Functions: program configure nop firmwarewrite patch setbootablestoragedrive ufs emmc power benchmark read getstorageinfo getsha256digest erase "/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="ACK" />
</data>

[19:51:51 COM5]:send configure command
[19:51:51 COM5]:send command:<?xml version="1.0" ?><data><configure verbose="0" AlwaysValidate="0" ZlpAwareHost="1" MaxPayloadSizeToTargetInBytes="131072" MemoryName="emmc" SkipStorageInit="0"/></data>
[19:51:51 COM5]:get response from target
[19:51:51 COM5]:resdump:<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Calling usb_al_bulk_set_zlp_mode(TRUE) since ZlpAwareHost='1'"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="ACK" MinVersionSupported="1" MemoryName="eMMC" MaxPayloadSizeFromTargetInBytes="4096" MaxPayloadSizeToTargetInBytes="131072" MaxPayloadSizeToTargetInBytesSupported="131072" MaxXMLSizeInBytes="4096" Version="1" TargetName="MSM8996" DateTime="May 11 2021 - 09:50:14" />
</data>

[19:51:51 COM5]:max buffer sector is 256
[19:51:51 COM5]:open program file D:\Users\ffpp2\Downloads\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\rawprogram0.xml
[19:51:51 COM5]:Write file D:\Users\ffpp2\Downloads\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\storsec.mbn to partition[storsec] sector 512
[19:51:51 COM5]:write file legnth 49168 to partition 512
[19:51:51 COM5]:WriteFile position 0, size 49664
[19:51:52 COM5]:resdump:<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: Failed to open the SDCC Device slot 0 partition 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: Failed to open the device 1 slot 0 partition 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="INFO: Device type 1, slot 0, partition 0, error 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="WARN: Get Info failed to open 1 slot 0, partition 0, error 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="storage_device_get_num_partition_sectors FAILED!"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="parseSectorValue could not handle start_sector value"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data>

[19:51:52 COM5]:resdump:<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="ERROR: XML not formed correctly. Expected a &lt; character at loc 0"/>
</data><?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="NAK" />
</data>

[19:51:53 COM5]:flashSuccess False
[19:51:53 COM5]:isFactory False CheckCPUID False
[19:51:53 COM5]:before:flashSuccess is False set IsUpdate:True set IsDone True
[19:51:53 COM5]:after:flashSuccess is False set IsUpdate:false set IsDone true
[19:51:53 COM5]:no Binary dump
[19:51:54 COM5]:no Binary dump
[19:51:55 COM5]:no Binary dump
[19:51:55 COM5]:no Binary dump
[19:51:56 COM5]:no Binary dump
[19:51:57 COM5]:no Binary dump
[19:51:57 COM5]:no Binary dump
[19:51:58 COM5]:no Binary dump
[19:51:59 COM5]:no Binary dump
[19:51:59 COM5]:no Binary dump
[19:51:59 COM5]:System.Exception
en XiaoMiFlash.code.bl.SerialPortDevice.WriteFilesToDevice(String portName, String swPath, String rawFilePath)
en XiaoMiFlash.code.bl.SerialPortDevice.FirehoseDownloadImg(String swPath)
en XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash() en XiaoMiFlash.code.bl.SerialPortDevice.WriteFilesToDevice(String portName, String swPath, String rawFilePath)
en XiaoMiFlash.code.bl.SerialPortDevice.FirehoseDownloadImg(String swPath)
en XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash()
[19:51:59 COM5]:no provision exit:COM5

Can somebody tell me what does all those errors mean, and what can i do to fix them and flash rhe stock rom back? Thanks