summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-02-12 22:27:43 +0000
committer Spandan Das <spandandas@google.com> 2025-02-12 22:27:43 +0000
commitf12ff9bfea1a78c7fd06ca0f240aafaca3b2f0c9 (patch)
tree3d6d3de9fa293a2d0068a297f36a2740a24b7060 /filesystem/android_device.go
parent35b7874f19b6fd5610a16997ad5e0afa871eaf24 (diff)
Copy selinux_fc file to target_files.zip
This CL introduces a new field in FilesystemInfo with the selinux_fc path of the filesystem(s). android_device will copy this file to the META subdirectory of target_files.zip Test: Built soong target_files.zip Bug: 388633394 Change-Id: Ia81bd2c2d90d6beb116d57adf53deb5736579c3a
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 514fd2816..eb967ad06 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -454,6 +454,10 @@ 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())
+ // 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())
+ }
}
}