Loading apex/builder.go +5 −0 Original line number Diff line number Diff line Loading @@ -255,10 +255,15 @@ func (a *apexBundle) buildFileContexts(ctx android.ModuleContext) { output := android.PathForModuleOut(ctx, "file_contexts") rule := android.NewRuleBuilder() // remove old file rule.Command().Text("rm").FlagWithOutput("-f ", output) // copy file_contexts rule.Command().Text("cat").Input(fileContexts).Text(">>").Output(output) // new line rule.Command().Text("echo").Text(">>").Output(output) // force-label /apex_manifest.pb and / as system_file so that apexd can read them rule.Command().Text("echo").Flag("/apex_manifest\\\\.pb u:object_r:system_file:s0").Text(">>").Output(output) rule.Command().Text("echo").Flag("/ u:object_r:system_file:s0").Text(">>").Output(output) rule.Build(pctx, ctx, "file_contexts."+a.Name(), "Generate file_contexts") a.fileContexts = output.OutputPath Loading Loading
apex/builder.go +5 −0 Original line number Diff line number Diff line Loading @@ -255,10 +255,15 @@ func (a *apexBundle) buildFileContexts(ctx android.ModuleContext) { output := android.PathForModuleOut(ctx, "file_contexts") rule := android.NewRuleBuilder() // remove old file rule.Command().Text("rm").FlagWithOutput("-f ", output) // copy file_contexts rule.Command().Text("cat").Input(fileContexts).Text(">>").Output(output) // new line rule.Command().Text("echo").Text(">>").Output(output) // force-label /apex_manifest.pb and / as system_file so that apexd can read them rule.Command().Text("echo").Flag("/apex_manifest\\\\.pb u:object_r:system_file:s0").Text(">>").Output(output) rule.Command().Text("echo").Flag("/ u:object_r:system_file:s0").Text(">>").Output(output) rule.Build(pctx, ctx, "file_contexts."+a.Name(), "Generate file_contexts") a.fileContexts = output.OutputPath Loading