Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e33e8a86 authored by Daniel Zheng's avatar Daniel Zheng
Browse files

Added check to copy AVB footer

is_logical shouldn't work in bootloader for some devices, so we also need to check
using should_flash_in_userspace to see if partition is dynamic

Test: tested to flash {partition} on raven and checked to see avb
footers are not copied from dynamic partitions

Change-Id: Iabb3ea535fa80b26cf1c08040beb3d4ea5e8c2ae
parent 1295d2e8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1197,7 +1197,8 @@ 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 || 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.