From 79385b6f9daefa8ca027ac19ba8c291515dddac1 Mon Sep 17 00:00:00 2001 From: backslashxx <118538522+backslashxx@users.noreply.github.com> Date: Mon, 10 Feb 2025 23:41:18 +0800 Subject: [PATCH 1/4] scripts/action: do NOT sleep on KSU_NEXT ksu next does NOT auto close --- module/action.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/module/action.sh b/module/action.sh index 3f21642..d5d9659 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." From 6c42fa08a9e27caf5dbd2f6401768e5de0a283f8 Mon Sep 17 00:00:00 2001 From: backslashxx <118538522+backslashxx@users.noreply.github.com> Date: Thu, 13 Feb 2025 14:20:44 +0800 Subject: [PATCH 2/4] scripts: disable LeafOS gmscompat if found This also properly cleans it up at uninstall. Some LineageOS based roms use this pif implementation. --- module/post-fs-data.sh | 9 +++++++++ module/uninstall.sh | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 module/uninstall.sh 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 From 926d7474a03f89def545d8881faa3dc47e836893 Mon Sep 17 00:00:00 2001 From: backslashxx <118538522+backslashxx@users.noreply.github.com> Date: Wed, 19 Feb 2025 14:53:28 +0800 Subject: [PATCH 3/4] scrtips/action: add /dev as tmpfs option to support APatch .litemode_enable and MKSU .notmpfs --- module/action.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/module/action.sh b/module/action.sh index d5d9659..a17e23a 100644 --- a/module/action.sh +++ b/module/action.sh @@ -55,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" From 7eb71ba790314a58410344fbd5d53ec48917cde3 Mon Sep 17 00:00:00 2001 From: backslashxx <118538522+backslashxx@users.noreply.github.com> Date: Thu, 20 Feb 2025 07:50:34 +0800 Subject: [PATCH 4/4] scripts/customize: dont remove action-on-webui some folks might prefer this, since it does NOT auto close. --- module/customize.sh | 7 ------- 1 file changed, 7 deletions(-) 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