Align entries in APEX at 4K boundary

Use -a option of signapk to specify the alignment to 4K. The default is
4.

Test: m apex.test; zipalign -c -v 4096 $(OUT)/system/apex/apex.test.apex
shows ok

Change-Id: I7b1a3d442b69b89838cf09451939cd23d5646bde
This commit is contained in:
Jiyong Park 2018-11-22 02:51:54 +09:00
parent 552b362fdc
commit bfe64a1a59
2 changed files with 3 additions and 2 deletions

View File

@ -662,6 +662,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext, keyFile and
Input: unsignedOutputFile,
Args: map[string]string{
"certificates": strings.Join([]string{certificate.Pem.String(), certificate.Key.String()}, " "),
"flags": "-a 4096", //alignment
},
})
}

View File

@ -32,10 +32,10 @@ var (
Signapk = pctx.AndroidStaticRule("signapk",
blueprint.RuleParams{
Command: `${config.JavaCmd} -Djava.library.path=$$(dirname $signapkJniLibrary) ` +
`-jar $signapkCmd $certificates $in $out`,
`-jar $signapkCmd $flags $certificates $in $out`,
CommandDeps: []string{"$signapkCmd", "$signapkJniLibrary"},
},
"certificates")
"flags", "certificates")
androidManifestMerger = pctx.AndroidStaticRule("androidManifestMerger",
blueprint.RuleParams{