summaryrefslogtreecommitdiffstats
path: root/tools/releasetools/ota_from_target_files
diff options
context:
space:
mode:
authorDoug Zongker <dougz@google.com>2014-09-11 09:34:56 -0700
committerDoug Zongker <dougz@google.com>2014-09-11 09:38:01 -0700
commitb34fcce08cc9ab358481e672d83ff16513c4ac37 (patch)
tree4ffa9267f76293b8c5859719549e45a77a2c72b5 /tools/releasetools/ota_from_target_files
parent0052f75f88abbe4d16ff3b921be78b848fd4f6f9 (diff)
downloadbuild-b34fcce08cc9ab358481e672d83ff16513c4ac37.zip
build-b34fcce08cc9ab358481e672d83ff16513c4ac37.tar.gz
build-b34fcce08cc9ab358481e672d83ff16513c4ac37.tar.bz2
explicitly check the superblock for differences
When generating incrementals for the system and vendor partitions, check the first block (which contains the superblock) of the partition to see if it's what we expect. If this check fails, give an explicit log message about the partition having been remounted R/W (the most likely explanation) and the need to flash to get OTAs working again. Bug: 17393999 Change-Id: Ifd2132b428dbc4907527291712690204a3664ac0
Diffstat (limited to 'tools/releasetools/ota_from_target_files')
-rwxr-xr-xtools/releasetools/ota_from_target_files6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index 8b7342b..6f34450 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -731,14 +731,16 @@ def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_zip):
system_src = GetImage("system", OPTIONS.source_tmp, OPTIONS.source_info_dict)
system_tgt = GetImage("system", OPTIONS.target_tmp, OPTIONS.target_info_dict)
- system_diff = common.BlockDifference("system", system_tgt, system_src)
+ system_diff = common.BlockDifference("system", system_tgt, system_src,
+ check_first_block=True)
if HasVendorPartition(target_zip):
if not HasVendorPartition(source_zip):
raise RuntimeError("can't generate incremental that adds /vendor")
vendor_src = GetImage("vendor", OPTIONS.source_tmp, OPTIONS.source_info_dict)
vendor_tgt = GetImage("vendor", OPTIONS.target_tmp, OPTIONS.target_info_dict)
- vendor_diff = common.BlockDifference("vendor", vendor_tgt, vendor_src)
+ vendor_diff = common.BlockDifference("vendor", vendor_tgt, vendor_src,
+ check_first_block=True)
else:
vendor_diff = None