OSDN Git Service

Analyze unchanged blocks in odex files.
authorTao Bao <tbao@google.com>
Tue, 20 Sep 2016 05:26:30 +0000 (22:26 -0700)
committerTao Bao <tbao@google.com>
Wed, 28 Sep 2016 17:13:33 +0000 (10:13 -0700)
commitd0814585b8980f72c153bb8e1cecab20c43b40f0
tree754f51ec2faffc6788cfe2a8d042963011d33dc9
parent6169f2b0658462832f435139e38a4bee7d68bcd4
Analyze unchanged blocks in odex files.

In BBOTA, we generate patches based on _all_ the blocks of a pair of
input files (src and tgt). For security incremental OTAs, one common
pattern is that only a few blocks are changed in odex files (e.g.
headers). We don't really need to stash/patch the unchanged blocks.

This CL analyzes the unchanged blocks in odex files and computes the
diff for the changed blocks only. It reduces the OTA install time by
about 25% to 40% in our experiments, by paying an increase of 5% to 30%
OTA generation time cost.

Bug: 31570716
Test: Generate an incremental and apply on device.

Change-Id: If842c1afeff6894a3d27eb60b7e8f65a179b7977
(cherry picked from commit 08c8583aea0c53a7cee840d627371314654895e8)
tools/releasetools/blockimgdiff.py
tools/releasetools/rangelib.py
tools/releasetools/test_rangelib.py