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
This commit is contained in:
Yifan Hong 2019-08-29 16:29:22 -07:00
parent 65d94596f2
commit 0e13bbade3
3 changed files with 16 additions and 0 deletions

View File

@ -143,6 +143,10 @@ cc_binary {
static_libs: [
"libhealthhalutils",
],
header_libs: [
"libsnapshot_headers",
]
}
cc_defaults {

View File

@ -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);
}

View File

@ -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"],