Store dex files uncompressed and unstripped in privileged APKs

Privileged APKs need to store their dex files uncompressed so they
can be verified and mapped directly out of the APK.

Also track whether the module will be dexpreopted or not in order
to determine if the dex file should be stripped before signing.

Test: SystemUI.apk contains an uncompressed dex file
Change-Id: I4dca86c7f8778595882405b34adcf2a7bae03c67
This commit is contained in:
Colin Cross
2018-10-05 14:20:06 -07:00
parent 1e30905f65
commit 5a0dcd5acf
6 changed files with 90 additions and 16 deletions

View File

@@ -87,9 +87,6 @@ func CreateAppPackage(ctx android.ModuleContext, outputFile android.WritablePath
certificateArgs = append(certificateArgs, c.pem.String(), c.key.String())
}
// TODO(ccross): sometimes uncompress dex
// TODO(ccross): sometimes strip dex
ctx.Build(pctx, android.BuildParams{
Rule: signapk,
Description: "signapk",