manager: Allow to use other su to install

This commit is contained in:
weishu
2024-04-15 12:32:20 +08:00
parent 2e2992a1c2
commit b1a225799a

View File

@@ -50,10 +50,19 @@ fun createRootShell(globalMnt: Boolean = false): Shell {
} else {
builder.build(getKsuDaemonPath(), "debug", "su")
}
} catch (e: Throwable) {
Log.w(TAG, "ksu failed: ", e)
try {
if (globalMnt) {
builder.build("su")
} else {
builder.build("su", "-mm")
}
} catch (e: Throwable) {
Log.e(TAG, "su failed: ", e)
builder.build("sh")
}
}
}
fun execKsud(args: String, newShell: Boolean = false): Boolean {