From 37aa8870b0268a25695a16dcf637579ebbc84d8f Mon Sep 17 00:00:00 2001 From: palazik Date: Sat, 11 Jul 2026 18:10:12 +0500 Subject: [PATCH] manager: fix stray quote corrupting saved app profile templates setAppProfileTemplate built the ksud command as: ... profile set-template "$id" "$escapedTemplate'" The trailing single quote before the closing double quote is not part of the shell quoting, so it is passed through literally and appended to the template content that ksud writes to disk. Every template saved through the manager therefore gained a spurious `'` character. Remove the stray quote so the template argument is passed unmodified. --- manager/app/src/main/java/me/weishu/kernelsu/ui/util/KsuCli.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manager/app/src/main/java/me/weishu/kernelsu/ui/util/KsuCli.kt b/manager/app/src/main/java/me/weishu/kernelsu/ui/util/KsuCli.kt index a2d3597ec39d..fd6a0e2e360f 100644 --- a/manager/app/src/main/java/me/weishu/kernelsu/ui/util/KsuCli.kt +++ b/manager/app/src/main/java/me/weishu/kernelsu/ui/util/KsuCli.kt @@ -474,7 +474,7 @@ fun getAppProfileTemplate(id: String): String { fun setAppProfileTemplate(id: String, template: String): Boolean { val shell = getRootShell() val escapedTemplate = template.replace("\"", "\\\"") - val cmd = """${getKsuDaemonPath()} profile set-template "$id" "$escapedTemplate'"""" + val cmd = """${getKsuDaemonPath()} profile set-template "$id" "$escapedTemplate"""" return shell.newJob().add(cmd) .to(ArrayList(), null).exec().isSuccess }