From b51b884fc7124b9edf432e13df8f3d132a73546e Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 28 Dec 2020 00:24:03 -0800 Subject: [PATCH] Fix module installs in recovery Close #3494 --- scripts/util_functions.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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