OSDN Git Service

Split large files for BBOTA v3.
authorTao Bao <tbao@google.com>
Tue, 25 Aug 2015 22:10:10 +0000 (15:10 -0700)
committerTao Bao <tbao@google.com>
Wed, 26 Aug 2015 17:50:11 +0000 (10:50 -0700)
commit9a5caf2c30e5dcb19823dff328de1cfb140a2799
tree6b140955a292fac2fdad8604dd474b780a569006
parenta7eaf450781483791b02241fd6ab62767d4d6f99
Split large files for BBOTA v3.

For BBOTA v3, we need to stash source blocks to support resumable
feature. However, with the growth of file size and the shrink of the
cache size, source blocks that represent a file are too large to be
stashed as a whole. CL in [1] solves the issue by replacing the diff
command with a "new" command. However, it may increase the generated
package size substantially (e.g. from ~100MB to ~400MB).

With this CL, if a file spans too many blocks, we split it into smaller
pieces by generating multiple commands. For the same case above, it
reduces the package size to ~150MB.

One potential downside is that after splitting, files like .jar,
.apk and .zip can no longer use imgdiff. We may lose the potential
benefit of using imgdiff for patch size reduction.

[1] commit 82c47981bd0602a1c7b50dfabf9a6a2412993bae

Bug: 22430577
Change-Id: I5684fab0ac41c8d94fe18f52a34cef77e06f741c
tools/releasetools/blockimgdiff.py
tools/releasetools/rangelib.py