From c11a3dc95c3eaa006aa5b46c805bc18a8d90163d Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 20 Jul 2017 00:51:30 +0800 Subject: [PATCH] Fix Magisk Manager freezing issue --- app/src/main/java/com/topjohnwu/magisk/utils/Utils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }