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

Commit a96927c2 authored by Matt Mower's avatar Matt Mower
Browse files

Change CM recovery install script filename [1/2]

This is part 1/2 to maintain backwards compatibility with CWM's
verify_root_and_recovery() function. CWM checks if install-recovery.sh
exists and has an executable flag set, then offers to disable the script
for the user. CM now controls this with the persist.sys.recovery_update
property which is configurable via settings, so we don't need to
double-check this.

This changes the name of the recovery install script to
install-cm-recovery.sh.

Change-Id: Ie08d428cfd092a1de10973ba5ffc326ccdb1a369
parent c4404516
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -221,7 +221,7 @@ class Item:
    # set metadata for the files generated by this script.
    i = cls.ITEMS.get("system/recovery-from-boot.p", None)
    if i: i.uid, i.gid, i.mode, i.selabel, i.capabilities = 0, 0, 0644, None, None
    i = cls.ITEMS.get("system/etc/install-recovery.sh", None)
    i = cls.ITEMS.get("system/etc/install-cm-recovery.sh", None)
    if i: i.uid, i.gid, i.mode, i.selabel, i.capabilities = 0, 0, 0544, None, None

  def CountChildMetadata(self):
@@ -415,8 +415,8 @@ fi
        'recovery_device': recovery_device,
        'bonus_args': bonus_args,
        }
  common.ZipWriteStr(output_zip, "recovery/etc/install-recovery.sh", sh)
  return Item.Get("system/etc/install-recovery.sh", dir=False)
  common.ZipWriteStr(output_zip, "recovery/etc/install-cm-recovery.sh", sh)
  return Item.Get("system/etc/install-cm-recovery.sh", dir=False)


def WriteFullOTAPackage(input_zip, output_zip):
@@ -762,7 +762,7 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip):
    MakeRecoveryPatch(OPTIONS.target_tmp, output_zip,
                      target_recovery, target_boot)
    script.DeleteFiles(["/system/recovery-from-boot.p",
                        "/system/etc/install-recovery.sh"])
                        "/system/etc/install-cm-recovery.sh"])
    print "recovery image changed; including as patch from boot."
  else:
    print "recovery image unchanged; skipping."