diff options
Diffstat (limited to 'tools/releasetools')
-rwxr-xr-x | tools/releasetools/ota_from_target_files.py | 15 |
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) |