[Xiaomi Mi A2 / 6X Questions & Answers] djboris88:
The phone hasn't been tampered with, everything is stock (Android 9), bootloader is locked (was never unlocked), and developers mode hasn't been activated. In one moment, the phone froze, and I rebooted it. Ever since, when phone is booting, I get these messages:

And after that:

And here it is stuck for a while, and then the phone turns off.

$ sudo fastboot flashing lock
...
FAILED (remote:	Device already : locked!)
finished. total time: 0.000s

$ sudo fastboot flashing unlock
...
FAILED (remote: Flashing Unlock is not allowed
)
finished. total time: 0.001s

$ sudo fastboot oem device-info
...
(bootloader) Verity mode: true
(bootloader) Device unlocked: false
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: false
OKAY [ 0.000s]
finished. total time: 0.000s

I can only get into the bootloader screen, even recovery (stock) gives the same errors.

fastboot getvar all results:

(bootloader) crc:1
(bootloader) anti:1
(bootloader) token:9zyVLN03ysY1ufE//aieBz/eq+8=
(bootloader) hw-revision:10000
(bootloader) unlocked:no
(bootloader) off-mode-charge:0
(bootloader) charger-screen-enabled:0
(bootloader) battery-soc-ok:yes
(bootloader) battery-voltage:3891
(bootloader) version-baseband:
(bootloader) version-bootloader:
(bootloader) erase-block-size: 0x200
(bootloader) logical-block-size: 0x200
(bootloader) variant:SDM EMMC
(bootloader) partition-type:userdata:ext4
(bootloader) partition-size:userdata: 0xBB77F7E00
(bootloader) partition-type:vendor_b:raw
(bootloader) partition-size:vendor_b: 0x80000000
(bootloader) partition-type:vendor_a:raw
(bootloader) partition-size:vendor_a: 0x80000000
(bootloader) partition-type:system_b:ext4
(bootloader) partition-size:system_b: 0xC0000000
(bootloader) partition-type:system_a:ext4
(bootloader) partition-size:system_a: 0xC0000000
(bootloader) partition-type:cache:ext4
(bootloader) partition-size:cache: 0x10000000
(bootloader) partition-type:boot_b:raw
(bootloader) partition-size:boot_b: 0x4000000
(bootloader) partition-type:boot_a:raw
(bootloader) partition-size:boot_a: 0x4000000
(bootloader) partition-type:minidump:raw
(bootloader) partition-size:minidump: 0x8000000
(bootloader) partition-type:rawdump:raw
(bootloader) partition-size:rawdump: 0x8000000
(bootloader) partition-type:modem_b:raw
(bootloader) partition-size:modem_b: 0xC000000
(bootloader) partition-type:modem_a:raw
(bootloader) partition-size:modem_a: 0xC000000
(bootloader) partition-type:logdump:raw
(bootloader) partition-size:logdump: 0x4000000
(bootloader) partition-type:persistbak:raw
(bootloader) partition-size:persistbak: 0x2000000
(bootloader) partition-type:persist:raw
(bootloader) partition-size:persist: 0x2000000
(bootloader) partition-type:splash:raw
(bootloader) partition-size:splash: 0x4000000
(bootloader) partition-type:mdtp_b:raw
(bootloader) partition-size:mdtp_b: 0x2000000
(bootloader) partition-type:mdtp_a:raw
(bootloader) partition-size:mdtp_a: 0x2000000
(bootloader) partition-type:bk1:raw
(bootloader) partition-size:bk1: 0x700000
(bootloader) partition-type:bluetooth_b:raw
(bootloader) partition-size:bluetooth_b: 0x100000
(bootloader) partition-type:dsp_b:raw
(bootloader) partition-size:dsp_b: 0x1000000
(bootloader) partition-type:dsp_a:raw
(bootloader) partition-size:dsp_a: 0x1000000
(bootloader) partition-type:modemst2:raw
(bootloader) partition-size:modemst2: 0x800000
(bootloader) partition-type:modemst1:raw
(bootloader) partition-size:modemst1: 0x800000
(bootloader) partition-type:fsg:raw
(bootloader) partition-size:fsg: 0x800000
(bootloader) partition-type:logfs:raw
(bootloader) partition-size:logfs: 0x800000
(bootloader) partition-type:devinfo:raw
(bootloader) partition-size:devinfo: 0x800000
(bootloader) partition-type:misc:raw
(bootloader) partition-size:misc: 0x400000
(bootloader) partition-type:xbl_b:raw
(bootloader) partition-size:xbl_b: 0x380000
(bootloader) partition-type:xbl_a:raw
(bootloader) partition-size:xbl_a: 0x380000
(bootloader) partition-type:sti:raw
(bootloader) partition-size:sti: 0x200000
(bootloader) partition-type:bluetooth_a:raw
(bootloader) partition-size:bluetooth_a: 0x100000
(bootloader) partition-type:keymaster_b:raw
(bootloader) partition-size:keymaster_b: 0x100000
(bootloader) partition-type:keymaster_a:raw
(bootloader) partition-size:keymaster_a: 0x100000
(bootloader) partition-type:mdtpsecapp_b:raw
(bootloader) partition-size:mdtpsecapp_b: 0x400000
(bootloader) partition-type:mdtpsecapp_a:raw
(bootloader) partition-size:mdtpsecapp_a: 0x400000
(bootloader) partition-type:tz_b:raw
(bootloader) partition-size:tz_b: 0x400000
(bootloader) partition-type:tz_a:raw
(bootloader) partition-size:tz_a: 0x400000
(bootloader) partition-type:devcfg_b:raw
(bootloader) partition-size:devcfg_b: 0x100000
(bootloader) partition-type:devcfg_a:raw
(bootloader) partition-size:devcfg_a: 0x100000
(bootloader) partition-type:toolsfv:raw
(bootloader) partition-size:toolsfv: 0x100000
(bootloader) partition-type:ddr:raw
(bootloader) partition-size:ddr: 0x100000
(bootloader) partition-type:dip:raw
(bootloader) partition-size:dip: 0x100000
(bootloader) partition-type:abl_b:raw
(bootloader) partition-size:abl_b: 0x100000
(bootloader) partition-type:abl_a:raw
(bootloader) partition-size:abl_a: 0x100000
(bootloader) partition-type:cmnlib64_b:raw
(bootloader) partition-size:cmnlib64_b: 0x100000
(bootloader) partition-type:cmnlib_b:raw
(bootloader) partition-size:cmnlib_b: 0x100000
(bootloader) partition-type:cmnlib64_a:raw
(bootloader) partition-size:cmnlib64_a: 0x100000
(bootloader) partition-type:cmnlib_a:raw
(bootloader) partition-size:cmnlib_a: 0x100000
(bootloader) partition-type:pmic_b:raw
(bootloader) partition-size:pmic_b: 0x80000
(bootloader) partition-type:pmic_a:raw
(bootloader) partition-size:pmic_a: 0x80000
(bootloader) partition-type:hyp_b:raw
(bootloader) partition-size:hyp_b: 0x80000
(bootloader) partition-type:hyp_a:raw
(bootloader) partition-size:hyp_a: 0x80000
(bootloader) partition-type:rpm_b:raw
(bootloader) partition-size:rpm_b: 0x80000
(bootloader) partition-type:rpm_a:raw
(bootloader) partition-size:rpm_a: 0x80000
(bootloader) partition-type:frp:raw
(bootloader) partition-size:frp: 0x80000
(bootloader) partition-type:keystore:raw
(bootloader) partition-size:keystore: 0x80000
(bootloader) partition-type:msadp:raw
(bootloader) partition-size:msadp: 0x40000
(bootloader) partition-type:apdp:raw
(bootloader) partition-size:apdp: 0x40000
(bootloader) partition-type:oops:raw
(bootloader) partition-size:oops: 0x20000
(bootloader) partition-type:storsec:raw
(bootloader) partition-size:storsec: 0x20000
(bootloader) partition-type:vbmeta_b:raw
(bootloader) partition-size:vbmeta_b: 0x10000
(bootloader) partition-type:vbmeta_a:raw
(bootloader) partition-size:vbmeta_a: 0x10000
(bootloader) partition-type:sec:raw
(bootloader) partition-size:sec: 0x5000
(bootloader) partition-type:ssd:raw
(bootloader) partition-size:ssd: 0x8000
(bootloader) partition-type:limits:raw
(bootloader) partition-size:limits: 0x8000
(bootloader) partition-type:fsc:raw
(bootloader) partition-size:fsc: 0x2000
(bootloader) partition-type:dpo:raw
(bootloader) partition-size:dpo: 0x2000
(bootloader) partition-type:switch:raw
(bootloader) partition-size:switch: 0x2000
(bootloader) has-slot:modem:yes
(bootloader) has-slot:system:yes
(bootloader) current-slot:a
(bootloader) has-slot:boot:yes
(bootloader) slot-retry-count:b:6
(bootloader) slot-unbootable:b:no
(bootloader) slot-successful:b:yes
(bootloader) slot-retry-count:a:6
(bootloader) slot-unbootable:a:no
(bootloader) slot-successful:a:yes
(bootloader) slot-count:2
(bootloader) secure:yes
(bootloader) serialno:3fd43b6
(bootloader) product:jasmine
(bootloader) max-download-size:536870912
(bootloader) kernel:uefi

Is there any help to this phone?