am bc080d51: am 2a386e0c: Allow to build the update.zip for emulator build.
* commit 'bc080d510f022da8055b89b85e02d91e74c3757d':
Allow to build the update.zip for emulator build.
diff --git a/core/Makefile b/core/Makefile
index 5c3e1ee..6bd31d9 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1321,6 +1321,11 @@
.PHONY: otapackage
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
+endif # recovery_fstab is defined
+endif # TARGET_NO_KERNEL != true
+endif # TARGET_DEVICE != generic*
+endif # TARGET_PRODUCT != sdk
+
# -----------------------------------------------------------------
# The update package
@@ -1350,10 +1355,6 @@
.PHONY: updatepackage
updatepackage: $(INTERNAL_UPDATE_PACKAGE_TARGET)
-endif # recovery_fstab is defined
-endif # TARGET_NO_KERNEL != true
-endif # TARGET_DEVICE != generic*
-endif # TARGET_PRODUCT != sdk
ifdef is_tests_build
# -----------------------------------------------------------------
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index f179717..c46c301 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -485,6 +485,8 @@
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 @@
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)