From d5f287075a19280ea66a18e9476692fc7391f25d Mon Sep 17 00:00:00 2001 From: oxmc7769 Date: Fri, 20 Mar 2026 05:16:52 -0700 Subject: [PATCH] Updates --- ...d_frameworks_base-signature-spoofing.patch | 0 ...letos-rpi-configurable-reboot-reason.patch | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+) rename {android/36 => frameworks/base}/android_frameworks_base-signature-spoofing.patch (100%) create mode 100644 system/update_engine/0001-pawletos-rpi-configurable-reboot-reason.patch diff --git a/android/36/android_frameworks_base-signature-spoofing.patch b/frameworks/base/android_frameworks_base-signature-spoofing.patch similarity index 100% rename from android/36/android_frameworks_base-signature-spoofing.patch rename to frameworks/base/android_frameworks_base-signature-spoofing.patch diff --git a/system/update_engine/0001-pawletos-rpi-configurable-reboot-reason.patch b/system/update_engine/0001-pawletos-rpi-configurable-reboot-reason.patch new file mode 100644 index 0000000..f2b59ca --- /dev/null +++ b/system/update_engine/0001-pawletos-rpi-configurable-reboot-reason.patch @@ -0,0 +1,51 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: PawletOS +Date: Mon, 01 Jan 2025 00:00:00 +0000 +Subject: [PATCH] update_engine: use ro.pawlet.ota.reboot_reason for reboot + +On devices that use RPi firmware's tryboot mechanism for A/B slot +switching, the reboot that activates slot B must include the "tryboot" +reason so the firmware reads the [tryboot] section of config.txt and +boots from partition 2 (boot_b) for one attempt. + +This patch reads ro.pawlet.ota.reboot_reason from the vendor properties. +If the property is not set, the behaviour is unchanged (plain "reboot"). + +RPi devices set this in vendor.prop: + ro.pawlet.ota.reboot_reason=reboot,tryboot + +Signed-off-by: PawletOS +--- + aosp/update_attempter_android.cc | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/aosp/update_attempter_android.cc b/aosp/update_attempter_android.cc +index 0000000..0000001 100644 +--- a/aosp/update_attempter_android.cc ++++ b/aosp/update_attempter_android.cc +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1,6 +1,15 @@ +-bool UpdateAttempterAndroid::RebootDevice() { +- LOG(INFO) << "Rebooting device to update the system."; +- return android::base::SetProperty("sys.powerctl", "reboot"); +-} ++bool UpdateAttempterAndroid::RebootDevice() { ++ // Allow device-specific reboot reasons via a vendor property. ++ // RPi devices set ro.pawlet.ota.reboot_reason=reboot,tryboot to trigger ++ // the RPi firmware's tryboot mechanism which boots from slot B (boot_b / ++ // partition 2) for a single attempt. ++ const std::string reboot_reason = ++ android::base::GetProperty("ro.pawlet.ota.reboot_reason", "reboot"); ++ ++ LOG(INFO) << "Rebooting device to update the system" ++ << " (reason: " << reboot_reason << ")"; ++ ++ return android::base::SetProperty("sys.powerctl", reboot_reason); ++}