Add 16K artifacts to PREBUILT_IMAGES/ dir of target_files
Test: th Bug: 283506035 Change-Id: I9be3982b5a4324ec839937d10c33266c7d27c525
This commit is contained in:
@@ -122,10 +122,14 @@ def EntriesForUserImages(input_file):
|
||||
]
|
||||
with zipfile.ZipFile(input_file) as input_zip:
|
||||
namelist = input_zip.namelist()
|
||||
if 'PREBUILT_IMAGES/kernel_16k' in namelist:
|
||||
entries.append('PREBUILT_IMAGES/kernel_16k:kernel_16k')
|
||||
if 'PREBUILT_IMAGES/ramdisk_16k.img' in namelist:
|
||||
entries.append('PREBUILT_IMAGES/ramdisk_16k.img:ramdisk_16k.img')
|
||||
|
||||
for image_path in [name for name in namelist if name.startswith('IMAGES/')]:
|
||||
image = os.path.basename(image_path)
|
||||
if OPTIONS.bootable_only and image not in('boot.img', 'recovery.img', 'bootloader', 'init_boot.img'):
|
||||
if OPTIONS.bootable_only and image not in ('boot.img', 'recovery.img', 'bootloader', 'init_boot.img'):
|
||||
continue
|
||||
if not image.endswith('.img') and image != 'bootloader':
|
||||
continue
|
||||
@@ -173,8 +177,8 @@ def RebuildAndWriteSuperImages(input_file, output_file):
|
||||
|
||||
logger.info('Writing super.img to archive...')
|
||||
with zipfile.ZipFile(
|
||||
output_file, 'a', compression=zipfile.ZIP_DEFLATED,
|
||||
allowZip64=True) as output_zip:
|
||||
output_file, 'a', compression=zipfile.ZIP_DEFLATED,
|
||||
allowZip64=True) as output_zip:
|
||||
common.ZipWrite(output_zip, super_file, 'super.img')
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user