Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d8b59fb authored by Brint E. Kriebel's avatar Brint E. Kriebel
Browse files

ota_from_target_files: Validate signatures after possible data wipe

If the data is being wiped, we want to validate the signature after
this step. This is also a good check that the data wipe succeeded.

Change-Id: Iaecfddfb2010944de0c97e7bb21d8e581f20deec
(cherry picked from commit 43795266)
parent 8b6ded98
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -511,10 +511,6 @@ else if get_stage("%(bcb_dev)s", "stage") == "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")
@@ -525,6 +521,10 @@ else if get_stage("%(bcb_dev)s", "stage") == "3/3" then
  if OPTIONS.wipe_user_data:
    script.FormatPartition("/data")

  script.Mount("/data")
  script.ValidateSignatures("data")
  script.Unmount("/data")

  if "selinux_fc" in OPTIONS.info_dict:
    WritePolicyConfig(OPTIONS.info_dict["selinux_fc"], output_zip)