Removed hardcoded check to copy AVB Footer
Test: tested flashall on raven
Bug: 194686221
Change-Id: Iaca03bde51fcd6b2886dc8ba84da4f67174a9c3f
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index a9a822c..ffd4f67 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -1202,10 +1202,9 @@
}
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<int64_t>(get_partition_size(partition));
@@ -1259,11 +1258,7 @@
static void flash_buf(const std::string& partition, struct fastboot_buffer* buf,
const bool apply_vbmeta) {
- if (partition == "boot" || partition == "boot_a" || partition == "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);
- }
+ copy_avb_footer(partition, buf);
// Rewrite vbmeta if that's what we're flashing and modification has been requested.
if (g_disable_verity || g_disable_verification) {