diff options
author | Ying Wang <wangying@google.com> | 2014-06-04 17:22:21 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-06-04 17:22:21 +0000 |
commit | bc080d510f022da8055b89b85e02d91e74c3757d (patch) | |
tree | be3c16cb28e9f3c152795d5638b0f3bce407427d /tools | |
parent | 201cdd30e07ecddb333b4e347fbf14493fd2643c (diff) | |
parent | 2a386e0cfbdfa009038acede85876a7643f297f5 (diff) | |
download | build-bc080d510f022da8055b89b85e02d91e74c3757d.zip build-bc080d510f022da8055b89b85e02d91e74c3757d.tar.gz build-bc080d510f022da8055b89b85e02d91e74c3757d.tar.bz2 |
am 2a386e0c: Allow to build the update.zip for emulator build.
* commit '2a386e0cfbdfa009038acede85876a7643f297f5':
Allow to build the update.zip for emulator build.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/releasetools/common.py | 2 | ||||
-rwxr-xr-x | tools/releasetools/img_from_target_files | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index a3217dd..80bb10a 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -482,6 +482,8 @@ def CheckSize(data, target, info_dict): if target.endswith(".img"): target = target[:-4] mount_point = "/" + target + fs_type = None + limit = None if info_dict["fstab"]: if mount_point == "/userdata": mount_point = "/data" p = info_dict["fstab"][mount_point] diff --git a/tools/releasetools/img_from_target_files b/tools/releasetools/img_from_target_files index e894c42..d23d465 100755 --- a/tools/releasetools/img_from_target_files +++ b/tools/releasetools/img_from_target_files @@ -239,11 +239,14 @@ def main(argv): output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED) - common.GetBootableImage( - "boot.img", "boot.img", OPTIONS.input_tmp, "BOOT").AddToZip(output_zip) - common.GetBootableImage( - "recovery.img", "recovery.img", OPTIONS.input_tmp, - "RECOVERY").AddToZip(output_zip) + boot_image = common.GetBootableImage( + "boot.img", "boot.img", OPTIONS.input_tmp, "BOOT") + if boot_image: + boot_image.AddToZip(output_zip) + recovery_image = common.GetBootableImage( + "recovery.img", "recovery.img", OPTIONS.input_tmp, "RECOVERY") + if recovery_image: + recovery_image.AddToZip(output_zip) if not bootable_only: AddSystem(output_zip) |