Warning
Probably these steps won't help you because Xiaomi Pad 5 doesn't have a fully working custom recovery to flash it to device. Also like most of newer A/B devices we don't have a TWRP Installer zip etc. and you can't boot existing recovery image because of broken fastboot. If you have already installed AOSP rom, probably it has a preinstalled AOSP recovery and you can boot it directly, so you can follow these steps. If you have unrooted MIUI, this steps won't help you.
So please avoid to use disk labels which contains spaces and special characters, and if it is possible just use ESPNABU and WINNABU labels which are tested for a million times. If you brick fastboot with disk labels and you have unrooted MIUI, you have to flash rom via EDL with authorized account and you have to pay for it.
This is caused by partitions with volume names the bootloader cannot handle, to fix this:
-
Boot to recovery
-
Connect tablet to PC
-
Open cmd on PC
-
Run
adb shell
-
Run
parted
-
Run
print
to list all partitions -
Look for partitions that have spaces in the names e.g "Basic Data Partition" and note their volume number
-
Now run
rm <vol number>
e.grm 99
-
Open driver folder
-
Remove the
components\QC8150\Device\DEVICE.SOC_QC8150.NABU\Drivers\USB
folder -
Reinstall the driver
-
Boot UEFI
-
After it boots, readd the driver and reinstall the driver again
-
Run fastboot
-
fastboot set_active other
-
fastboot flash boot <boot.img>
-
fastboot reboot