improved finding BusyBox routine, and once again

This commit is contained in:
newbit1
2023-06-27 23:32:51 +02:00
parent babe5bb2df
commit ef52c3117e
2 changed files with 11 additions and 7 deletions
+1
View File
@@ -371,6 +371,7 @@ rootAVD.bat system-images\android-25\google_apis_playstore\armeabi-v7a\ramdisk.i
### Change Logs
#### [June 2023]
* [rootAVD.sh] - improved finding BusyBox routine, and once again
* [rootAVD.sh] - rewritten the file and folder handling entirely, Darwin and Linux
* [rootAVD.sh] - improved finding BusyBox routine, again
* [General] - Added `.gitattributes` with `*.sh text eol=lf` to force UNIX line ending on Windows
+10 -7
View File
@@ -19,7 +19,6 @@ getdir() {
get_flags() {
echo "[-] Get Flags"
if [ -f /system/init -o -L /system/init ]; then
SYSTEM_ROOT=true
else
@@ -1112,18 +1111,22 @@ TestingBusyBoxVersion() {
local busyboxworks=false
local RESULT=""
echo "[*] Testing Busybox ..."
echo "[*] Testing Busybox $1"
rm -fR $TMP
mkdir -p $TMP
cd $TMP > /dev/null
$($1 unzip $MZ -oq > /dev/null 2>&1)
$(ASH_STANDALONE=1 $1 sh -c 'grep' > /dev/null 2>&1)
RESULT="$?"
if [[ "$RESULT" != "0" ]]; then
echo "[!] Busybox binary does not support extracting Magisk.zip"
else
busyboxworks=true
if [[ "$RESULT" != "255" ]]; then
$($1 unzip $MZ -oq > /dev/null 2>&1)
RESULT="$?"
if [[ "$RESULT" != "0" ]]; then
echo "[!] Busybox binary does not support extracting Magisk.zip"
else
busyboxworks=true
fi
fi
cd - > /dev/null