[Xiaomi 13 Ultra] lubo777:
EDIT 1 HOUR after the Initial post bellow:

It seems that all the problems described in details bellow are due to some "fastboot quirks" , check the screenshot with the solution I found from Reddit which helped me to fix the problem.

I attached it bellow.

This problem costs me many long hours of testing and flashing my Xiaomi 13 Ultra.

The problem DISAPPEARED when i repeated the fastboot flash command on different laptop.

Before that I changed few different USB cables, different USB ports on my main laptop but this not fixed the problem, also changed the OS and flashed HyperOS ROM with MyFlash Tool in Windows 10, all other tests was on Ubuntu 20.

I'm posting bellow the detailed description of the initial problem in order to be available for other peoples lost in the same long hours problems with ... "fastboot quirks" !

Hello, from yesterday on my Xiaomi 13 Ultra I had same very very strange problem when flashing recovery or boot partition via fastboot.

I have found the same problem and a specific Google Pixel solution of the problem here and here.

In the fix I found above I had to edit my Partition table ... hmmm

The very strange problem started yesterday when I tried to flash some recovery image on my Xiaomi 13 Ultra and I received a error and the recovery was NOT flashed:

fastboot flash recovery recovery.img

Warning: skip copying recovery image avb footer (recovery partition size: 0, recovery image size: 104857600)

The flash process stays at this position forever

I tried to install then the whole ROM with:

fastboot update aosp_ishtar-xyz.zip

it flashed some things but stopped again here:

Warning: skip copying boot image avb footer (boot partition size: 0, boot image size: 201326592). Sending 'boot' (196608 KB)

All this problems started yesterday after a report from a XDA member for hard bricked device which stays in EDL mode: https://xdaforums.com/t/help-hard-bircked-xiaomi-13-ultra.4620075/#post-89417432

I booted my perfectly working phone in EDL mode for a test with this command:

fastboot oem edl

After that my Xiami 13 Ultra went in to the EDL mode.

I was able to see it in Windows 10 device manager as Qualcom HS-USB 9008 device, you can check the screenshot on the link here: https://xdaforums.com/t/help-hard-bircked-xiaomi-13-ultra.4620075/post-89417676

After the test boot in to EDL I restarted my phone pressing the Power button and the phone loaded its OS with no problem.

But after that the fastboot recovery partition size: 0 problems started ... hmmm

Just to be sure today I tested the same with my old Redmi Note 10 Pro and YES, now I have the same problem with my Redmi Note 10 Pro if I try to:

fastboot flash recovery recovery.img

... :)

Searching for fix I found this XDA HOWTO for fixing similar problem in Google Pixel phone: https://xdaforums.com/t/guide-syste...id-12-gapps-large-gsis-on-pixel-2-xl.4311129/

From this HOWTO I understood that my problem is due to some problems with my bootloader reading my Partition size table.

The problem reported above definitely is connected ONLY with the bootloader fastboot mode BECAUSE if I boot to my TWRP or Lineage OS or AOSPA recovery and from there I choose:

Reboot / Fastboot

there is no problem and I'm able to flash any recovery image .......... very very strange.

After discovering this I understood that the FASTBOOT mode which I enter when I reboot the phone pressing Volume Down + Power or if I use the command:

adb reboot bootloader

is working completely DIFFERENTLY than the FASTBOOT mode if I:

Reboot in to the recovery (TWRP / Lineage OS / AOSPA) and after that from the recovery sub menu I Reboot to Fastboot.

Actually when I'm using the AOSPA recovery (Paranoid Android) I enter in

fastbootD mode ...

when rebooting from TWRP I'm in some TWRP Fastboot mode which defenitelly is different than the FASTBOOT mode after

adb reboot bootloader

Do anybody have a Idea how to fix this strange problem when flashing in bootloader a recovery Image in Xiaomi 13 Ultra:

