diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 6e2837f931..63f14175d8 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -3819,13 +3819,13 @@ def MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img, full_recovery_image = info_dict.get("full_recovery_image") == "true" board_uses_vendorimage = info_dict.get("board_uses_vendorimage") == "true" + board_builds_vendorimage = info_dict.get("board_builds_vendorimage") == "true" - if board_uses_vendorimage: - # In this case, the output sink is rooted at VENDOR + if board_builds_vendorimage or not board_uses_vendorimage: recovery_img_path = "etc/recovery.img" else: - # In this case the output sink is rooted at SYSTEM - recovery_img_path = "vendor/etc/recovery.img" + logger.warning('Recovery patch generation is disable when prebuilt vendor image is used.') + return None if full_recovery_image: output_sink(recovery_img_path, recovery_img.data)