summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-04-10 02:23:31 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-04-10 02:23:31 +0000
commit948f67b0e7b3863488fd4a12a6797311d4c30508 (patch)
tree01d99350ee8ff43a0afb53fa41c239fb7f84fd6c /tools
parent9c3d43886e4d788084767a790fc0c7528ca19d79 (diff)
parentd0ca05493bfe06cf166e4e215cd9bf38936fb344 (diff)
downloadbuild-948f67b0e7b3863488fd4a12a6797311d4c30508.zip
build-948f67b0e7b3863488fd4a12a6797311d4c30508.tar.gz
build-948f67b0e7b3863488fd4a12a6797311d4c30508.tar.bz2
am d0ca0549: am 8c76d1e0: Merge "Dump fingerprints into recovery log"
* commit 'd0ca05493bfe06cf166e4e215cd9bf38936fb344': Dump fingerprints into recovery log
Diffstat (limited to 'tools')
-rwxr-xr-xtools/releasetools/ota_from_target_files.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index 26fbaf0..21565fc 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -556,6 +556,10 @@ reboot_now("%(bcb_dev)s", "recovery");
else if get_stage("%(bcb_dev)s") == "3/3" then
""" % bcb_dev)
+ # Dump fingerprints
+ script.Print("Target: %s" % CalculateFingerprint(
+ oem_props, oem_dict, OPTIONS.info_dict))
+
device_specific.FullOTA_InstallBegin()
system_progress = 0.75
@@ -731,6 +735,12 @@ def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_zip):
metadata=metadata,
info_dict=OPTIONS.info_dict)
+ # TODO: Currently this works differently from WriteIncrementalOTAPackage().
+ # This function doesn't consider thumbprints when writing
+ # metadata["pre/post-build"]. One possible reason is that the current
+ # devices with thumbprints are all using file-based OTAs. Long term we
+ # should factor out the common parts into a shared one to avoid further
+ # divergence.
source_fp = GetBuildProp("ro.build.fingerprint", OPTIONS.source_info_dict)
target_fp = GetBuildProp("ro.build.fingerprint", OPTIONS.target_info_dict)
metadata["pre-build"] = source_fp
@@ -828,6 +838,12 @@ reboot_now("%(bcb_dev)s", "recovery");
else if get_stage("%(bcb_dev)s") != "3/3" then
""" % bcb_dev)
+ # Dump fingerprints
+ script.Print("Source: %s" % CalculateFingerprint(
+ oem_props, oem_dict, OPTIONS.source_info_dict))
+ script.Print("Target: %s" % CalculateFingerprint(
+ oem_props, oem_dict, OPTIONS.target_info_dict))
+
script.Print("Verifying current system...")
device_specific.IncrementalOTA_VerifyBegin()
@@ -1206,6 +1222,10 @@ reboot_now("%(bcb_dev)s", "recovery");
else if get_stage("%(bcb_dev)s") != "3/3" then
""" % bcb_dev)
+ # Dump fingerprints
+ script.Print("Source: %s" % (source_fp,))
+ script.Print("Target: %s" % (target_fp,))
+
script.Print("Verifying current system...")
device_specific.IncrementalOTA_VerifyBegin()