You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
use advanced config for security patch
This commit is contained in:
@@ -139,14 +139,16 @@ set_security_patch() {
|
|||||||
security_patch_after_1y=$(echo "$formatted_security_patch + 10000" | bc)
|
security_patch_after_1y=$(echo "$formatted_security_patch + 10000" | bc)
|
||||||
TODAY=$(date +%Y%m%d)
|
TODAY=$(date +%Y%m%d)
|
||||||
if [ -n "$formatted_security_patch" ] && [ "$TODAY" -lt "$security_patch_after_1y" ]; then
|
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
|
if [ "$TS_version" -lt 158 ]; then
|
||||||
resetprop ro.vendor.build.security_patch "$security_patch"
|
resetprop ro.vendor.build.security_patch "$security_patch"
|
||||||
resetprop ro.build.version.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
|
fi
|
||||||
echo "all=$formatted_security_patch" > "/data/adb/tricky_store/security_patch.txt"
|
else
|
||||||
chmod 644 "/data/adb/tricky_store/security_patch.txt"
|
|
||||||
else
|
|
||||||
echo "not set"
|
echo "not set"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user