diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java b/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java index 613bd051f..aacecb6a3 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java +++ b/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java @@ -61,12 +61,12 @@ public class Utils { } public static List getModList(Shell shell, String path) { - String command = "find " + path + " -type d -maxdepth 1 ! -name \"*.core\" ! -name \"*lost+found\" ! -name \"*magisk\""; + String command = "ls -d " + path + "/* | grep -v lost+found"; return shell.su(command); } public static List readFile(Shell shell, String path) { - String command = "cat " + path; + String command = "cat " + path + " | sed '$a\\ ' | sed '$d'"; return shell.su(command); }