From 4da05904408d274574e71bcc3b1556819d8d52a9 Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Wed, 18 Jun 2025 22:27:06 +0800 Subject: [PATCH] misc: reorder security patch if statement --- module/common/get_extra.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/module/common/get_extra.sh b/module/common/get_extra.sh index d404064..c6f0955 100644 --- a/module/common/get_extra.sh +++ b/module/common/get_extra.sh @@ -131,13 +131,15 @@ set_security_patch() { TODAY=$(date +%Y%m%d) if [ -n "$formatted_security_patch" ] && [ "$TODAY" -lt "$security_patch_after_1y" ]; then TS_version=$(grep "versionCode=" "/data/adb/modules/tricky_store/module.prop" | cut -d'=' -f2) - if [ "$TS_version" -lt 158 ]; then - resetprop ro.vendor.build.security_patch "$security_patch" - resetprop ro.build.version.security_patch "$security_patch" - else + # Official TrickyStore which supports custom security patch + if [ "$TS_version" -ge 158 ]; then SECURITY_PATCH_FILE="/data/adb/tricky_store/security_patch.txt" printf "system=prop\nboot=%s\nvendor=%s\n" "$security_patch" "$security_patch" > "$SECURITY_PATCH_FILE" chmod 644 "$SECURITY_PATCH_FILE" + # Other + else + resetprop ro.vendor.build.security_patch "$security_patch" + resetprop ro.build.version.security_patch "$security_patch" fi else echo "not set"