From 2447312286f95abcde36668367d56c6c53944b6e Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Sat, 8 Feb 2025 16:29:27 +0800 Subject: [PATCH] validate security patch date --- module/service.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/service.sh b/module/service.sh index bb4fb46..2c403c3 100644 --- a/module/service.sh +++ b/module/service.sh @@ -41,7 +41,8 @@ if [ "$TODAY" -ge "$vendor_patch_after_1y" ]; then [ -z "$security_patch" ] && security_patch=$(getprop ro.build.version.security_patch) formatted_security_patch=$(echo "$security_patch" | sed 's/-//g') - if [ -n "$formatted_security_patch" ]; then + security_patch_after_1y=$(echo "$formatted_security_patch + 10000" | bc) + if [ -n "$formatted_security_patch" ] && [ "$TODAY" -lt "$security_patch_after_1y" ]; then TS_version=$(grep "versionCode=" "$TS/module.prop" | cut -d'=' -f2) if [ "$TS_version" -lt 158 ]; then resetprop ro.vendor.build.security_patch "$security_patch"