summaryrefslogtreecommitdiff
path: root/apex
diff options
context:
space:
mode:
author Jooyung Han <jooyung@google.com> 2025-01-13 15:49:39 +0900
committer Jooyung Han <jooyung@google.com> 2025-01-13 15:49:39 +0900
commitdfec67cc5df28ba4a1e0a9e76bcc1f5d0b07fc4e (patch)
treed82c3b357eb5ad5876cd16857e8bef2968a50c95 /apex
parentf01a7e92d8fa7d1be502d1504606aaa0fc1fbbb2 (diff)
Remove apex.use_file_contexts_as_is
It was a workaround to build a vendor apex which needs to read apex_manifest and run on SDK 34, which doesn't have vendor_apex_metadata_file yet. Vendor_apex_metadata_file is available since SDK 35, we can remove the workaround. Bug: 388964457 Test: m --no-skip-soong-tests Change-Id: Iad91bee7c689c96322e342485301152739baa92a
Diffstat (limited to 'apex')
-rw-r--r--apex/apex.go4
-rw-r--r--apex/builder.go10
2 files changed, 3 insertions, 11 deletions
diff --git a/apex/apex.go b/apex/apex.go
index d39a17fe7..3d8baa644 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -83,10 +83,6 @@ type apexBundleProperties struct {
// /system/sepolicy/apex/<module_name>_file_contexts.
File_contexts *string `android:"path"`
- // By default, file_contexts is amended by force-labelling / and /apex_manifest.pb as system_file
- // to avoid mistakes. When set as true, no force-labelling.
- Use_file_contexts_as_is *bool
-
// Path to the canned fs config file for customizing file's
// uid/gid/mod/capabilities. The content of this file is appended to the
// default config, so that the custom entries are preferred. The format is
diff --git a/apex/builder.go b/apex/builder.go
index d9348c562..641aa2772 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -426,8 +426,6 @@ func (a *apexBundle) buildFileContexts(ctx android.ModuleContext) android.Path {
ctx.PropertyErrorf("file_contexts", "cannot find file_contexts file: %q", fileContexts.String())
}
- useFileContextsAsIs := proptools.Bool(a.properties.Use_file_contexts_as_is)
-
output := android.PathForModuleOut(ctx, "file_contexts")
rule := android.NewRuleBuilder(pctx, ctx)
@@ -444,11 +442,9 @@ func (a *apexBundle) buildFileContexts(ctx android.ModuleContext) android.Path {
rule.Command().Text("cat").Input(fileContexts).Text(">>").Output(output)
// new line
rule.Command().Text("echo").Text(">>").Output(output)
- if !useFileContextsAsIs {
- // force-label /apex_manifest.pb and /
- rule.Command().Text("echo").Text("/apex_manifest\\\\.pb").Text(labelForManifest).Text(">>").Output(output)
- rule.Command().Text("echo").Text("/").Text(labelForRoot).Text(">>").Output(output)
- }
+ // force-label /apex_manifest.pb and /
+ rule.Command().Text("echo").Text("/apex_manifest\\\\.pb").Text(labelForManifest).Text(">>").Output(output)
+ rule.Command().Text("echo").Text("/").Text(labelForRoot).Text(">>").Output(output)
rule.Build("file_contexts."+a.Name(), "Generate file_contexts")
return output