diff --git a/releasetools/releasetools.py b/releasetools/releasetools.py index a7d78e5155aa8d05bc2d011e1a11b935dea7c161..28ed2b643a6f3a652b9be9cd8f32ebe19dfb7337 100644 --- a/releasetools/releasetools.py +++ b/releasetools/releasetools.py @@ -26,6 +26,11 @@ def FullOTA_Assertions(info): def FullOTA_InstallEnd(info): skip_firmware = False + if "IMAGES/recovery.img" in info.input_zip.namelist(): + common.ZipWriteStr(info.output_zip, "firmware-update/recovery.img", info.input_zip.read("IMAGES/recovery.img")) + info.script.AppendExtra('ui_print("Patching recovery image unconditionally...");') + info.script.AppendExtra('package_extract_file("firmware-update/recovery.img", "/dev/block/platform/11120000.ufs/by-name/RECOVERY");') + # Skip Firmware if filemap or any of the images are not present if "RADIO/filemap" not in info.input_zip.namelist(): skip_firmware = True