File tree Expand file tree Collapse file tree
manager/app/src/main/java/me/weishu/kernelsu/ui/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -266,8 +266,6 @@ fun flashModule(
266266fun runModuleAction (
267267 moduleId : String , onStdout : (String ) -> Unit , onStderr : (String ) -> Unit
268268): Boolean {
269- val shell = createRootShell(true )
270-
271269 val stdoutCallback: CallbackList <String ?> = object : CallbackList <String ?>() {
272270 override fun onAddElement (s : String? ) {
273271 onStdout(s ? : " " )
@@ -280,8 +278,11 @@ fun runModuleAction(
280278 }
281279 }
282280
283- val result = shell.newJob().add(" ${getKsuDaemonPath()} module action $moduleId " )
284- .to(stdoutCallback, stderrCallback).exec()
281+ val result = withNewRootShell(true ) {
282+ newJob().add(" ${getKsuDaemonPath()} module action $moduleId " )
283+ .to(stdoutCallback, stderrCallback).exec()
284+ }
285+
285286 Log .i(" KernelSU" , " Module runAction result: $result " )
286287
287288 return result.isSuccess
You can’t perform that action at this time.
0 commit comments