Skip to content

Commit

Permalink
Change CM recovery install script filename [1/2]
Browse files Browse the repository at this point in the history
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
(cherry picked from commit a96927c)
  • Loading branch information
mdmower committed Jun 4, 2014
1 parent 3385bc5 commit 1510a8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/releasetools/ota_from_target_files
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit 1510a8e

Please sign in to comment.