Add Ab_ota_postinstall_config prop to android_device
It will be used to generate postinstall_config.txt file in
target_files.zip
Test: Built soong target_files.zip locally
Bug: 388633394
Change-Id: I6f9f574fc3720b611b4c2df36b303857ccb9f14d
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index eb967ad..62c8658 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -70,9 +70,10 @@
// blueprint:"mutated" and still set it from filesystem_creator
Main_device *bool
- Ab_ota_updater *bool
- Ab_ota_partitions []string
- Ab_ota_keys []string
+ Ab_ota_updater *bool
+ Ab_ota_partitions []string
+ Ab_ota_keys []string
+ Ab_ota_postinstall_config []string
}
type androidDevice struct {
@@ -454,6 +455,9 @@
abOtaKeysSorted := android.SortedUniqueStrings(a.deviceProps.Ab_ota_keys)
abOtaKeysSortedString := proptools.ShellEscape(strings.Join(abOtaKeysSorted, "\\n"))
builder.Command().Textf("echo -e").Flag(abOtaKeysSortedString).Textf(" > %s/META/otakeys.txt", targetFilesDir.String())
+ // postinstall_config.txt
+ abOtaPostInstallConfigString := proptools.ShellEscape(strings.Join(a.deviceProps.Ab_ota_postinstall_config, "\\n"))
+ builder.Command().Textf("echo -e").Flag(abOtaPostInstallConfigString).Textf(" > %s/META/postinstall_config.txt", targetFilesDir.String())
// selinuxfc
if a.getFsInfos(ctx)["system"].SelinuxFc != nil {
builder.Command().Textf("cp").Input(a.getFsInfos(ctx)["system"].SelinuxFc).Textf(" %s/META/file_contexts.bin", targetFilesDir.String())