summaryrefslogtreecommitdiffstats
path: root/tools/releasetools/ota_from_target_files
diff options
context:
space:
mode:
authorMichael Runge <mrunge@google.com>2014-05-05 11:55:47 -0700
committerMichael Runge <mrunge@google.com>2014-05-05 12:22:12 -0700
commitc6e3afd26db72bedcb1d89a71769138a731646a5 (patch)
tree86d6e595577a1d53b551174e173fa4fff87c0caa /tools/releasetools/ota_from_target_files
parent6e836116f764cf5cebf1654df2f17d8222554f6e (diff)
downloadbuild-c6e3afd26db72bedcb1d89a71769138a731646a5.zip
build-c6e3afd26db72bedcb1d89a71769138a731646a5.tar.gz
build-c6e3afd26db72bedcb1d89a71769138a731646a5.tar.bz2
Support block OTA + OEM partition
Change-Id: I9e662098569a43b05279908e6833e9552a7abe3a
Diffstat (limited to 'tools/releasetools/ota_from_target_files')
-rwxr-xr-xtools/releasetools/ota_from_target_files19
1 files changed, 16 insertions, 3 deletions
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index d3701e7..cbfc087 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -366,7 +366,7 @@ def SignOutput(temp_zip_name, output_zip_name):
whole_file=True)
-def AppendAssertions(script, info_dict, oem_dict):
+def AppendAssertions(script, info_dict, oem_dict = None):
oem_props = info_dict.get("oem_fingerprint_properties")
if oem_props is None:
device = GetBuildProp("ro.product.device", info_dict)
@@ -683,7 +683,15 @@ def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_zip):
tgt_mapfilename = system_patch.name + ".tgt.map"
common.ZipWriteStr(output_zip, tgt_mapfilename, tgt_mapdata)
- AppendAssertions(script, OPTIONS.target_info_dict)
+ oem_props = OPTIONS.target_info_dict.get("oem_fingerprint_properties")
+ oem_dict = None
+ if oem_props is not None:
+ if OPTIONS.oem_source is None:
+ raise common.ExternalError("OEM source required for this build")
+ script.Mount("/oem")
+ oem_dict = common.LoadDictionaryFromLines(open(OPTIONS.oem_source).readlines())
+
+ AppendAssertions(script, OPTIONS.target_info_dict, oem_dict)
device_specific.IncrementalOTA_Assertions()
# Two-step incremental package strategy (in chronological order,
@@ -730,7 +738,12 @@ else if get_stage("%(bcb_dev)s", "stage") != "3/3" then
device_specific.IncrementalOTA_VerifyBegin()
- script.AssertRecoveryFingerprint(source_fp, target_fp)
+ if oem_props is None:
+ script.AssertSomeFingerprint(source_fp, target_fp)
+ else:
+ script.AssertSomeThumbprint(
+ GetBuildProp("ro.build.thumbprint", OPTIONS.target_info_dict),
+ GetBuildProp("ro.build.thumbprint", OPTIONS.source_info_dict))
if updating_boot:
d = common.Difference(target_boot, source_boot)