Include busybox binary and remove busybox toggle

This commit is contained in:
topjohnwu
2017-05-12 03:32:42 +08:00
parent 962f8354ac
commit e272dbe9af
10 changed files with 38 additions and 65 deletions
@@ -34,7 +34,7 @@ public class Logger {
public static void shell(boolean root, String msg) {
if (MagiskManager.shellLogging) {
Log.d(TAG, root ? "MANAGERSU" : "MANAGERSH" + msg);
Log.d(TAG, (root ? "MANAGERSU " : "MANAGERSH ") + msg);
}
}
}
@@ -40,7 +40,6 @@ public class Shell {
// Setup umask and PATH
su("umask 022");
su("PATH=`[ -e /dev/busybox ] && echo /dev/busybox || echo /data/busybox`:$PATH");
List<String> ret = su("echo -BOC-", "id");
@@ -138,9 +137,6 @@ public class Shell {
// Run the new shell with busybox and proper umask
STDIN.write(("umask 022\n").getBytes("UTF-8"));
STDIN.flush();
STDIN.write(("PATH=`[ -e /dev/busybox ] && echo /dev/busybox || " +
"echo /data/busybox`:$PATH\n").getBytes("UTF-8"));
STDIN.flush();
} catch (IOException err) {
return null;
}