From 9d7bc443b3d2671f7950fefe89602a230ac06e4b Mon Sep 17 00:00:00 2001 From: rattlehead Date: Mon, 18 Jan 2016 22:52:37 +0530 Subject: [PATCH 1/3] added support for checking toybox --- src/main/java/com/stericson/RootShell/RootShell.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/stericson/RootShell/RootShell.java b/src/main/java/com/stericson/RootShell/RootShell.java index 423dd86..810d68f 100644 --- a/src/main/java/com/stericson/RootShell/RootShell.java +++ b/src/main/java/com/stericson/RootShell/RootShell.java @@ -397,6 +397,14 @@ public static boolean isBusyboxAvailable() return (findBinary("busybox")).size() > 0; } + /** + * @return true if ToyBox was found. + */ + public static boolean isToyboxAvailable() + { + return (findBinary("toybox")).size() > 0; + } + /** * @return true if su was found. */ From 4c3417bdcd3cb634c02d8df6f1356a5f52603e1c Mon Sep 17 00:00:00 2001 From: rattlehead Date: Tue, 19 Jan 2016 00:24:23 +0530 Subject: [PATCH 2/3] added support for android 6 --- src/main/java/com/stericson/RootShell/RootShell.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/com/stericson/RootShell/RootShell.java b/src/main/java/com/stericson/RootShell/RootShell.java index 810d68f..a5c7a46 100644 --- a/src/main/java/com/stericson/RootShell/RootShell.java +++ b/src/main/java/com/stericson/RootShell/RootShell.java @@ -394,15 +394,7 @@ public void commandOutput(int id, String line) { */ public static boolean isBusyboxAvailable() { - return (findBinary("busybox")).size() > 0; - } - - /** - * @return true if ToyBox was found. - */ - public static boolean isToyboxAvailable() - { - return (findBinary("toybox")).size() > 0; + return (findBinary("busybox")).size() > 0 || (findBinary("busybox")).size() > 0; } /** From ced588e524670a573145c8e5ebb12bcf3b17ec57 Mon Sep 17 00:00:00 2001 From: rattlehead Date: Fri, 18 Mar 2016 21:16:44 +0530 Subject: [PATCH 3/3] fixed typo in toybox binary name --- src/main/java/com/stericson/RootShell/RootShell.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/stericson/RootShell/RootShell.java b/src/main/java/com/stericson/RootShell/RootShell.java index a5c7a46..9502fd3 100644 --- a/src/main/java/com/stericson/RootShell/RootShell.java +++ b/src/main/java/com/stericson/RootShell/RootShell.java @@ -390,11 +390,11 @@ public void commandOutput(int id, String line) { } /** - * @return true if BusyBox was found. + * @return true if BusyBox or Toybox was found. */ public static boolean isBusyboxAvailable() { - return (findBinary("busybox")).size() > 0 || (findBinary("busybox")).size() > 0; + return (findBinary("busybox")).size() > 0 || (findBinary("toybox")).size() > 0; } /**