|
| 1 | +#!/system/bin/sh |
| 2 | +# BusyBox information |
| 3 | +# (c) 2015-2022 Anton Skshidlevsky <meefik@gmail.com>, GPLv3 |
| 4 | + |
| 5 | +[ "$TRACE_MODE" != "true" ] || set -x |
| 6 | + |
| 7 | +printf "System:\n" |
| 8 | +DEVICE=$(getprop ro.product.model) |
| 9 | +printf "* device: $DEVICE\n" |
| 10 | +ANDROID=$(getprop ro.build.version.release) |
| 11 | +printf "* android: $ANDROID\n" |
| 12 | +ARCH=$(uname -m) |
| 13 | +printf "* architecture: $ARCH\n" |
| 14 | +if test -d /system/addon.d |
| 15 | +then |
| 16 | + printf "* addon.d: supported\n" |
| 17 | +else |
| 18 | + printf "* addon.d: unsupported\n" |
| 19 | +fi |
| 20 | + |
| 21 | +printf "\nLatest BusyBox:\n" |
| 22 | +BB_BIN=$(which busybox.so) |
| 23 | +BB_VERSION=$($BB_BIN| head -1 | awk '{print $2}') |
| 24 | +printf "* version: $BB_VERSION\n" |
| 25 | +BB_APPLETS=$($BB_BIN --list | wc -l) |
| 26 | +printf "* applets: $BB_APPLETS items\n" |
| 27 | +BB_SIZE=$(stat -c '%s' "$BB_BIN") |
| 28 | +printf "* size: $BB_SIZE bytes\n" |
| 29 | +BB_MD5=$(md5sum "$BB_BIN" | awk '{print $1}') |
| 30 | +printf "* md5: $BB_MD5\n" |
| 31 | +if test -e "$(which ssl_helper.so)" |
| 32 | +then |
| 33 | + printf "* ssl_helper: yes\n" |
| 34 | +else |
| 35 | + printf "* ssl_helper: no\n" |
| 36 | +fi |
| 37 | + |
| 38 | +printf "\nInstalled BusyBox:\n" |
| 39 | +if test -e "$INSTALL_DIR/busybox" |
| 40 | +then |
| 41 | + BB_PATH="$INSTALL_DIR" |
| 42 | +elif test -e "/system/bin/busybox" |
| 43 | +then |
| 44 | + BB_PATH="/system/bin" |
| 45 | +elif test -e "/system/xbin/busybox" |
| 46 | +then |
| 47 | + BB_PATH="/system/xbin" |
| 48 | +fi |
| 49 | +BB_BIN="$BB_PATH/busybox" |
| 50 | +if test -e "$BB_BIN" |
| 51 | +then |
| 52 | + printf "* location: $BB_PATH\n" |
| 53 | + BB_VERSION=$("$BB_BIN" | head -1 | awk '{print $2}') |
| 54 | + printf "* version: $BB_VERSION\n" |
| 55 | + BB_APPLETS=$("$BB_BIN" --list | wc -l) |
| 56 | + printf "* applets: $BB_APPLETS items\n" |
| 57 | + BB_SIZE=$(stat -c '%s' "$BB_BIN") |
| 58 | + printf "* size: $BB_SIZE bytes\n" |
| 59 | + BB_MD5=$(md5sum "$BB_BIN" | awk '{print $1}') |
| 60 | + printf "* md5: $BB_MD5\n" |
| 61 | + if test -e "$BB_PATH/ssl_helper" |
| 62 | + then |
| 63 | + printf "* ssl_helper: yes\n" |
| 64 | + else |
| 65 | + printf "* ssl_helper: no\n" |
| 66 | + fi |
| 67 | + if test -d /system/addon.d |
| 68 | + then |
| 69 | + if test -f /system/addon.d/99-busybox.sh |
| 70 | + then |
| 71 | + printf "* addon.d: yes\n" |
| 72 | + else |
| 73 | + printf "* addon.d: no\n" |
| 74 | + fi |
| 75 | + fi |
| 76 | +else |
| 77 | + printf "* not installed\n" |
| 78 | +fi |
0 commit comments