History log of /frameworks/base/core/java/android/util/apk/MemoryMappedFileDataSource.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/MemoryMappedFileDataSource.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/MemoryMappedFileDataSource.java