OSDN Git Service

Revert "Revert "releasetools: Generate streamable A/B OTA packages.""
authorTao Bao <tbao@google.com>
Wed, 25 Jan 2017 06:10:49 +0000 (22:10 -0800)
committerTao Bao <tbao@google.com>
Wed, 25 Jan 2017 06:27:02 +0000 (22:27 -0800)
commitc96316c89b6b4fdcccdb46c8a39c79eb62468fff
treed31d38c854cf5887bae3d923ca8aa9342cadc46d
parent5ce70344637628ac8e66044f0747432d84767fb9
Revert "Revert "releasetools: Generate streamable A/B OTA packages.""

This reverts commit ea4325baf8a673e869cac8981781cf57c4821cb5 to re-land
commit ef1bb4360f0b9ccc54afd7a39077b7ca4d8a9a36. It fixes the bug when
handling a package without care_map.txt (e.g. dm-verity not enabled).

In order to support streaming A/B OTA packages, we pack
payload_properties.txt and care_map.txt in ZIP_STORED mode. These two
entries along with payload.bin (already in ZIP_STORED prior to this CL)
can be fetched directly based on the offset and length info.

We write the offset and length info into the package metadata entry
(META-INF/com/android/metadata), which can be parsed by the OTA server.

payload_properties.txt and care_map.txt are usually less than 1-KiB. So
the change only incurs marginal size increase.

Bug: 33382114
Test: Generate an A/B OTA package. Verify the 'streaming-property-files'
      entry in the metadata file.
Test: Generate an A/B OTA package on a device with dm-verity not enabled.

Change-Id: I3469c8b62385a1fc58b4fb82e3f9d4690aef52ba
tools/releasetools/ota_from_target_files.py