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

Unverified Commit 73ded01e authored by Brint E. Kriebel's avatar Brint E. Kriebel Committed by Michael Bestas
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
parent c462fb6d
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -641,13 +641,6 @@ else if get_stage("%(bcb_dev)s") == "3/3" then

  device_specific.FullOTA_InstallBegin()

  if block_based:
    common.ZipWriteStr(output_zip, "system/bin/otasigcheck.sh",
                   ""+input_zip.read("SYSTEM/bin/otasigcheck.sh"))
  script.Mount("/data")
  script.ValidateSignatures("data")
  script.Unmount("/data")

  if OPTIONS.backuptool:
    if block_based:
      common.ZipWriteStr(output_zip, "system/bin/backuptool.sh",
@@ -663,6 +656,13 @@ else if get_stage("%(bcb_dev)s") == "3/3" then
  if HasVendorPartition(input_zip):
    system_progress -= 0.1

  if block_based:
    common.ZipWriteStr(output_zip, "system/bin/otasigcheck.sh",
                   ""+input_zip.read("SYSTEM/bin/otasigcheck.sh"))
  script.Mount("/data")
  script.ValidateSignatures("data")
  script.Unmount("/data")

  # Place a copy of file_contexts.bin into the OTA package which will be used
  # by the recovery program.
  if "selinux_fc" in OPTIONS.info_dict: