diff --git a/CHANGELOG b/CHANGELOG index d664f4f..784b2d6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ Changelog (English) 1.29.2-38 Updated to busybox v1.29.2 (static) Translated into Ukrainian +Added addon.d support 1.28.4-37 Updated to busybox v1.28.4 (static) @@ -69,6 +70,7 @@ Added feature of creating a zip-archive for installation via recovery 1.29.2-38 Обновлено до busybox v1.29.2 (статическая сборка) Переведено на украинский язык +Добавлена поддержка addon.d 1.28.4-37 Обновлено до busybox v1.28.4 (статическая сборка) diff --git a/app/src/main/assets/all/scripts/info.sh b/app/src/main/assets/all/scripts/info.sh index 08b2e77..a5f019a 100644 --- a/app/src/main/assets/all/scripts/info.sh +++ b/app/src/main/assets/all/scripts/info.sh @@ -9,6 +9,12 @@ ANDROID=$(getprop ro.build.version.release) busybox printf "* android: $ANDROID\n" ARCH=$(busybox uname -m) busybox printf "* architecture: $ARCH\n" +if busybox test -d /system/addon.d +then + busybox printf "* addon.d: supported\n" +else + busybox printf "* addon.d: unsupported\n" +fi busybox printf "\nFree space:\n" DATA_FREE=$(busybox df -Ph /data | busybox grep -v ^Filesystem | busybox awk '{print $4}') @@ -16,59 +22,53 @@ busybox printf "* /data: $DATA_FREE\n" SYSTEM_FREE=$(busybox df -Ph /system | busybox grep -v ^Filesystem | busybox awk '{print $4}') busybox printf "* /system: $SYSTEM_FREE\n" -busybox printf "\naddon.d support:\n" -if busybox test -d /system/addon.d -then - busybox printf "* available\n" -else - busybox printf "* unavailable\n" -fi - busybox printf "\nLatest BusyBox:\n" BB_BIN=$(busybox which busybox) BB_VERSION=$(busybox | busybox head -1 | busybox awk '{print $2}') busybox printf "* version: $BB_VERSION\n" BB_APPLETS=$(busybox --list | busybox wc -l) busybox printf "* applets: $BB_APPLETS items\n" -BB_SIZE=$(busybox stat -c '%s' $BB_BIN) +BB_SIZE=$(busybox stat -c '%s' "$BB_BIN") busybox printf "* size: $BB_SIZE bytes\n" -BB_MD5=$(busybox md5sum $BB_BIN | busybox awk '{print $1}') +BB_MD5=$(busybox md5sum "$BB_BIN" | busybox awk '{print $1}') busybox printf "* md5: $BB_MD5\n" busybox printf "\nInstalled BusyBox:\n" -BB_BIN="" if busybox test -e "$INSTALL_DIR/busybox" then BB_PATH="$INSTALL_DIR" - BB_BIN="$BB_PATH/busybox" elif busybox test -e "/system/bin/busybox" then BB_PATH="/system/bin" - BB_BIN="$BB_PATH/busybox" elif busybox test -e "/system/xbin/busybox" then BB_PATH="/system/xbin" - BB_BIN="$BB_PATH/busybox" fi +BB_BIN="$BB_PATH/busybox" if busybox test -e "$BB_BIN" then busybox printf "* location: $BB_PATH\n" - BB_VERSION=$($BB_BIN | busybox head -1 | busybox awk '{print $2}') + BB_VERSION=$("$BB_BIN" | busybox head -1 | busybox awk '{print $2}') busybox printf "* version: $BB_VERSION\n" - BB_APPLETS=$($BB_BIN --list | busybox wc -l) + BB_APPLETS=$("$BB_BIN" --list | busybox wc -l) busybox printf "* applets: $BB_APPLETS items\n" - BB_SIZE=$(busybox stat -c '%s' $BB_BIN) + BB_SIZE=$(busybox stat -c '%s' "$BB_BIN") busybox printf "* size: $BB_SIZE bytes\n" - BB_MD5=$(busybox md5sum $BB_BIN | busybox awk '{print $1}') + BB_MD5=$(busybox md5sum "$BB_BIN" | busybox awk '{print $1}') busybox printf "* md5: $BB_MD5\n" - - if test -d /system/addon.d + if busybox test -e "$BB_PATH/ssl_helper" + then + busybox printf "* ssl_helper: yes\n" + else + busybox printf "* ssl_helper: no\n" + fi + if busybox test -d /system/addon.d then - if test -f /system/addon.d/99-busybox.sh + if busybox test -f /system/addon.d/99-busybox.sh then - busybox printf "* addon.d script: found\n" + busybox printf "* addon.d: yes\n" else - busybox printf "* addon.d script: not found\n" + busybox printf "* addon.d: no\n" fi fi else diff --git a/app/src/main/assets/all/scripts/install.sh b/app/src/main/assets/all/scripts/install.sh index fbd2c94..3916d1a 100644 --- a/app/src/main/assets/all/scripts/install.sh +++ b/app/src/main/assets/all/scripts/install.sh @@ -44,16 +44,6 @@ do fi done -if busybox test "$SYSTEM_REMOUNT" -ne 0 -a -d /system/addon.d -then - busybox cp "$ENV_DIR/scripts/addon.d.sh" /system/addon.d/99-busybox.sh - echo "$INSTALL_DIR" > /system/addon.d/busybox-install-dir - - busybox chown 0:0 /system/addon.d/99-busybox.sh - busybox chmod 755 /system/addon.d/99-busybox.sh - busybox chmod 644 /system/addon.d/busybox-install-dir -fi - if busybox test "$REPLACE_APPLETS" = "true" then busybox printf "Removing old applets ... " @@ -76,7 +66,23 @@ fi if busybox test "$INSTALL_APPLETS" = "true" then busybox printf "Installing new applets ... " - $INSTALL_DIR/busybox --install -s "$INSTALL_DIR" + "$INSTALL_DIR/busybox" --install -s "$INSTALL_DIR" + if busybox test $? -eq 0 + then + busybox printf "done\n" + else + busybox printf "fail\n" + fi +fi + +if busybox test "$SYSTEM_REMOUNT" -ne 0 -a -d /system/addon.d +then + busybox printf "Installing addon.d script ... " + echo "$INSTALL_DIR" > /system/addon.d/busybox-install-dir + busybox chmod 644 /system/addon.d/busybox-install-dir + busybox cp "$ENV_DIR/scripts/addon.d.sh" /system/addon.d/99-busybox.sh + busybox chown 0:0 /system/addon.d/99-busybox.sh + busybox chmod 755 /system/addon.d/99-busybox.sh if busybox test $? -eq 0 then busybox printf "done\n"