mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-02-22 22:28:48 +08:00
Merge pull request #533 from backslashxx/action_dont_sleep
scripts: various updates
This commit is contained in:
commit
24c29e4b7e
@ -8,6 +8,14 @@ echo "[+] PlayIntegrityFix $version"
|
|||||||
echo "[+] $(basename "$0")"
|
echo "[+] $(basename "$0")"
|
||||||
printf "\n\n"
|
printf "\n\n"
|
||||||
|
|
||||||
|
sleep_pause() {
|
||||||
|
# APatch and KernelSU needs this
|
||||||
|
# but not KSU_NEXT, MMRL
|
||||||
|
if [ -z "$MMRL" ] && [ -z "$KSU_NEXT" ] && { [ "$KSU" = "true" ] || [ "$APATCH" = "true" ]; }; then
|
||||||
|
sleep 5
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
download_fail() {
|
download_fail() {
|
||||||
dl_domain=$(echo "$1" | awk -F[/:] '{print $4}')
|
dl_domain=$(echo "$1" | awk -F[/:] '{print $4}')
|
||||||
echo "$1" | grep -q "\.zip$" && return
|
echo "$1" | grep -q "\.zip$" && return
|
||||||
@ -31,13 +39,6 @@ if command -v curl > /dev/null 2>&1; then
|
|||||||
download() { curl --connect-timeout 10 -s "$1" > "$2" || download_fail "$1"; }
|
download() { curl --connect-timeout 10 -s "$1" > "$2" || download_fail "$1"; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep_pause() {
|
|
||||||
# APatch and KernelSU needs this
|
|
||||||
if [ -z "$MMRL" ] && { [ "$KSU" = "true" ] || [ "$APATCH" = "true" ]; }; then
|
|
||||||
sleep 2
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
set_random_beta() {
|
set_random_beta() {
|
||||||
if [ "$(echo "$MODEL_LIST" | wc -l)" -ne "$(echo "$PRODUCT_LIST" | wc -l)" ]; then
|
if [ "$(echo "$MODEL_LIST" | wc -l)" -ne "$(echo "$PRODUCT_LIST" | wc -l)" ]; then
|
||||||
echo "Error: MODEL_LIST and PRODUCT_LIST have different lengths."
|
echo "Error: MODEL_LIST and PRODUCT_LIST have different lengths."
|
||||||
@ -54,6 +55,7 @@ set_random_beta() {
|
|||||||
TEMPDIR="$MODDIR/temp" #fallback
|
TEMPDIR="$MODDIR/temp" #fallback
|
||||||
[ -w /sbin ] && TEMPDIR="/sbin/playintegrityfix"
|
[ -w /sbin ] && TEMPDIR="/sbin/playintegrityfix"
|
||||||
[ -w /debug_ramdisk ] && TEMPDIR="/debug_ramdisk/playintegrityfix"
|
[ -w /debug_ramdisk ] && TEMPDIR="/debug_ramdisk/playintegrityfix"
|
||||||
|
[ -w /dev ] && TEMPDIR="/dev/playintegrityfix"
|
||||||
mkdir -p "$TEMPDIR"
|
mkdir -p "$TEMPDIR"
|
||||||
cd "$TEMPDIR"
|
cd "$TEMPDIR"
|
||||||
|
|
||||||
|
@ -69,10 +69,3 @@ fi
|
|||||||
# give exec perm to action.sh
|
# give exec perm to action.sh
|
||||||
chmod +x "$MODPATH/action.sh"
|
chmod +x "$MODPATH/action.sh"
|
||||||
|
|
||||||
# action.sh, ap 10927, ksu 11981
|
|
||||||
if { [ "$KSU" = "true" ] && [ "$KSU_VER_CODE" -ge 11981 ]; } ||
|
|
||||||
{ [ "$APATCH" = "true" ] && [ "$APATCH_VER_CODE" -ge 10927 ]; }; then
|
|
||||||
# we dont need the webui workaround
|
|
||||||
# since manager has action
|
|
||||||
rm -rf "$MODPATH/webroot"
|
|
||||||
fi
|
|
||||||
|
@ -55,3 +55,12 @@ if [ -n "$(resetprop persist.sys.pixelprops.pi)" ]; then
|
|||||||
resetprop -n -p persist.sys.pixelprops.gapps false
|
resetprop -n -p persist.sys.pixelprops.gapps false
|
||||||
resetprop -n -p persist.sys.pixelprops.gms false
|
resetprop -n -p persist.sys.pixelprops.gms false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# LeafOS "gmscompat: Dynamically spoof props for GMS"
|
||||||
|
# https://review.leafos.org/c/LeafOS-Project/android_frameworks_base/+/4416
|
||||||
|
# https://review.leafos.org/c/LeafOS-Project/android_frameworks_base/+/4417/5
|
||||||
|
if [ -f /data/system/gms_certified_props.json ] && [ ! "$(resetprop persist.sys.spoof.gms)" = "false" ]; then
|
||||||
|
resetprop persist.sys.spoof.gms false
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
10
module/uninstall.sh
Normal file
10
module/uninstall.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# LeafOS "gmscompat: Dynamically spoof props for GMS"
|
||||||
|
# https://review.leafos.org/c/LeafOS-Project/android_frameworks_base/+/4416
|
||||||
|
# https://review.leafos.org/c/LeafOS-Project/android_frameworks_base/+/4417/5
|
||||||
|
if [ -f /data/system/gms_certified_props.json ]; then
|
||||||
|
resetprop -p --delete persist.sys.spoof.gms
|
||||||
|
fi
|
||||||
|
|
||||||
|
# EOF
|
Loading…
Reference in New Issue
Block a user