mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-18 19:12:38 +02:00
module/autopif: use root manager provided tmpfs
This commit is contained in:
parent
c35983269f
commit
47d700eee1
@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
PATH=/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:/data/data/com.termux/files/usr/bin:$PATH
|
PATH=/data/adb/ap/bin:/data/adb/ksu/bin:/data/adb/magisk:/data/data/com.termux/files/usr/bin:$PATH
|
||||||
|
MODDIR=/data/adb/modules/playintegrityfix
|
||||||
|
|
||||||
download() {
|
download() {
|
||||||
if command -v curl > /dev/null 2>&1; then
|
if command -v curl > /dev/null 2>&1; then
|
||||||
@ -20,9 +21,12 @@ set_random_beta() {
|
|||||||
DEVICE=$(echo "$PRODUCT" | sed 's/_beta//')
|
DEVICE=$(echo "$PRODUCT" | sed 's/_beta//')
|
||||||
}
|
}
|
||||||
|
|
||||||
DIR="$MODPATH/autopif"
|
# lets use tmpfs for processing
|
||||||
mkdir -p "$DIR"
|
TEMPDIR="$MODDIR/autopif"
|
||||||
cd "$DIR"
|
[ -w /sbin ] && TEMPDIR="/sbin/autopif"
|
||||||
|
[ -w /debug_ramdisk ] && TEMPDIR="/debug_ramdisk/autopif"
|
||||||
|
mkdir -p "$TEMPDIR"
|
||||||
|
cd "$TEMPDIR"
|
||||||
|
|
||||||
download https://developer.android.com/topic/generic-system-image/releases > PIXEL_GSI_HTML || {
|
download https://developer.android.com/topic/generic-system-image/releases > PIXEL_GSI_HTML || {
|
||||||
echo "download failed!"
|
echo "download failed!"
|
||||||
@ -73,12 +77,12 @@ cat <<EOF | tee pif.json
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cp "$DIR/pif.json" "/data/adb/pif.json"
|
cp "$TEMPDIR/pif.json" "/data/adb/pif.json"
|
||||||
echo "- new pif.json saved to /data/adb/pif.json"
|
echo "- new pif.json saved to /data/adb/pif.json"
|
||||||
|
|
||||||
cd "$MODPATH"
|
cd "$MODPATH"
|
||||||
|
|
||||||
echo "- Cleaning up ..."
|
echo "- Cleaning up ..."
|
||||||
rm -rf "$DIR"
|
rm -rf "$TEMPDIR"
|
||||||
|
|
||||||
su -c killall com.google.android.gms.unstable || echo ""
|
su -c killall com.google.android.gms.unstable || echo ""
|
||||||
|
Loading…
Reference in New Issue
Block a user