mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-19 03:22:39 +02:00
Merge pull request #104 from osm0sis/main
Move early props to post-fs-data.sh, warn about deprecated/conflicting MHPC module (main)
This commit is contained in:
commit
6c88a77ef4
@ -3,12 +3,15 @@ if [ "$API" -lt 26 ]; then
|
|||||||
abort "!!! You can't use this module on Android < 8.0"
|
abort "!!! You can't use this module on Android < 8.0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove safetynet-fix module if installed
|
# Remove/warn if conflicting modules are installed
|
||||||
if [ -d /data/adb/modules/safetynet-fix ]; then
|
if [ -d /data/adb/modules/safetynet-fix ]; then
|
||||||
touch /data/adb/modules/safetynet-fix/remove
|
touch /data/adb/modules/safetynet-fix/remove
|
||||||
ui_print "- 'safetynet-fix' module will be removed on next reboot"
|
ui_print "- 'safetynet-fix' module will be removed on next reboot"
|
||||||
fi
|
fi
|
||||||
|
if [ -d /data/adb/modules/MagiskHidePropsConf ]; then
|
||||||
|
ui_print "- Warning, 'MagiskHidePropsConf' module may cause issues with PIF"
|
||||||
|
fi
|
||||||
|
|
||||||
# Clean up any leftover files from previous deprecated methods
|
# Clean up any leftover files from previous deprecated methods
|
||||||
rm -f /data/data/com.google.android.gms/cache/pif.prop /data/data/com.google.android.gms/pif.prop
|
rm -f /data/data/com.google.android.gms/cache/pif.prop /data/data/com.google.android.gms/pif.prop
|
||||||
rm -f /data/data/com.google.android.gms/cache/pif.json /data/data/com.google.android.gms/pif.json
|
rm -f /data/data/com.google.android.gms/cache/pif.json /data/data/com.google.android.gms/pif.json
|
||||||
|
@ -4,4 +4,4 @@ version=v13.9
|
|||||||
versionCode=139
|
versionCode=139
|
||||||
author=chiteroman
|
author=chiteroman
|
||||||
description=Fix CTS profile (SafetyNet) and DEVICE verdict (Play Integrity).
|
description=Fix CTS profile (SafetyNet) and DEVICE verdict (Play Integrity).
|
||||||
updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json
|
updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json
|
||||||
|
@ -3,7 +3,43 @@ if magisk --denylist status; then
|
|||||||
magisk --denylist rm com.google.android.gms
|
magisk --denylist rm com.google.android.gms
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove safetynet-fix module if installed
|
# Remove conflicting modules if installed
|
||||||
if [ -d /data/adb/modules/safetynet-fix ]; then
|
for i in MagiskHidePropsConf safetynet-fix; do
|
||||||
touch /data/adb/modules/safetynet-fix/remove
|
if [ -d /data/adb/modules/$i ]; then
|
||||||
fi
|
touch /data/adb/modules/$i/remove
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Conditional early sensitive properties
|
||||||
|
|
||||||
|
resetprop_if_diff() {
|
||||||
|
local NAME=$1
|
||||||
|
local EXPECTED=$2
|
||||||
|
local CURRENT=$(resetprop $NAME)
|
||||||
|
|
||||||
|
[ -z "$CURRENT" ] || [ "$CURRENT" == "$EXPECTED" ] || resetprop $NAME $EXPECTED
|
||||||
|
}
|
||||||
|
resetprop_if_match() {
|
||||||
|
local NAME=$1
|
||||||
|
local CONTAINS=$2
|
||||||
|
local VALUE=$3
|
||||||
|
|
||||||
|
[[ "$(resetprop $NAME)" == *"$CONTAINS"* ]] && resetprop $NAME $VALUE
|
||||||
|
}
|
||||||
|
|
||||||
|
# RootBeer, Microsoft
|
||||||
|
resetprop_if_diff ro.build.tags release-keys
|
||||||
|
|
||||||
|
# Samsung
|
||||||
|
resetprop_if_diff ro.boot.warranty_bit 0
|
||||||
|
resetprop_if_diff ro.vendor.boot.warranty_bit 0
|
||||||
|
resetprop_if_diff ro.vendor.warranty_bit 0
|
||||||
|
resetprop_if_diff ro.warranty_bit 0
|
||||||
|
|
||||||
|
# OnePlus
|
||||||
|
resetprop_if_diff ro.is_ever_orange 0
|
||||||
|
|
||||||
|
# Other
|
||||||
|
resetprop_if_diff ro.build.type user
|
||||||
|
resetprop_if_diff ro.debuggable 0
|
||||||
|
resetprop_if_diff ro.secure 1
|
||||||
|
@ -15,33 +15,15 @@ resetprop_if_match() {
|
|||||||
[[ "$(resetprop $NAME)" == *"$CONTAINS"* ]] && resetprop $NAME $VALUE
|
[[ "$(resetprop $NAME)" == *"$CONTAINS"* ]] && resetprop $NAME $VALUE
|
||||||
}
|
}
|
||||||
|
|
||||||
# RootBeer, Microsoft
|
|
||||||
resetprop_if_diff ro.build.tags release-keys
|
|
||||||
|
|
||||||
# Samsung
|
|
||||||
resetprop_if_diff ro.boot.warranty_bit 0
|
|
||||||
resetprop_if_diff ro.vendor.boot.warranty_bit 0
|
|
||||||
resetprop_if_diff ro.vendor.warranty_bit 0
|
|
||||||
resetprop_if_diff ro.warranty_bit 0
|
|
||||||
|
|
||||||
# OnePlus
|
|
||||||
resetprop_if_diff ro.is_ever_orange 0
|
|
||||||
|
|
||||||
# Other
|
|
||||||
resetprop_if_diff ro.build.type user
|
|
||||||
resetprop_if_diff ro.debuggable 0
|
|
||||||
resetprop_if_diff ro.secure 1
|
|
||||||
|
|
||||||
# Magisk recovery mode
|
# Magisk recovery mode
|
||||||
resetprop_if_match ro.bootmode recovery unknown
|
resetprop_if_match ro.bootmode recovery unknown
|
||||||
resetprop_if_match ro.boot.mode recovery unknown
|
resetprop_if_match ro.boot.mode recovery unknown
|
||||||
resetprop_if_match vendor.boot.mode recovery unknown
|
resetprop_if_match vendor.boot.mode recovery unknown
|
||||||
|
|
||||||
# SELinux
|
# SELinux
|
||||||
if [ -n "$(getprop ro.build.selinux)" ]; then
|
if [ -n "$(resetprop ro.build.selinux)" ]; then
|
||||||
resetprop --delete ro.build.selinux
|
resetprop --delete ro.build.selinux
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# use toybox to protect *stat* access time reading
|
# use toybox to protect *stat* access time reading
|
||||||
if [ "$(toybox cat /sys/fs/selinux/enforce)" == "0" ]; then
|
if [ "$(toybox cat /sys/fs/selinux/enforce)" == "0" ]; then
|
||||||
chmod 640 /sys/fs/selinux/enforce
|
chmod 640 /sys/fs/selinux/enforce
|
||||||
|
@ -3,4 +3,4 @@
|
|||||||
"versionCode": 139,
|
"versionCode": 139,
|
||||||
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v13.9/PlayIntegrityFix_v13.9.zip",
|
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v13.9/PlayIntegrityFix_v13.9.zip",
|
||||||
"changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md"
|
"changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user