[Xiaomi Mi A2 / 6X Guides, News, & Discussion] matchung:
I got some problems during flashing: (from Oreo)

1. due to critical is locked, i cannt flash some of the partitions as below:

fastboot flash devcfg_a devcfg.img
Sending 'devcfg_a' (48 KB) OKAY [ -0.000s]
Writing 'devcfg_a' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.031s

fastboot flash devcfg_b devcfg.img
Sending 'devcfg_b' (48 KB) OKAY [ 0.016s]
Writing 'devcfg_b' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.016s

fastboot flash xbl_a xbl.img
Sending 'xbl_a' (2508 KB) OKAY [ 0.062s]
Writing 'xbl_a' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.062s

fastboot flash xbl_b xbl.img
Sending 'xbl_b' (2508 KB) OKAY [ 0.062s]
Writing 'xbl_b' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.078s

fastboot flash pmic_a pmic.img
Sending 'pmic_a' (40 KB) OKAY [ 0.016s]
Writing 'pmic_a' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.031s

fastboot flash pmic_b pmic.img
Sending 'pmic_b' (40 KB) OKAY [ -0.000s]
Writing 'pmic_b' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.016s

fastboot flash rpm_a rpm.img
Sending 'rpm_a' (220 KB) OKAY [ 0.016s]
Writing 'rpm_a' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.016s

fastboot flash rpm_b rpm.img
Sending 'rpm_b' (220 KB) OKAY [ 0.016s]
Writing 'rpm_b' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.031s

fastboot flash tz_a tz.img
Sending 'tz_a' (1924 KB) OKAY [ 0.203s]
Writing 'tz_a' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.203s

fastboot flash tz_b tz.img
Sending 'tz_b' (1924 KB) OKAY [ 0.062s]
Writing 'tz_b' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.062s

fastboot flash hyp_a hyp.img
Sending 'hyp_a' (272 KB) OKAY [ 0.016s]
Writing 'hyp_a' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.031s

fastboot flash hyp_b hyp.img
Sending 'hyp_b' (272 KB) OKAY [ 0.016s]
Writing 'hyp_b' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.031s

fastboot flash keymaster_a keymaster.img
Sending 'keymaster_a' (308 KB) OKAY [ 0.031s]
Writing 'keymaster_a' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.047s

fastboot flash keymaster_b keymaster.img
Sending 'keymaster_b' (308 KB) OKAY [ 0.016s]
Writing 'keymaster_b' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.031s

fastboot flash cmnlib64_a cmnlib64.img
Sending 'cmnlib64_a' (268 KB) OKAY [ 0.016s]
Writing 'cmnlib64_a' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.031s

fastboot flash cmnlib64_b cmnlib64.img
Sending 'cmnlib64_b' (268 KB) OKAY [ 0.016s]
Writing 'cmnlib64_b' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.031s

fastboot flash cmnlib_a cmnlib.img
Sending 'cmnlib_a' (220 KB) OKAY [ 0.016s]
Writing 'cmnlib_a' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.031s

fastboot flash cmnlib_b cmnlib.img
Sending 'cmnlib_b' (220 KB) OKAY [ 0.016s]
Writing 'cmnlib_b' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.016s

fastboot flash abl_a abl.img
Sending 'abl_a' (148 KB) OKAY [ 0.016s]
Writing 'abl_a' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.031s

fastboot flash abl_b abl.img
Sending 'abl_b' (148 KB) OKAY [ 0.016s]
Writing 'abl_b' FAILED (remote: Flashing is not allowed for Critical Partitions)
Finished. Total time: 0.031s

I follow the post on #40

fastboot flashing unlock_critical

but it is denied (my device is unlocked)

fastboot flashing unlock
FAILED (remote: Device already : unlocked!)
Finished. Total time: 0.016s

fastboot flashing unlock_critical
FAILED (remote: Flashing Unlock is not allowed)
Finished. Total time: 0.016s

2. I think the most critical issue that the system partition cant be flashed.

fastboot flash system_a system.img
Invalid sparse file format at header magic
Sending sparse 'system_a' 1/4 (524286 KB) OKAY [ 17.802s]
Writing sparse 'system_a' 1/4 OKAY [ -0.000s]
Sending sparse 'system_a' 2/4 (524285 KB) OKAY [ 28.917s]
Writing sparse 'system_a' 2/4 OKAY [ 0.016s]
Sending sparse 'system_a' 3/4 (524286 KB) FAILED (data write failure (Unknown error))
Finished. Total time: 155.806s

At this point, the device is frozen and can no longer accept command. I waited for more than 30 mins to let the batch file completes, but seems do not help, the device is frozen.

Any idea?

Thx.