Merge "releasetools: Move recovery-two-step.img to OTA/." am: 98efd8290e
am: ac280723c2
Change-Id: If2572412f7f01d15c9ce4938791c1537ab7fdf26
This commit is contained in:
commit
86c58acb90
5 changed files with 14 additions and 13 deletions
|
@ -810,11 +810,11 @@ def AddImagesToTargetFiles(filename):
|
|||
banner("recovery (two-step image)")
|
||||
# The special recovery.img for two-step package use.
|
||||
recovery_two_step_image = common.GetBootableImage(
|
||||
"IMAGES/recovery-two-step.img", "recovery-two-step.img",
|
||||
"OTA/recovery-two-step.img", "recovery-two-step.img",
|
||||
OPTIONS.input_tmp, "RECOVERY", two_step_image=True)
|
||||
assert recovery_two_step_image, "Failed to create recovery-two-step.img."
|
||||
recovery_two_step_image_path = os.path.join(
|
||||
OPTIONS.input_tmp, "IMAGES", "recovery-two-step.img")
|
||||
OPTIONS.input_tmp, "OTA", "recovery-two-step.img")
|
||||
if not os.path.exists(recovery_two_step_image_path):
|
||||
recovery_two_step_image.WriteToDir(OPTIONS.input_tmp)
|
||||
if output_zip:
|
||||
|
|
|
@ -103,8 +103,6 @@ def CopyUserImages(input_tmp, output_zip):
|
|||
continue
|
||||
if not image.endswith(".img"):
|
||||
continue
|
||||
if image == "recovery-two-step.img":
|
||||
continue
|
||||
if OPTIONS.put_super:
|
||||
if image == "super_empty.img":
|
||||
continue
|
||||
|
|
|
@ -240,7 +240,7 @@ METADATA_NAME = 'META-INF/com/android/metadata'
|
|||
POSTINSTALL_CONFIG = 'META/postinstall_config.txt'
|
||||
DYNAMIC_PARTITION_INFO = 'META/dynamic_partitions_info.txt'
|
||||
AB_PARTITIONS = 'META/ab_partitions.txt'
|
||||
UNZIP_PATTERN = ['IMAGES/*', 'META/*', 'RADIO/*']
|
||||
UNZIP_PATTERN = ['IMAGES/*', 'META/*', 'OTA/*', 'RADIO/*']
|
||||
RETROFIT_DAP_UNZIP_PATTERN = ['OTA/super_*.img', AB_PARTITIONS]
|
||||
|
||||
|
||||
|
@ -681,13 +681,12 @@ def _WriteRecoveryImageToBoot(script, output_zip):
|
|||
|
||||
recovery_two_step_img_name = "recovery-two-step.img"
|
||||
recovery_two_step_img_path = os.path.join(
|
||||
OPTIONS.input_tmp, "IMAGES", recovery_two_step_img_name)
|
||||
OPTIONS.input_tmp, "OTA", recovery_two_step_img_name)
|
||||
if os.path.exists(recovery_two_step_img_path):
|
||||
recovery_two_step_img = common.GetBootableImage(
|
||||
recovery_two_step_img_name, recovery_two_step_img_name,
|
||||
OPTIONS.input_tmp, "RECOVERY")
|
||||
common.ZipWriteStr(
|
||||
output_zip, recovery_two_step_img_name, recovery_two_step_img.data)
|
||||
common.ZipWrite(
|
||||
output_zip,
|
||||
recovery_two_step_img_path,
|
||||
arcname=recovery_two_step_img_name)
|
||||
logger.info(
|
||||
"two-step package: using %s in stage 1/3", recovery_two_step_img_name)
|
||||
script.WriteRawImage("/boot", recovery_two_step_img_name)
|
||||
|
|
|
@ -423,7 +423,8 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info,
|
|||
if filename.startswith("IMAGES/"):
|
||||
continue
|
||||
|
||||
# Skip split super images, which will be re-generated during signing.
|
||||
# Skip OTA-specific images (e.g. split super images), which will be
|
||||
# re-generated during signing.
|
||||
if filename.startswith("OTA/") and filename.endswith(".img"):
|
||||
continue
|
||||
|
||||
|
|
|
@ -257,7 +257,10 @@ def ValidateVerifiedBootImages(input_tmp, info_dict, options):
|
|||
if verity_key is None:
|
||||
verity_key = info_dict['verity_key'] + '.x509.pem'
|
||||
for image in ('boot.img', 'recovery.img', 'recovery-two-step.img'):
|
||||
image_path = os.path.join(input_tmp, 'IMAGES', image)
|
||||
if image == 'recovery-two-step.img':
|
||||
image_path = os.path.join(input_tmp, 'OTA', image)
|
||||
else:
|
||||
image_path = os.path.join(input_tmp, 'IMAGES', image)
|
||||
if not os.path.exists(image_path):
|
||||
continue
|
||||
|
||||
|
|
Loading…
Reference in a new issue