summaryrefslogtreecommitdiff
path: root/filesystem
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-02-12 19:36:03 +0000
committer Spandan Das <spandandas@google.com> 2025-02-12 23:26:21 +0000
commit0094807f15d345435811f40687d11e87e182c4d5 (patch)
treef65928457110bbcbe6af9e6c4aca0158574b7044 /filesystem
parentf12ff9bfea1a78c7fd06ca0f240aafaca3b2f0c9 (diff)
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
Diffstat (limited to 'filesystem')
-rw-r--r--filesystem/android_device.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index eb967ad06..62c86580a 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -70,9 +70,10 @@ type DeviceProperties struct {
// 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 @@ func (a *androidDevice) copyMetadataToTargetZip(ctx android.ModuleContext, build
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())