author | Ying Hsu <yinghsu@google.com> | 2020-07-03 01:51:08 (GMT) |
---|---|---|
committer | Android Partner Code Review <android-gerrit-partner@google.com> | 2020-07-03 01:51:08 (GMT) |
commit | 6d57522f43a9ff45dbf3ce775255000b77eab465 (patch) | |
tree | 60d9a41ea28b02416d5dbb4c2f681143886ed285 | |
parent | f8b3206d5e107cac1e294c324bef943d88cf3351 (diff) | |
parent | e83afe7ea454461a0afea7734ba98a902f1f6403 (diff) | |
download | common-6d57522f43a9ff45dbf3ce775255000b77eab465.zip common-6d57522f43a9ff45dbf3ce775255000b77eab465.tar.gz common-6d57522f43a9ff45dbf3ce775255000b77eab465.tar.bz2 |
Merge "ota: abort update when dtb changes in inc_ota [1/1]" into q-tv-r1-dev
-rwxr-xr-x | releasetools.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/releasetools.py b/releasetools.py index 7114291..865f591 100755 --- a/releasetools.py +++ b/releasetools.py @@ -161,7 +161,7 @@ def FullOTA_Assertions(info): if OPTIONS.ota_partition_change: info.script.AppendExtra('ui_print("update bootloader.img...");') info.script.AppendExtra('write_bootloader_image(package_extract_file("bootloader.img"));') - info.script.AppendExtra('set_bootloader_env("recovery_from_flash", "defenv_resev;save;reset");') + info.script.AppendExtra('set_bootloader_env("recovery_from_flash", "defenv_reserv;save;reset");') info.script.AppendExtra('write_dtb_image(package_extract_file("dt.img"));') info.script.WriteRawImage("/recovery", "recovery.img") if OPTIONS.backup_zip: @@ -249,6 +249,11 @@ def IncrementalOTA_VerifyEnd(info): def IncrementalOTA_InstallBegin(info): LoadInfoDict_amlogic(info.info_dict, info.target_zip); + if OPTIONS.ota_zip_check: + info.script.AppendExtra('if ota_zip_check() == "1" then') + info.script.AppendExtra('abort("partition table changes, cannot update");') + info.script.AppendExtra('endif;') + platform = GetBuildProp("ro.board.platform", info.info_dict) print "ro.board.platform: %s" % (platform) if "meson3" in platform: |