Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4abb1dc1 authored by Dario Freni's avatar Dario Freni
Browse files

Rename manifest and image files.

manifest.json -> apex_manifest.json
image.img -> apex_payload.img

Bug: 119672727
Test: m, installed on device, boots.
Change-Id: Id79c6a1ac8f5d306f534477d94b76f8ed0e7d7a7
parent 41db7a81
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ var (
	// TODO(b/113082813) make this configurable using config.fs syntax
	generateFsConfig = pctx.StaticRule("generateFsConfig", blueprint.RuleParams{
		Command: `echo '/ 1000 1000 0755' > ${out} && ` +
			`echo '/manifest.json 1000 1000 0644' >> ${out} && ` +
			`echo '/apex_manifest.json 1000 1000 0644' >> ${out} && ` +
			`echo ${ro_paths} | tr ' ' '\n' | awk '{print "/"$$1 " 1000 1000 0644"}' >> ${out} && ` +
			`echo ${exec_paths} | tr ' ' '\n' | awk '{print "/"$$1 " 1000 1000 0755"}' >> ${out}`,
		Description: "fs_config ${out}",
@@ -70,8 +70,8 @@ var (

	apexBundleRule = pctx.StaticRule("apexBundleRule", blueprint.RuleParams{
		Command: `${zip2zip} -i $in -o $out ` +
			`image.img:apex/${abi}.img ` +
			`manifest.json:root/manifest.json ` +
			`apex_payload.img:apex/${abi}.img ` +
			`apex_manifest.json:root/apex_manifest.json ` +
			`AndroidManifest.xml:manifest/AndroidManifest.xml ` +
			`resources.pb`,
		CommandDeps: []string{"${zip2zip}"},
@@ -185,7 +185,7 @@ func apexMutator(mctx android.BottomUpMutatorContext) {

type apexBundleProperties struct {
	// Json manifest file describing meta info of this APEX bundle. Default:
	// "manifest.json"
	// "apex_manifest.json"
	Manifest *string

	// Determines the file contexts file for setting security context to each file in this APEX bundle.
@@ -586,7 +586,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext, keyFile and
		},
	})

	manifest := android.PathForModuleSrc(ctx, proptools.StringDefault(a.properties.Manifest, "manifest.json"))
	manifest := android.PathForModuleSrc(ctx, proptools.StringDefault(a.properties.Manifest, "apex_manifest.json"))

	fcName := proptools.StringDefault(a.properties.File_contexts, ctx.ModuleName())
	fileContextsPath := "system/sepolicy/apex/" + fcName + "-file_contexts"
@@ -672,10 +672,10 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext, keyFile and
}

func (a *apexBundle) buildFlattenedApex(ctx android.ModuleContext) {
	// For flattened APEX, do nothing but make sure that manifest.json file is also copied along
	// For flattened APEX, do nothing but make sure that apex_manifest.json file is also copied along
	// with other ordinary files.
	manifest := android.PathForModuleSrc(ctx, proptools.StringDefault(a.properties.Manifest, "manifest.json"))
	a.filesInfo = append(a.filesInfo, apexFile{manifest, ctx.ModuleName() + ".manifest.json", android.Common, ".", etc})
	manifest := android.PathForModuleSrc(ctx, proptools.StringDefault(a.properties.Manifest, "apex_manifest.json"))
	a.filesInfo = append(a.filesInfo, apexFile{manifest, ctx.ModuleName() + ".apex_manifest.json", android.Common, ".", etc})

	for _, fi := range a.filesInfo {
		dir := filepath.Join("apex", ctx.ModuleName(), fi.installDir)