mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-19 03:22:39 +02:00
Add module files
This commit is contained in:
parent
c950e21a3d
commit
bcaa4327b9
33
module/META-INF/com/google/android/update-binary
Normal file
33
module/META-INF/com/google/android/update-binary
Normal file
@ -0,0 +1,33 @@
|
||||
#!/sbin/sh
|
||||
|
||||
#################
|
||||
# Initialization
|
||||
#################
|
||||
|
||||
umask 022
|
||||
|
||||
# echo before loading util_functions
|
||||
ui_print() { echo "$1"; }
|
||||
|
||||
require_new_magisk() {
|
||||
ui_print "*******************************"
|
||||
ui_print " Please install Magisk v20.4+! "
|
||||
ui_print "*******************************"
|
||||
exit 1
|
||||
}
|
||||
|
||||
#########################
|
||||
# Load util_functions.sh
|
||||
#########################
|
||||
|
||||
OUTFD=$2
|
||||
ZIPFILE=$3
|
||||
|
||||
mount /data 2>/dev/null
|
||||
|
||||
[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
|
||||
. /data/adb/magisk/util_functions.sh
|
||||
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
|
||||
|
||||
install_module
|
||||
exit 0
|
1
module/META-INF/com/google/android/updater-script
Normal file
1
module/META-INF/com/google/android/updater-script
Normal file
@ -0,0 +1 @@
|
||||
#MAGISK
|
10
module/customize.sh
Normal file
10
module/customize.sh
Normal file
@ -0,0 +1,10 @@
|
||||
# Error on < Android 8
|
||||
if [ "$API" -lt 26 ]; then
|
||||
abort "!!! You can't use this module on Android < 8.0."
|
||||
fi
|
||||
|
||||
# safetynet-fix module is incompatible
|
||||
if [ -d "/data/adb/modules/safetynet-fix" ]; then
|
||||
touch "/data/adb/modules/safetynet-fix/remove"
|
||||
ui_print "- 'safetynet-fix' module will be removed in next reboot."
|
||||
fi
|
7
module/module.prop
Normal file
7
module/module.prop
Normal file
@ -0,0 +1,7 @@
|
||||
id=playintegrityfix
|
||||
name=Play Integrity Fix
|
||||
version=v13.8
|
||||
versionCode=138
|
||||
author=chiteroman
|
||||
description=Fix CTS profile (SafetyNet) and DEVICE verdict (Play Integrity).
|
||||
updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json
|
9
module/post-fs-data.sh
Normal file
9
module/post-fs-data.sh
Normal file
@ -0,0 +1,9 @@
|
||||
# Remove Play Services from the Magisk Denylist when set to enforcing
|
||||
if magisk --denylist status; then
|
||||
magisk --denylist rm com.google.android.gms
|
||||
fi
|
||||
|
||||
# Check if safetynet-fix is installed
|
||||
if [ -d "/data/adb/modules/safetynet-fix" ]; then
|
||||
touch "/data/adb/modules/safetynet-fix/remove"
|
||||
fi
|
46
module/service.sh
Normal file
46
module/service.sh
Normal file
@ -0,0 +1,46 @@
|
||||
# Sensitive properties
|
||||
|
||||
maybe_set_prop() {
|
||||
local prop="$1"
|
||||
local contains="$2"
|
||||
local value="$3"
|
||||
|
||||
if [[ "$(getprop "$prop")" == *"$contains"* ]]; then
|
||||
resetprop "$prop" "$value"
|
||||
fi
|
||||
}
|
||||
|
||||
# Magisk recovery mode
|
||||
maybe_set_prop ro.bootmode recovery unknown
|
||||
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
|
||||
|
||||
# Hiding SELinux | Use toybox to protect *stat* access time reading
|
||||
if [[ "$(toybox cat /sys/fs/selinux/enforce)" == "0" ]]; then
|
||||
chmod 640 /sys/fs/selinux/enforce
|
||||
chmod 440 /sys/fs/selinux/policy
|
||||
fi
|
||||
|
||||
# Late props which must be set after boot_completed
|
||||
{
|
||||
until [[ "$(getprop sys.boot_completed)" == "1" ]]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# SafetyNet/Play Integrity | Avoid breaking Realme fingerprint scanners
|
||||
resetprop ro.boot.flash.locked 1
|
||||
|
||||
# SafetyNet/Play Integrity | Avoid breaking Oppo fingerprint scanners
|
||||
resetprop ro.boot.vbmeta.device_state locked
|
||||
|
||||
# SafetyNet/Play Integrity | Avoid breaking OnePlus display modes/fingerprint scanners
|
||||
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
|
||||
}&
|
16
module/system.prop
Normal file
16
module/system.prop
Normal file
@ -0,0 +1,16 @@
|
||||
# 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