You've already forked KsuWebUIStandalone
mirror of
https://github.com/5ec1cff/KsuWebUIStandalone.git
synced 2025-09-06 06:37:11 +00:00
refine createRootShell
This commit is contained in:
@@ -12,9 +12,8 @@ inline fun <T> withNewRootShell(
|
||||
fun createRootShell(globalMnt: Boolean = false): Shell {
|
||||
Shell.enableVerboseLogging = BuildConfig.DEBUG
|
||||
val builder = Shell.Builder.create()
|
||||
return if (globalMnt) {
|
||||
builder.build("su", "-mm")
|
||||
} else {
|
||||
builder.build("su")
|
||||
}
|
||||
if (globalMnt) {
|
||||
builder.setFlags(Shell.FLAG_MOUNT_MASTER)
|
||||
}
|
||||
return builder.build()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user