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

Commit cb69ac6c authored by Alex Deymo's avatar Alex Deymo Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'nyc-mr1-ue_sideload_recovery' into nyc-mr1-dev

* changes:
  Replace OTA sideload verification key when signing A/B devices.
  Install the update-payload-key in the recovery image as well.
parents 831bee13 95cc84a7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -715,6 +715,10 @@ $(TARGET_OUT_ETC)/update_engine/update-payload-key.pub.pem: $(addsuffix .x509.pe
	$(hide) rm -f $@
	$(hide) mkdir -p $(dir $@)
	$(hide) openssl x509 -pubkey -noout -in $< > $@

ALL_DEFAULT_INSTALLED_MODULES += $(TARGET_RECOVERY_ROOT_OUT)/etc/update_engine/update-payload-key.pub.pem
$(TARGET_RECOVERY_ROOT_OUT)/etc/update_engine/update-payload-key.pub.pem: $(TARGET_OUT_ETC)/update_engine/update-payload-key.pub.pem
	$(hide) cp -f $< $@
endif
endif

+5 −0
Original line number Diff line number Diff line
@@ -257,6 +257,7 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info,
    elif (OPTIONS.replace_ota_keys and
          info.filename in (
              "BOOT/RAMDISK/res/keys",
              "BOOT/RAMDISK/etc/update_engine/update-payload-key.pub.pem",
              "RECOVERY/RAMDISK/res/keys",
              "SYSTEM/etc/security/otacerts.zip",
              "SYSTEM/etc/update_engine/update-payload-key.pub.pem")):
@@ -512,6 +513,10 @@ def ReplaceOtaKeys(input_tf_zip, output_tf_zip, misc_info):
        output_tf_zip,
        "SYSTEM/etc/update_engine/update-payload-key.pub.pem",
        pubkey)
    common.ZipWriteStr(
        output_tf_zip,
        "BOOT/RAMDISK/etc/update_engine/update-payload-key.pub.pem",
        pubkey)

  return new_recovery_keys