Loading core/Makefile +8 −0 Original line number Diff line number Diff line Loading @@ -990,6 +990,13 @@ else $(INTERNAL_OTA_PACKAGE_TARGET): backuptool := $(TARGET_OTA_BACKUPTOOL) endif ifeq ($(TARGET_NO_RECOVERY),) # default to "false" $(INTERNAL_OTA_PACKAGE_TARGET): recoveryex := false else $(INTERNAL_OTA_PACKAGE_TARGET): recoveryex := $(TARGET_NO_RECOVERY) endif ifeq ($(TARGET_OTA_ASSERT_DEVICE),) $(INTERNAL_OTA_PACKAGE_TARGET): override_device := auto else Loading @@ -1004,6 +1011,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(OTATOOLS) -p $(HOST_OUT) \ -k $(KEY_CERT_PAIR) \ --backup=$(backuptool) \ --recovery=$(recoveryex) \ --override_device=$(override_device) \ $(BUILT_TARGET_FILES_PACKAGE) $@ Loading tools/releasetools/ota_from_target_files +18 −6 Original line number Diff line number Diff line Loading @@ -52,6 +52,10 @@ Usage: ota_from_target_files [flags] input_target_files output_ota_package Enable or disable the execution of backuptool.sh. Disabled by default. --recovery <boolean> Enable or disable the exclusion of recovery.img or recovery/ Disabled by default. Enable in *.mk with TARGET_NO_RECOVERY := true --override_device <device> Override device-specific asserts. Can be a comma-separated list. Loading Loading @@ -91,6 +95,7 @@ OPTIONS.extra_script = None OPTIONS.script_mode = 'auto' OPTIONS.worker_threads = 3 OPTIONS.backuptool = False OPTIONS.recoveryex = False OPTIONS.override_device = 'auto' def MostPopularKey(d, default): Loading Loading @@ -329,6 +334,7 @@ def MakeRecoveryPatch(output_zip, recovery_img, boot_img): d = Difference(recovery_img, boot_img) _, _, patch = d.ComputePatch() if OPTIONS.recoveryex == False: common.ZipWriteStr(output_zip, "recovery/recovery-from-boot.p", patch) Item.Get("system/recovery-from-boot.p", dir=False) Loading Loading @@ -394,6 +400,8 @@ def WriteFullOTAPackage(input_zip, output_zip): script.FormatPartition("system") script.Mount("MTD", "system", "/system") script.ShowProgress(0.5, 40) if OPTIONS.recoveryex == False: script.UnpackPackageDir("recovery", "/system") script.UnpackPackageDir("system", "/system") Loading @@ -402,6 +410,7 @@ def WriteFullOTAPackage(input_zip, output_zip): boot_img = File("boot.img", common.BuildBootableImage( os.path.join(OPTIONS.input_tmp, "BOOT"))) if OPTIONS.recoveryex == False: recovery_img = File("recovery.img", common.BuildBootableImage( os.path.join(OPTIONS.input_tmp, "RECOVERY"))) MakeRecoveryPatch(output_zip, recovery_img, boot_img) Loading Loading @@ -880,6 +889,8 @@ def main(argv): OPTIONS.worker_threads = int(a) elif o in ("--backup"): OPTIONS.backuptool = bool(a.lower() == 'true') elif o in ("--recovery"): OPTIONS.recoveryex = bool(a.lower() == 'true') elif o in ("--override_device"): OPTIONS.override_device = a else: Loading @@ -897,6 +908,7 @@ def main(argv): "script_mode=", "worker_threads=", "backup=", "recovery=", "override_device="], extra_option_handler=option_handler) Loading Loading
core/Makefile +8 −0 Original line number Diff line number Diff line Loading @@ -990,6 +990,13 @@ else $(INTERNAL_OTA_PACKAGE_TARGET): backuptool := $(TARGET_OTA_BACKUPTOOL) endif ifeq ($(TARGET_NO_RECOVERY),) # default to "false" $(INTERNAL_OTA_PACKAGE_TARGET): recoveryex := false else $(INTERNAL_OTA_PACKAGE_TARGET): recoveryex := $(TARGET_NO_RECOVERY) endif ifeq ($(TARGET_OTA_ASSERT_DEVICE),) $(INTERNAL_OTA_PACKAGE_TARGET): override_device := auto else Loading @@ -1004,6 +1011,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(OTATOOLS) -p $(HOST_OUT) \ -k $(KEY_CERT_PAIR) \ --backup=$(backuptool) \ --recovery=$(recoveryex) \ --override_device=$(override_device) \ $(BUILT_TARGET_FILES_PACKAGE) $@ Loading
tools/releasetools/ota_from_target_files +18 −6 Original line number Diff line number Diff line Loading @@ -52,6 +52,10 @@ Usage: ota_from_target_files [flags] input_target_files output_ota_package Enable or disable the execution of backuptool.sh. Disabled by default. --recovery <boolean> Enable or disable the exclusion of recovery.img or recovery/ Disabled by default. Enable in *.mk with TARGET_NO_RECOVERY := true --override_device <device> Override device-specific asserts. Can be a comma-separated list. Loading Loading @@ -91,6 +95,7 @@ OPTIONS.extra_script = None OPTIONS.script_mode = 'auto' OPTIONS.worker_threads = 3 OPTIONS.backuptool = False OPTIONS.recoveryex = False OPTIONS.override_device = 'auto' def MostPopularKey(d, default): Loading Loading @@ -329,6 +334,7 @@ def MakeRecoveryPatch(output_zip, recovery_img, boot_img): d = Difference(recovery_img, boot_img) _, _, patch = d.ComputePatch() if OPTIONS.recoveryex == False: common.ZipWriteStr(output_zip, "recovery/recovery-from-boot.p", patch) Item.Get("system/recovery-from-boot.p", dir=False) Loading Loading @@ -394,6 +400,8 @@ def WriteFullOTAPackage(input_zip, output_zip): script.FormatPartition("system") script.Mount("MTD", "system", "/system") script.ShowProgress(0.5, 40) if OPTIONS.recoveryex == False: script.UnpackPackageDir("recovery", "/system") script.UnpackPackageDir("system", "/system") Loading @@ -402,6 +410,7 @@ def WriteFullOTAPackage(input_zip, output_zip): boot_img = File("boot.img", common.BuildBootableImage( os.path.join(OPTIONS.input_tmp, "BOOT"))) if OPTIONS.recoveryex == False: recovery_img = File("recovery.img", common.BuildBootableImage( os.path.join(OPTIONS.input_tmp, "RECOVERY"))) MakeRecoveryPatch(output_zip, recovery_img, boot_img) Loading Loading @@ -880,6 +889,8 @@ def main(argv): OPTIONS.worker_threads = int(a) elif o in ("--backup"): OPTIONS.backuptool = bool(a.lower() == 'true') elif o in ("--recovery"): OPTIONS.recoveryex = bool(a.lower() == 'true') elif o in ("--override_device"): OPTIONS.override_device = a else: Loading @@ -897,6 +908,7 @@ def main(argv): "script_mode=", "worker_threads=", "backup=", "recovery=", "override_device="], extra_option_handler=option_handler) Loading