Use apex name for partition name
This makes it so that we can use crosvm to create the composite disk.
While it's not strictly necessary, it greatly simplifies the process
because we don't need to coordinate keeping the partition names from
mk_payload and crosvm consistent.
Bug: 228998637
Test: mk_payload --metadata-only <config> payload.img.metadata
Change-Id: I5a9dbdd6d62de800964743d8609807ae609bf6ff
diff --git a/microdroid/payload/mk_payload.cc b/microdroid/payload/mk_payload.cc
index 6e3f526..4dbcabf 100644
--- a/microdroid/payload/mk_payload.cc
+++ b/microdroid/payload/mk_payload.cc
@@ -166,11 +166,10 @@
Metadata metadata;
metadata.set_version(1);
- int apex_index = 0;
for (const auto& apex_config : config.apexes) {
auto* apex = metadata.add_apexes();
apex->set_name(apex_config.name);
- apex->set_partition_name("microdroid-apex-" + std::to_string(apex_index++));
+ apex->set_partition_name(apex_config.name);
apex->set_is_factory(true);
}
@@ -303,4 +302,4 @@
}
return 0;
-}
\ No newline at end of file
+}