Add 16K artifacts to PREBUILT_IMAGES/ dir of target_files
Test: th
Bug: 283506035
Change-Id: I9be3982b5a4324ec839937d10c33266c7d27c525
diff --git a/tools/releasetools/img_from_target_files.py b/tools/releasetools/img_from_target_files.py
index 7c27ef7..17f4cc5 100755
--- a/tools/releasetools/img_from_target_files.py
+++ b/tools/releasetools/img_from_target_files.py
@@ -122,10 +122,14 @@
]
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 @@
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')