From 980985af6e69a2215384205bcac02ba3ebd911f7 Mon Sep 17 00:00:00 2001 From: Daniel Zheng Date: Tue, 14 Mar 2023 17:20:08 +0000 Subject: [PATCH] Removed hardcoded check to copy AVB Footer Test: tested flashall on raven Bug: 194686221 Change-Id: Iaca03bde51fcd6b2886dc8ba84da4f67174a9c3f --- fastboot/fastboot.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index a9a822c04..ffd4f67db 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -1202,10 +1202,9 @@ static uint64_t get_partition_size(const std::string& partition) { } static void copy_avb_footer(const std::string& partition, struct fastboot_buffer* buf) { - if (buf->sz < AVB_FOOTER_SIZE) { + if (buf->sz < AVB_FOOTER_SIZE || is_logical(partition)) { return; } - // If overflows and negative, it should be < buf->sz. int64_t partition_size = static_cast(get_partition_size(partition)); @@ -1259,11 +1258,7 @@ void flash_partition_files(const std::string& partition, const std::vector