diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 2ad628bfe..c721a24d9 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -1605,7 +1605,6 @@ def MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img, info_dict = OPTIONS.info_dict full_recovery_image = info_dict.get("full_recovery_image", None) == "true" - system_root_image = info_dict.get("system_root_image", None) == "true" if full_recovery_image: output_sink("etc/recovery.img", recovery_img.data) @@ -1661,30 +1660,8 @@ fi 'bonus_args': bonus_args} # The install script location moved from /system/etc to /system/bin - # in the L release. Parse init.*.rc files to find out where the - # target-files expects it to be, and put it there. - sh_location = "etc/install-recovery.sh" - found = False - if system_root_image: - init_rc_dir = os.path.join(input_dir, "ROOT") - else: - init_rc_dir = os.path.join(input_dir, "BOOT", "RAMDISK") - init_rc_files = os.listdir(init_rc_dir) - for init_rc_file in init_rc_files: - if (not init_rc_file.startswith('init.') or - not init_rc_file.endswith('.rc')): - continue - - with open(os.path.join(init_rc_dir, init_rc_file)) as f: - for line in f: - m = re.match(r"^service flash_recovery /system/(\S+)\s*$", line) - if m: - sh_location = m.group(1) - found = True - break - - if found: - break + # in the L release. + sh_location = "bin/install-recovery.sh" print("putting script in", sh_location)