From d0882dfa574fe1fa0bbc8ed81deebef17ab11b99 Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Sun, 16 Feb 2025 17:50:42 +0800 Subject: [PATCH] use advanced config for security patch --- 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 f4f8301..b18f270 100644 --- a/module/common/get_extra.sh +++ b/module/common/get_extra.sh @@ -139,14 +139,16 @@ set_security_patch() { security_patch_after_1y=$(echo "$formatted_security_patch + 10000" | bc) TODAY=$(date +%Y%m%d) if [ -n "$formatted_security_patch" ] && [ "$TODAY" -lt "$security_patch_after_1y" ]; then - TS_version=$(grep "versionCode=" "$TS/module.prop" | cut -d'=' -f2) + 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 + 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" fi - echo "all=$formatted_security_patch" > "/data/adb/tricky_store/security_patch.txt" - chmod 644 "/data/adb/tricky_store/security_patch.txt" - else + else echo "not set" fi }