Add a binary to generate .map files from filesystem image
This allows us to re-use existing .img files when building target_files.
Target_files includes both .img files and .map file for each partition.
If we already have the .img file ready, we can derive file block
information from the filesystem image, instead of re-generating the
image with block map option.
Test: th
Bug: 281960439
Change-Id: I61cfe32195e26ed68bfc1b7dc138fd68a583cbc1
diff --git a/Android.bp b/Android.bp
index 86add6a..b3634f3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1318,3 +1318,23 @@
"update_metadata-protos",
],
}
+
+cc_binary_host {
+ name: "map_file_generator",
+ defaults: [
+ "ue_defaults",
+ "libpayload_generator_exports",
+ ],
+ srcs: [
+ "aosp/map_file_generator.cc",
+ ],
+ static_libs: [
+ "liblog",
+ "libbase",
+ "libpayload_generator",
+ "libpayload_extent_ranges",
+ "libpayload_extent_utils",
+ "libgflags",
+ "update_metadata-protos",
+ ],
+}