From 0094807f15d345435811f40687d11e87e182c4d5 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Wed, 12 Feb 2025 19:36:03 +0000 Subject: 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 --- filesystem/android_device.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'filesystem') 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()) -- cgit v1.2.3-59-g8ed1b