diff --git a/module/action.sh b/module/action.sh index 3f21642..a17e23a 100644 --- a/module/action.sh +++ b/module/action.sh @@ -8,6 +8,14 @@ echo "[+] PlayIntegrityFix $version" echo "[+] $(basename "$0")" 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() { dl_domain=$(echo "$1" | awk -F[/:] '{print $4}') 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"; } fi -sleep_pause() { - # APatch and KernelSU needs this - if [ -z "$MMRL" ] && { [ "$KSU" = "true" ] || [ "$APATCH" = "true" ]; }; then - sleep 2 - fi -} - set_random_beta() { if [ "$(echo "$MODEL_LIST" | wc -l)" -ne "$(echo "$PRODUCT_LIST" | wc -l)" ]; then echo "Error: MODEL_LIST and PRODUCT_LIST have different lengths." @@ -54,6 +55,7 @@ set_random_beta() { TEMPDIR="$MODDIR/temp" #fallback [ -w /sbin ] && TEMPDIR="/sbin/playintegrityfix" [ -w /debug_ramdisk ] && TEMPDIR="/debug_ramdisk/playintegrityfix" +[ -w /dev ] && TEMPDIR="/dev/playintegrityfix" mkdir -p "$TEMPDIR" cd "$TEMPDIR" diff --git a/module/customize.sh b/module/customize.sh index 94ac8a8..87a2c40 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -69,10 +69,3 @@ fi # give exec perm to 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 diff --git a/module/post-fs-data.sh b/module/post-fs-data.sh index 8162c80..4a0efb9 100644 --- a/module/post-fs-data.sh +++ b/module/post-fs-data.sh @@ -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.gms false 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 + + diff --git a/module/uninstall.sh b/module/uninstall.sh new file mode 100644 index 0000000..d248079 --- /dev/null +++ b/module/uninstall.sh @@ -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