Prevent root tasks if no root access

This commit is contained in:
topjohnwu
2017-01-10 22:47:58 +08:00
parent 742055c43b
commit cadab12737
3 changed files with 21 additions and 28 deletions
@@ -74,11 +74,7 @@ public class Utils {
public static List<String> getModList(String path) {
List<String> ret;
String command = "find " + path + " -type d -maxdepth 1 ! -name \"*.core\" ! -name \"*lost+found\" ! -name \"*magisk\"";
if (Shell.rootAccess()) {
ret = Shell.su(command);
} else {
ret = Shell.sh(command);
}
ret = Shell.su(command);
return ret;
}