mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-19 03:22:39 +02:00
Added module files
This commit is contained in:
parent
913cc6f795
commit
a36c4a5033
BIN
module/bin/arm64-v8a/resetprop
Normal file
BIN
module/bin/arm64-v8a/resetprop
Normal file
Binary file not shown.
BIN
module/bin/armeabi-v7a/resetprop
Normal file
BIN
module/bin/armeabi-v7a/resetprop
Normal file
Binary file not shown.
BIN
module/bin/x86/resetprop
Normal file
BIN
module/bin/x86/resetprop
Normal file
Binary file not shown.
BIN
module/bin/x86_64/resetprop
Normal file
BIN
module/bin/x86_64/resetprop
Normal file
Binary file not shown.
@ -7,4 +7,8 @@ fi
|
||||
if [ -d "/data/adb/modules/safetynet-fix" ]; then
|
||||
touch "/data/adb/modules/safetynet-fix/remove"
|
||||
ui_print "!!! safetynet-fix module removed!"
|
||||
fi
|
||||
fi
|
||||
|
||||
# use our resetprop
|
||||
mv -f "$MODPATH/bin/$ABI/resetprop" "$MODPATH"
|
||||
rm -rf "$MODPATH/bin"
|
@ -1,6 +1,6 @@
|
||||
id=playintegrityfix
|
||||
name=Play Integrity Fix
|
||||
version=v1.1-PROPS
|
||||
versionCode=1
|
||||
version=v1.2-PROPS
|
||||
versionCode=12
|
||||
author=chiteroman
|
||||
description=Fix CTS profile (SafetyNet) and DEVICE verdict (Play Integrity).
|
@ -1,12 +1,23 @@
|
||||
# Sensitive properties
|
||||
|
||||
RESETPROP="${0%/*}/resetprop"
|
||||
|
||||
chmod 755 $RESETPROP
|
||||
|
||||
check_resetprop() {
|
||||
local NAME=$1
|
||||
local EXPECTED=$2
|
||||
local VALUE=$(resetprop $NAME)
|
||||
[ -z $VALUE ] || [ $VALUE = $EXPECTED ] || $RESETPROP -n $NAME $EXPECTED
|
||||
}
|
||||
|
||||
maybe_set_prop() {
|
||||
local prop="$1"
|
||||
local contains="$2"
|
||||
local value="$3"
|
||||
|
||||
if [[ "$(getprop "$prop")" == *"$contains"* ]]; then
|
||||
resetprop "$prop" "$value"
|
||||
$RESETPROP -n "$prop" "$value"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -16,7 +27,9 @@ maybe_set_prop ro.boot.mode recovery unknown
|
||||
maybe_set_prop vendor.boot.mode recovery unknown
|
||||
|
||||
# Hiding SELinux | Permissive status
|
||||
resetprop --delete ro.build.selinux
|
||||
if [ -n "$(getprop ro.build.selinux)" ]; then
|
||||
resetprop --delete ro.build.selinux
|
||||
fi
|
||||
|
||||
# Hiding SELinux | Use toybox to protect *stat* access time reading
|
||||
if [[ "$(toybox cat /sys/fs/selinux/enforce)" == "0" ]]; then
|
||||
@ -24,23 +37,40 @@ if [[ "$(toybox cat /sys/fs/selinux/enforce)" == "0" ]]; then
|
||||
chmod 440 /sys/fs/selinux/policy
|
||||
fi
|
||||
|
||||
# Late props which must be set after boot_completed
|
||||
# Reset props after boot completed to avoid breaking some weird devices/ROMs...
|
||||
{
|
||||
until [[ "$(getprop sys.boot_completed)" == "1" ]]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# SafetyNet/Play Integrity | Avoid breaking Realme fingerprint scanners
|
||||
resetprop ro.boot.flash.locked 1
|
||||
check_resetprop ro.boot.flash.locked 1
|
||||
|
||||
# SafetyNet/Play Integrity | Avoid breaking Oppo fingerprint scanners
|
||||
resetprop ro.boot.vbmeta.device_state locked
|
||||
check_resetprop ro.boot.vbmeta.device_state locked
|
||||
|
||||
# SafetyNet/Play Integrity | Avoid breaking OnePlus display modes/fingerprint scanners
|
||||
resetprop vendor.boot.verifiedbootstate green
|
||||
check_resetprop vendor.boot.verifiedbootstate green
|
||||
|
||||
# SafetyNet/Play Integrity | Avoid breaking OnePlus display modes/fingerprint scanners on OOS 12
|
||||
resetprop ro.boot.verifiedbootstate green
|
||||
resetprop ro.boot.veritymode enforcing
|
||||
resetprop vendor.boot.vbmeta.device_state locked
|
||||
}&
|
||||
check_resetprop ro.boot.verifiedbootstate green
|
||||
check_resetprop ro.boot.veritymode enforcing
|
||||
check_resetprop vendor.boot.vbmeta.device_state locked
|
||||
|
||||
# RootBeer, Microsoft
|
||||
check_resetprop ro.build.tags release-keys
|
||||
|
||||
# Samsung
|
||||
check_resetprop ro.boot.warranty_bit 0
|
||||
check_resetprop ro.vendor.boot.warranty_bit 0
|
||||
check_resetprop ro.vendor.warranty_bit 0
|
||||
check_resetprop ro.warranty_bit 0
|
||||
|
||||
# OnePlus
|
||||
check_resetprop ro.is_ever_orange 0
|
||||
|
||||
# Other
|
||||
check_resetprop ro.build.type user
|
||||
check_resetprop ro.debuggable 0
|
||||
check_resetprop ro.secure 1
|
||||
}&
|
@ -1,16 +0,0 @@
|
||||
# RootBeer, Microsoft
|
||||
ro.build.tags=release-keys
|
||||
|
||||
# Samsung
|
||||
ro.boot.warranty_bit=0
|
||||
ro.vendor.boot.warranty_bit=0
|
||||
ro.vendor.warranty_bit=0
|
||||
ro.warranty_bit=0
|
||||
|
||||
# OnePlus
|
||||
ro.is_ever_orange=0
|
||||
|
||||
# Other
|
||||
ro.build.type=user
|
||||
ro.debuggable=0
|
||||
ro.secure=1
|
Loading…
Reference in New Issue
Block a user