diff options
author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2014-05-09 22:21:28 +0100 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-06 16:33:25 -0700 |
commit | c29149a1a25e43597cc6b965da9e0f88d6719a5a (patch) | |
tree | 3ae7ed71b2989aff9e82a5a8ba0e2c05cea28893 /tools/releasetools/ota_from_target_files | |
parent | 137b73cd05b6678ea2c6a3ac8f4c8b13d9d048f2 (diff) | |
download | build-c29149a1a25e43597cc6b965da9e0f88d6719a5a.zip build-c29149a1a25e43597cc6b965da9e0f88d6719a5a.tar.gz build-c29149a1a25e43597cc6b965da9e0f88d6719a5a.tar.bz2 |
ota: Make sure we don't install on top of an incompatible system
If the system has data present, make sure said data doesn't depend
on a system signature different from our own. If we can't find
our platform key, abort the installation
Change-Id: I16572daf9464de326a9d0d126597cfbf03208f94
Diffstat (limited to 'tools/releasetools/ota_from_target_files')
-rwxr-xr-x | tools/releasetools/ota_from_target_files | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files index 3201587..230b803 100755 --- a/tools/releasetools/ota_from_target_files +++ b/tools/releasetools/ota_from_target_files @@ -586,6 +586,10 @@ else if get_stage("%(bcb_dev)s") == "3/3" then device_specific.FullOTA_InstallBegin() + script.Mount("/data") + script.ValidateSignatures("data") + script.Unmount("/data") + if OPTIONS.backuptool: script.Mount("/system") script.RunBackup("backup") @@ -662,6 +666,8 @@ else if get_stage("%(bcb_dev)s") == "3/3" then common.CheckSize(boot_img.data, "boot.img", OPTIONS.info_dict) common.ZipWriteStr(output_zip, "boot.img", boot_img.data) + script.ValidateSignatures("cleanup") + if OPTIONS.backuptool: script.ShowProgress(0.02, 10) script.RunBackup("restore") |