Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96efb218 authored by Flex1911's avatar Flex1911
Browse files

build: allow to disable recovery-two-step.img generation

Android 7.1.2 introduced new mechanism for recovery updating in two-step OTAs.
Although, recovery-two-step.img generation may be completely broken on some devices with custom mkbootimg handling.
We can use recovery.img as base for that devices, so recovery-two-step.img generation will not be required in this case.
Let's add new TARGET_NO_TWO_STEP_RECOVERY flag to skip recovery-two-step.img generation during target files packaging if we need it.

Change-Id: Icbea2da2f9565277622746545cdb96bf7f5ef3df
parent 079be45d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2100,6 +2100,9 @@ endif
ifeq ($(TARGET_NOT_USE_GZIP_RECOVERY_RAMDISK),true)
	$(hide) echo "no_gzip_recovery_ramdisk=true" >> $(zip_root)/META/misc_info.txt
endif
ifeq ($(TARGET_NO_TWO_STEP_RECOVERY),true)
	$(hide) echo "no_two_step_recovery=true" >> $(zip_root)/META/misc_info.txt
endif
ifdef TARGET_RELEASETOOL_FACTORY_FROM_TARGET_SCRIPT
	$(hide) echo "factory_from_target_script=$(TARGET_RELEASETOOL_FACTORY_FROM_TARGET_SCRIPT)" >> $(zip_root)/META/misc_info.txt
endif
+9 −7
Original line number Diff line number Diff line
@@ -413,6 +413,7 @@ def AddImagesToTargetFiles(filename):
                               compression=zipfile.ZIP_DEFLATED)

  has_recovery = (OPTIONS.info_dict.get("no_recovery") != "true")
  use_two_step_recovery = (OPTIONS.info_dict.get("no_two_step_recovery") != "true")

  def banner(s):
    print "\n\n++++ " + s + " ++++\n\n"
@@ -447,6 +448,7 @@ def AddImagesToTargetFiles(filename):
      if recovery_image:
        recovery_image.AddToZip(output_zip)

      if use_two_step_recovery:
        banner("recovery (two-step image)")
        # The special recovery.img for two-step package use.
        recovery_two_step_image = common.GetBootableImage(