refine createRootShell

This commit is contained in:
5ec1cff
2024-10-04 15:11:11 +08:00
parent 136e373ad1
commit 586272ab96

View File

@@ -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()
}