repack_bootimg: support vendor_boot v4

Since vendor boot v4 supports multiple vendor ramdisk fragments,
we can add new files into a newly created ramdisk then repack it
with other vendor ramdisk fragments.

However, if the vendor_boot.img only contains a single vendor ramdisk
fragment, we'll still add new files into this vendor ramdisk. Because
we're not sure if the bootloader can really parse multiple vendor
ramdisks.

Bug: 174443192
Test: repack_bootimg.py --src_bootimg <> --dst_bootimg <>
Test: unpack_bootimg --boot_img <dst_bootimg> then unpack the ramdisk

Change-Id: I0dabf125f8e3a2b8e24f090b6aedc387d125b055
1 file changed