diff options
author | Doug Zongker <dougz@android.com> | 2012-07-03 15:03:04 -0700 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2012-07-03 15:03:04 -0700 |
commit | e691373514d47ecf29ce13e14e9f3b867d394693 (patch) | |
tree | c1514112583f904096b98101cd0135482282afdf /tools/signapk | |
parent | eeb51105ad413f366a2145907d6a2e1d3fe23a59 (diff) | |
download | build-e691373514d47ecf29ce13e14e9f3b867d394693.zip build-e691373514d47ecf29ce13e14e9f3b867d394693.tar.gz build-e691373514d47ecf29ce13e14e9f3b867d394693.tar.bz2 |
make SignApk faster for OTA packages
Change to the default compression level instead of the max compression
level for OTA packages (-w): it's much faster and the difference in
output size is usually negligible.
Bug: 6778962
Change-Id: I82a6acc19be8b3289fd84c8c15f03ebeb7a1ce63
Diffstat (limited to 'tools/signapk')
-rw-r--r-- | tools/signapk/SignApk.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/signapk/SignApk.java b/tools/signapk/SignApk.java index d8d9bf1..cb19296 100644 --- a/tools/signapk/SignApk.java +++ b/tools/signapk/SignApk.java @@ -497,7 +497,16 @@ class SignApk { outputStream = outputFile = new FileOutputStream(args[argstart+3]); } outputJar = new JarOutputStream(outputStream); - outputJar.setLevel(9); + + // For signing .apks, use the maximum compression to make + // them as small as possible (since they live forever on + // the system partition). For OTA packages, use the + // default compression level, which is much much faster + // and produces output that is only a tiny bit larger + // (~0.1% on full OTA packages I tested). + if (!signWholeFile) { + outputJar.setLevel(9); + } JarEntry je; |