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

@@ -51,8 +51,17 @@ fun createRootShell(globalMnt: Boolean = false): Shell {
builder.build(getKsuDaemonPath(), "debug", "su") builder.build(getKsuDaemonPath(), "debug", "su")
} }
} catch (e: Throwable) { } catch (e: Throwable) {
Log.e(TAG, "su failed: ", e) Log.w(TAG, "ksu failed: ", e)
builder.build("sh") try {
if (globalMnt) {
builder.build("su")
} else {
builder.build("su", "-mm")
}
} catch (e: Throwable) {
Log.e(TAG, "su failed: ", e)
builder.build("sh")
}
} }
} }