Warning: skip copying recovery image avb footer (recovery partition size: 0, recovery image size: 104857600)

In adb I have made a backup of my partition table using sgdisk

sgdisk --backup=/sdcard/Download/sgdisk-partitions-backup.gpt /dev/block/sda

The problem is that I'm not sure which partitions I have to delete and to recreate again ... :)

I have this partition info at the moment in my Xiaomi 13 Ultra:

1|ishtar:/sbin # sgdisk --print /dev/block/sda

Disk /dev/block/sda: 61842432 sectors, 235.9 GiB

Sector size (logical/physical): 4096/4096 bytes

Disk identifier (GUID): 81FFAFD1-8F52-13AE-53A0-053ABE9D3424

Partition table holds up to 32 entries

Main partition table begins at sector 2 and ends at sector 2

First usable sector is 6, last usable sector is 61842426

Partitions will be aligned on 2-sector boundaries

Total free space is 0 sectors (0 bytes)

Number Start (sector) End (sector) Size Code Name

1 6 7 8.0 KiB FFFF switch

2 8 15 32.0 KiB A02C ssd

3 16 23 32.0 KiB FFFF dbg

4 24 31 32.0 KiB FFFF bk01

5 32 63 128.0 KiB FFFF bk02

6 64 127 256.0 KiB FFFF bk03

7 128 255 512.0 KiB FFFF bk04

8 256 383 512.0 KiB A02D keystore

9 384 511 512.0 KiB FFFF frp

10 512 1023 2.0 MiB FFFF countrycode

11 1024 2047 4.0 MiB A01F misc

12 2048 4095 8.0 MiB FFFF bk05

13 4096 6143 8.0 MiB FFFF logfs

14 6144 8191 8.0 MiB FFFF ffu

15 8192 12287 16.0 MiB A021 devinfo

16 12288 28671 64.0 MiB FFFF metadata

17 28672 36863 32.0 MiB FFFF mtdblk

18 36864 76287 154.0 MiB FFFF blackbox

19 76288 80383 16.0 MiB FFFF oops

20 80384 157183 300.0 MiB A01C rawdump

21 157184 163839 26.0 MiB FFFF bk010

22 163840 163871 128.0 KiB FFFF vbmeta_system_a

23 163872 163903 128.0 KiB FFFF vbmeta_system_b

24 163904 164927 4.0 MiB FFFF mem

25 164928 170047 20.0 MiB FFFF opconfig

26 170048 178239 32.0 MiB FFFF mbnconfig

27 178240 211007 128.0 MiB A039 rescue

28 211008 735295 2.0 GiB FFFF cust

29 735296 3094591 9.0 GiB FFFF super

30 3094592 61842426 224.1 GiB A03A userdata

ishtar:/sbin #

P.S. I have tested also flashing a original clean Xiami ROM latest HyperOS from Windows 10 using MyFlash tool.

The flash of the HyperOS ROM exited after 10 minutes with some strange error, BUT I was able to boot in to the newly flashed HyperOS ROM.

My phone recovery was replaced with the HyperOS recovery and the HyperOS ROM was installed OK but unfortuantelly the problem with the 0 size partitions in bootloader was NOT fixed at all :(

EDIT 1 HOUR after the Initial post bellow:

It seems that all the problems described in details bellow are due to some "fastboot quirks" , check the screenshot with the solution I found from Reddit which helped me to fix the problem.

I attached it bellow.

This problem costs me many long hours of testing and flashing my Xiaomi 13 Ultra.

The problem DISAPPEARED when i repeated the fastboot flash command on different laptop.

Before that I changed few different USB cables, different USB ports on my main laptop but this not fixed the problem, also changed the OS and flashed HyperOS ROM with MyFlash Tool in Windows 10, all other tests was on Ubuntu 20.

I'm posting bellow the detailed description of the initial problem in order to be available for other peoples lost in the same long hours problems with ... "fastboot quirks" !