Merge pull request #533 from backslashxx/action_dont_sleep

scripts: various updates
This commit is contained in:
chiteroman 2025-02-20 20:04:34 +01:00 committed by GitHub
commit 24c29e4b7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 14 deletions

View File

@ -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"

View File

@ -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

View File

@ -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

10
module/uninstall.sh Normal file
View 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