summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBrint E. Kriebel <bekit@cyngn.com>2015-09-08 17:11:37 -0700
committerBrint E. Kriebel <bekit@cyngn.com>2016-04-18 11:07:33 -0700
commitb0fa40c8a8dfac5077e80a0a7b18098dcd15b4cf (patch)
tree548ec04541aed3824d2010c71abbbf309ce0cd14 /tools
parente1caad2880015a111566c59690f33c039b937147 (diff)
downloadbuild-b0fa40c8a8dfac5077e80a0a7b18098dcd15b4cf.zip
build-b0fa40c8a8dfac5077e80a0a7b18098dcd15b4cf.tar.gz
build-b0fa40c8a8dfac5077e80a0a7b18098dcd15b4cf.tar.bz2
img_from_target_files: Skip oem.img in fastboot image creation
We don't need this package to be included in fastboot images, so skip it when we are creating fastboot images. Change-Id: I1e0676f5cbf7468088e6997f83ae845578864668 Ticket: CYNGNOS-936
Diffstat (limited to 'tools')
-rwxr-xr-xtools/releasetools/img_from_target_files.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/releasetools/img_from_target_files.py b/tools/releasetools/img_from_target_files.py
index e9f9af6..33375ca 100755
--- a/tools/releasetools/img_from_target_files.py
+++ b/tools/releasetools/img_from_target_files.py
@@ -111,6 +111,7 @@ def main(argv):
if os.path.exists(images_path):
# If this is a new target-files, it already contains the images,
# and all we have to do is copy them to the output zip.
+ # Skip oem.img files since they are not needed in fastboot images.
images = os.listdir(images_path)
if images:
for image in images:
@@ -118,6 +119,8 @@ def main(argv):
continue
if not image.endswith(".img"):
continue
+ if image == "oem.img":
+ continue
common.ZipWrite(
output_zip, os.path.join(images_path, image), image)
done = True
@@ -165,12 +168,6 @@ def main(argv):
add_img_to_target_files.AddUserdataExtra(output_zip, prefix="")
banner("AddCache")
add_img_to_target_files.AddCache(output_zip, prefix="")
- try:
- input_zip.getinfo("OEM/")
- banner("AddOem")
- add_img_to_target_files.AddOem(output_zip, prefix="")
- except KeyError:
- pass # no oem partition for this device
finally:
print("cleaning up...")