diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 101dea80b..7e1ae47e5 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -116,14 +116,23 @@ ensure_bb() { fi chmod 755 $bb + # Busybox could be a script, make sure /system/bin/sh exists + if [ ! -f /system/bin/sh ]; then + umount -l /system 2>/dev/null + mkdir -p /system/bin + ln -s $(command -v sh) /system/bin/sh + fi + + export ASH_STANDALONE=1 + # Find our current arguments # Run in busybox environment to ensure consistent results # /proc//cmdline shall be