From 60de2e4a6eaa321d212e646e33bacfaa8240c4d3 Mon Sep 17 00:00:00 2001 From: Ylarod Date: Thu, 16 Feb 2023 23:39:21 +0800 Subject: [PATCH] manager: send app list in bug report (#248) We need this for uid in dmesg --- .../src/main/java/me/weishu/kernelsu/ui/util/LogEvent.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/manager/app/src/main/java/me/weishu/kernelsu/ui/util/LogEvent.kt b/manager/app/src/main/java/me/weishu/kernelsu/ui/util/LogEvent.kt index 60ddce2c..46d4f06e 100644 --- a/manager/app/src/main/java/me/weishu/kernelsu/ui/util/LogEvent.kt +++ b/manager/app/src/main/java/me/weishu/kernelsu/ui/util/LogEvent.kt @@ -23,6 +23,7 @@ fun getBugreportFile(context: Context): File { val mountsFile = File(bugreportDir, "mounts.txt") val fileSystemsFile = File(bugreportDir, "filesystems.txt") val ksuFileTree = File(bugreportDir, "ksu_tree.txt") + val appListFile = File(bugreportDir, "app_list.txt") val shell = createRootShell() @@ -33,6 +34,7 @@ fun getBugreportFile(context: Context): File { shell.newJob().add("cat /proc/mounts > ${mountsFile.absolutePath}").exec() shell.newJob().add("cat /proc/filesystems > ${fileSystemsFile.absolutePath}").exec() shell.newJob().add("ls -alRZ /data/adb/ksu > ${ksuFileTree.absolutePath}").exec() + shell.newJob().add("cat /data/system/packages.list > ${appListFile.absolutePath}").exec() // basic information val buildInfo = File(bugreportDir, "basic.txt") @@ -70,9 +72,9 @@ fun getBugreportFile(context: Context): File { val targetFile = File(context.cacheDir, "KernelSU_bugreport_${current}.tar.gz") - shell.newJob().add("tar czf ${targetFile.absolutePath} -C ${bugreportDir.absolutePath} .").exec() + shell.newJob().add("tar czf ${targetFile.absolutePath} -C ${bugreportDir.absolutePath} .").exec() shell.newJob().add("rm -rf ${bugreportDir.absolutePath}").exec() shell.newJob().add("chmod 0644 ${targetFile.absolutePath}").exec() - return targetFile; + return targetFile } \ No newline at end of file