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
apply immediately
no need to reboot to apply
This commit is contained in:
+1
-27
@@ -1,7 +1,6 @@
|
||||
MODPATH=${0%/*}
|
||||
HIDE_DIR="/data/adb/modules/.TA_utl"
|
||||
TS="/data/adb/modules/tricky_store"
|
||||
TARGET_DIR="/data/adb/tricky_store"
|
||||
TSPA="/data/adb/modules/tsupport-advance"
|
||||
|
||||
aapt() { "$MODPATH/common/aapt" "$@"; }
|
||||
@@ -23,34 +22,9 @@ add_denylist_to_target() {
|
||||
done
|
||||
}
|
||||
|
||||
set_security_patch() {
|
||||
vendor_patch=$(getprop ro.vendor.build.security_patch | sed 's/-//g')
|
||||
vendor_patch_after_1y=$(echo "$vendor_patch + 10000" | bc)
|
||||
TODAY=$(date +%Y%m%d)
|
||||
if [ "$TODAY" -ge "$vendor_patch_after_1y" ]; then
|
||||
[ -f "/data/adb/modules/playintegrityfix/pif.json" ] && PIF="/data/adb/modules/playintegrityfix/pif.json"
|
||||
[ -f "/data/adb/pif.json" ] && PIF="/data/adb/pif.json"
|
||||
[ -f "/data/adb/modules/playintegrityfix/custom.pif.json" ] && PIF="/data/adb/modules/playintegrityfix/custom.pif.json"
|
||||
security_patch=$(grep '"SECURITY_PATCH"' "$PIF" | sed 's/.*: "//; s/".*//')
|
||||
[ -z "$security_patch" ] && security_patch=$(getprop ro.build.version.security_patch)
|
||||
|
||||
formatted_security_patch=$(echo "$security_patch" | sed 's/-//g')
|
||||
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"
|
||||
resetprop ro.build.version.security_patch "$security_patch"
|
||||
else
|
||||
echo "all=$formatted_security_patch" > "$TARGET_DIR/security_patch.txt"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Spoof security patch
|
||||
if grep -q "^auto_config=1" "/data/adb/security_patch"; then
|
||||
set_security_patch
|
||||
sh "$MODPATH/common/get_extra.sh" --security-patch
|
||||
fi
|
||||
|
||||
# Reset verified Boot Hash
|
||||
|
||||
Reference in New Issue
Block a user