Skip to content

Commit

Permalink
patches: Fix include recovery in OTA patch
Browse files Browse the repository at this point in the history
* Didn't write to the script the command to install the recoveryimage
  • Loading branch information
turtleletortue committed May 29, 2022
1 parent 1b9c721 commit 30216a8
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion patches/build/make/Include_Recovery_in_OTAs.patch
@@ -1,5 +1,5 @@
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index be0e798685..753aa2fcba 100755
index be0e798685..c9399561a8 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -860,6 +860,9 @@ else if get_stage("%(bcb_dev)s") == "3/3" then
Expand Down Expand Up @@ -30,3 +30,21 @@ index be0e798685..753aa2fcba 100755
else:
include_full_boot = False

@@ -1588,6 +1595,8 @@ else
if OPTIONS.two_step:
common.ZipWriteStr(output_zip, "boot.img", target_boot.data)
script.WriteRawImage("/boot", "boot.img")
+ common.ZipWriteStr(output_zip, "recovery.img", target_recovery.data)
+ script.WriteRawImage("/recovery", "recovery.img")
print("writing full boot image (forced by two-step mode)")

if not OPTIONS.two_step:
@@ -1596,6 +1605,8 @@ else
print("boot image changed; including full.")
script.Print("Installing boot image...")
script.WriteRawImage("/boot", "boot.img")
+ script.Print("Installing recovery image...")
+ script.WriteRawImage("/recovery", "recovery.img")
else:
# Produce the boot image by applying a patch to the current
# contents of the boot partition, and write it back to the

0 comments on commit 30216a8

Please sign in to comment.