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

Commit 0e13bbad authored by Yifan Hong's avatar Yifan Hong
Browse files

fastbootd: skip COW group

Skip importing COW group because they are dynamically
created by OTA clients and will never show up in built
images.
Test: flash

Change-Id: I44e7693cfb4c15e64455b56212a02f9abde88d61
parent 65d94596
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -143,6 +143,10 @@ cc_binary {
    static_libs: [
        "libhealthhalutils",
    ],

    header_libs: [
        "libsnapshot_headers",
    ]
}

cc_defaults {
+6 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include <fstab/fstab.h>
#include <liblp/builder.h>
#include <liblp/liblp.h>
#include <libsnapshot/snapshot.h>
#include <sparse/sparse.h>

#include "fastboot_device.h"
@@ -171,6 +172,11 @@ bool UpdateSuper(FastbootDevice* device, const std::string& super_name, bool wip
        if (!slot_suffix.empty() && GetPartitionSlotSuffix(partition_name) == slot_suffix) {
            continue;
        }
        std::string group_name = GetPartitionGroupName(old_metadata->groups[partition.group_index]);
        // Skip partitions in the COW group
        if (group_name == android::snapshot::kCowGroupName) {
            continue;
        }
        partitions_to_keep.emplace(partition_name);
    }

+6 −0
Original line number Diff line number Diff line
@@ -56,6 +56,12 @@ filegroup {
    ],
}

cc_library_headers {
    name: "libsnapshot_headers",
    recovery_available: true,
    defaults: ["libsnapshot_defaults"],
}

cc_library_static {
    name: "libsnapshot",
    defaults: ["libsnapshot_defaults"],