From 47d700eee1d727eefdfbfed65cab315cf42e94f5 Mon Sep 17 00:00:00 2001 From: backslashxx <118538522+backslashxx@users.noreply.github.com> Date: Tue, 24 Dec 2024 17:12:29 +0800 Subject: [PATCH] module/autopif: use root manager provided tmpfs --- module/autopif.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/module/autopif.sh b/module/autopif.sh index 83769a3..980e785 100644 --- a/module/autopif.sh +++ b/module/autopif.sh @@ -1,5 +1,6 @@ #!/bin/sh 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() { if command -v curl > /dev/null 2>&1; then @@ -20,9 +21,12 @@ set_random_beta() { DEVICE=$(echo "$PRODUCT" | sed 's/_beta//') } -DIR="$MODPATH/autopif" -mkdir -p "$DIR" -cd "$DIR" +# lets use tmpfs for processing +TEMPDIR="$MODDIR/autopif" +[ -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 || { echo "download failed!" @@ -73,12 +77,12 @@ cat <