webui: use global mount namespace by default.

This commit is contained in:
weishu 2024-02-29 13:59:13 +08:00
parent 622a7d73dc
commit e39a80f91e

View File

@ -27,7 +27,7 @@ class WebViewInterface(val context: Context, private val webView: WebView) {
@JavascriptInterface
fun exec(cmd: String): String {
val shell = createRootShell()
val shell = createRootShell(true)
return ShellUtils.fastCmd(shell, cmd)
}
@ -63,7 +63,7 @@ class WebViewInterface(val context: Context, private val webView: WebView) {
processOptions(finalCommand, options)
finalCommand.append(cmd)
val shell = createRootShell()
val shell = createRootShell(true)
val result = shell.newJob().add(finalCommand.toString()).to(ArrayList(), ArrayList()).exec()
val stdout = result.out.joinToString(separator = "\n")
val stderr = result.err.joinToString(separator = "\n")
@ -97,7 +97,7 @@ class WebViewInterface(val context: Context, private val webView: WebView) {
finalCommand.append(command)
}
val shell = createRootShell()
val shell = createRootShell(true)
val emitData = fun(name: String, data: String) {
val jsCode =