author | Ying Hsu <yinghsu@google.com> | 2020-06-12 08:26:54 (GMT) |
---|---|---|
committer | Ying Hsu <yinghsu@google.com> | 2020-06-12 08:26:54 (GMT) |
commit | 8c6894cfa52318ed2e04ccc5658ccb2ad3581fa7 (patch) | |
tree | d53c4404e324328136ec9cc9dd649b4eada127a4 | |
parent | c924afc6a77b4a05c4fe5173c5d62f41db14d7ed (diff) | |
download | common-8c6894cfa52318ed2e04ccc5658ccb2ad3581fa7.zip common-8c6894cfa52318ed2e04ccc5658ccb2ad3581fa7.tar.gz common-8c6894cfa52318ed2e04ccc5658ccb2ad3581fa7.tar.bz2 |
Add log for DTB changes
Bug: 151121062
Test: OTA with and without DTB changes.
Change-Id: I72b46757edf62f38e8c12118a804144e9b1ad091
-rwxr-xr-x | releasetools.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/releasetools.py b/releasetools.py index 5028b20..7114291 100755 --- a/releasetools.py +++ b/releasetools.py @@ -152,6 +152,7 @@ def FullOTA_Assertions(info): common.ZipWriteStr(info.output_zip, "bootloader.img", bootloader_img) if OPTIONS.ota_zip_check: info.script.AppendExtra('if ota_zip_check() == "1" then') + info.script.AppendExtra('ui_print("ota_zip_check() == 1");') info.script.AppendExtra('if recovery_backup_exist() == "0" then') info.script.AppendExtra('package_extract_file("dt.img", "/cache/recovery/dtb.img");') info.script.AppendExtra('package_extract_file("recovery.img", "/cache/recovery/recovery.img");') @@ -169,6 +170,7 @@ def FullOTA_Assertions(info): info.script.AppendExtra('delete_file("/cache/recovery/recovery.img");') info.script.AppendExtra('reboot_recovery();') info.script.AppendExtra('else') + info.script.AppendExtra('ui_print("else case, ota_zip_check() != 1");') def FullOTA_InstallBegin(info): print "amlogic extensions:FullOTA_InstallBegin" @@ -185,7 +187,10 @@ def FullOTA_InstallBegin(info): info.script.FormatPartition("/metadata") ZipOtherImage("super_empty_all", OPTIONS.input_tmp, info.output_zip) info.script.AppendExtra('if get_update_stage() == "2" then') + info.script.AppendExtra('ui_print("DTB changed => writing super_empty_all.img to super block...");') info.script.AppendExtra('package_extract_file("super_empty_all.img", "/dev/block/super");') + info.script.AppendExtra('else') + info.script.AppendExtra('ui_print("DTB NOT changed...");') info.script.AppendExtra('endif;') info.script.AppendExtra('delete_file("/cache/recovery/dynamic_partition_metadata.UPDATED");') @@ -222,6 +227,7 @@ package_extract_file("vbmeta.img", "/dev/block/vbmeta");""") info.script.AppendExtra('write_bootloader_image(package_extract_file("bootloader.img"));') info.script.AppendExtra('if get_update_stage() == "2" then') + info.script.AppendExtra('ui_print("DTB changed...formating tee, cache, data ...");') info.script.FormatPartition("/tee") info.script.AppendExtra('wipe_cache();') info.script.FormatPartition("/data") |