summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBrint E. Kriebel <bekit@cyngn.com>2015-11-02 17:26:07 -0800
committerBrint E. Kriebel <bekit@cyngn.com>2016-02-16 18:19:41 -0800
commite2b09b24fbce958f59815b4eaec50f26f8d67851 (patch)
treec6301d2c7130a7619034d2f34b44ef9abc572dae /tools
parent78479274e4ca2617646755b3d0197d1e232c24a6 (diff)
downloadbuild-e2b09b24fbce958f59815b4eaec50f26f8d67851.zip
build-e2b09b24fbce958f59815b4eaec50f26f8d67851.tar.gz
build-e2b09b24fbce958f59815b4eaec50f26f8d67851.tar.bz2
ota_from_target_files: Don't validate data signatures with data wipe
If data is going to be wiped later in the script, there is no reason to validate signatures. This breaks updates that may be designed to wipe data and change signatures. Change-Id: I0b794b43cec2d22996eaa5571688c66582475d55 Ticket: CYNGNOS-1289
Diffstat (limited to 'tools')
-rwxr-xr-xtools/releasetools/ota_from_target_files.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index ff0ccb9..bc40873 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -637,13 +637,14 @@ else if get_stage("%(bcb_dev)s") == "3/3" then
if HasVendorPartition(input_zip):
system_progress -= 0.1
- script.AppendExtra("if is_mounted(\"/data\") then")
- script.ValidateSignatures("data")
- script.AppendExtra("else")
- script.Mount("/data")
- script.ValidateSignatures("data")
- script.Unmount("/data")
- script.AppendExtra("endif;")
+ if not OPTIONS.wipe_user_data:
+ script.AppendExtra("if is_mounted(\"/data\") then")
+ script.ValidateSignatures("data")
+ script.AppendExtra("else")
+ script.Mount("/data")
+ script.ValidateSignatures("data")
+ script.Unmount("/data")
+ script.AppendExtra("endif;")
if "selinux_fc" in OPTIONS.info_dict:
WritePolicyConfig(OPTIONS.info_dict["selinux_fc"], output_zip)