Merge "Added check to copy AVB footer" am: 4aa47338f2 am: 4b9782620e am: 7e5d9609c8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2512556
Change-Id: Iafc7d3c3784fb69f49fcf7f43fbf823b10b86f95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index e76cbc5..42269fe 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -1197,7 +1197,8 @@
}
static void copy_avb_footer(const std::string& partition, struct fastboot_buffer* buf) {
- if (buf->sz < AVB_FOOTER_SIZE || is_logical(partition)) {
+ if (buf->sz < AVB_FOOTER_SIZE || is_logical(partition) ||
+ should_flash_in_userspace(partition)) {
return;
}
// If overflows and negative, it should be < buf->sz.