From acb49528a7fcd38e579dbd20ac0d350c542ae386 Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Thu, 12 Jan 2023 14:28:29 -0800 Subject: [PATCH] fastboot: Copy AVB footer from recovery.img to the end of the partition Copy the AVB footer of the recovery.img to the end of the recovery partition, so that it can be found when loading a recovery image from a partition that is larger than the image. Bug: 261673286 Test: m and flashing recovery image and bootloader can now detect AVB footer. Change-Id: Ib93da33c72f3a96eb8d9bcedaab5ef0c3a4d418d Signed-off-by: Isaac J. Manjarres --- fastboot/fastboot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index f1b82e9fe..9676f8779 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -1082,7 +1082,8 @@ static void flash_buf(const std::string& partition, struct fastboot_buffer* buf) sparse_file** s; if (partition == "boot" || partition == "boot_a" || partition == "boot_b" || - partition == "init_boot" || partition == "init_boot_a" || partition == "init_boot_b") { + partition == "init_boot" || partition == "init_boot_a" || partition == "init_boot_b" || + partition == "recovery" || partition == "recovery_a" || partition == "recovery_b") { copy_avb_footer(partition, buf); }