3a0032f30fe34e1f70d67f12af87a7c960ad8110 |
|
21-Feb-2018 |
Victor Hsieh <victorhsieh@google.com> |
Change verity hash algorithm to pad the last chunk As the result, all existing cases takes complete chunk for hashing. Also bump to version number. Test: without also bumping the version, apk with 0x401 hash won't install Test: apk with 0x411 hash installs Bug: 30972906 Change-Id: I48c15c886ac6eab4512f1b2b9744b07e746c6211
/frameworks/base/core/java/android/util/apk/DataDigester.java
|
def64f26c32c0f1ddc72cd2b0d5c9f49338c558a |
|
08-Nov-2017 |
Victor Hsieh <victorhsieh@google.com> |
Optimizations to reduce verity verification time Test: with CPU locked to low freq, verification time of a 400 MB apk is reduced from about 2528 ms to 1942 ms, vs 915 ms of the old algorithm. Writing directly into ByteBuffer's backing array saves around 100 ms but it does not work for DirectByteBuffer, thus I didn't implement this optimization. Bug: 30972906 Change-Id: I00cf782e18a8351569eaf4593188c1ce6796a634
/frameworks/base/core/java/android/util/apk/DataDigester.java
|
3271d0452a4f26a6ff4fff42ed2ce5fb8b9ef07b |
|
25-Oct-2017 |
Victor Hsieh <victorhsieh@google.com> |
Add ApkVerityBuilder to contruct the verity tree Test: Locally add some code in PackageManagerService to generate the verity tree. Root hash and the tree is consistent with the output of apksig. Test: With local mod, with apk size of 400/100/20/5 MB, verification time is about the same for the existing algorithm before and after the refactoring. Test: With local mod, with a 400 MB apk, verification time of the new algorithm is slower (2s) than the 1MB-based algorithm (600ms). Bug: 30972906 Change-Id: Ie429cf9b80884e56a8e0882e1c125c8a3f8feab4
/frameworks/base/core/java/android/util/apk/DataDigester.java
|