summaryrefslogtreecommitdiff
path: root/apex/builder.go
diff options
context:
space:
mode:
author Jiyong Park <jiyong@google.com> 2021-12-13 23:56:35 +0900
committer Jiyong Park <jiyong@google.com> 2021-12-15 09:11:15 +0900
commit038e852ce10b11f1dfd388f28243cdf5835f2c8f (patch)
tree7a8517c6a57caa61544b8d9b134e88638ec5877a /apex/builder.go
parent1b0893eeba2cdee3dcc573ec523ee0199684d6b1 (diff)
Add canned_fs_config to apex module type
The property is used to customize uid/gid/mode/capabilities of files in an APEX. Bug: 209971551 Test: m Change-Id: I484e46ff819a5266c1e8046dae337e18ef3fefea
Diffstat (limited to 'apex/builder.go')
-rw-r--r--apex/builder.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/apex/builder.go b/apex/builder.go
index 787b2c4b0..ea25537ca 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -1067,6 +1067,11 @@ func (a *apexBundle) buildCannedFsConfig(ctx android.ModuleContext) android.Outp
file := appSetFiles[dir]
cmd.Text("zipinfo -1").Input(file).Textf(`| sed "s:\(.*\):/%s/\1 1000 1000 0644:";`, dir)
}
+ // Custom fs_config is "appended" to the last so that entries from the file are preferred
+ // over default ones set above.
+ if a.properties.Canned_fs_config != nil {
+ cmd.Text("cat").Input(android.PathForModuleSrc(ctx, *a.properties.Canned_fs_config))
+ }
cmd.Text(")").FlagWithOutput("> ", cannedFsConfig)
builder.Build("generateFsConfig", fmt.Sprintf("Generating canned fs config for %s", a.BaseModuleName()))