From 9ccee5c34678ffe810887a4aeff0288371d7436b Mon Sep 17 00:00:00 2001 From: newbit1 Date: Mon, 15 May 2023 21:26:14 +0200 Subject: [PATCH] fixed FindWorkingBusyBox routine --- rootAVD.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/rootAVD.sh b/rootAVD.sh index e87cea4..bef314f 100755 --- a/rootAVD.sh +++ b/rootAVD.sh @@ -108,8 +108,6 @@ api_level_arch_detect() { AVERSION=$(getprop ro.build.version.release) - ARCH=arm - ARCH32=armeabi-v7a IS64BIT=false IS64BITONLY=false IS32BITONLY=false @@ -125,6 +123,11 @@ api_level_arch_detect() { ARCH=x64 ARCH32=x86 IS64BIT=true + else + ARCH=arm + ABI=armeabi-v7a + ABI32=armeabi-v7a + IS64BIT=false fi if [ -z "$ABILIST32" ]; then @@ -1070,15 +1073,15 @@ FindWorkingBusyBox() { # break # done - for file in $(ls $BASEDIR/lib/*/*busybox*); do - chmod +x "$file" + for file in $(ls $BASEDIR/lib/$ABI/*busybox*); do + chmod +x "$file" bbversion=$($file | $file head -n 1)>/dev/null 2>&1 if [[ $bbversion == *"BusyBox"*"Magisk"*"multi-call"* ]]; then - echo "[!] Found a working Busybox Version" - echo "[!] $bbversion" - export WorkingBusyBox="$file" - break - fi + echo "[!] Found a working Busybox Version" + echo "[!] $bbversion" + export WorkingBusyBox="$file" + break + fi done }