manager: Allow to use other su to install
This commit is contained in:
@@ -50,10 +50,19 @@ fun createRootShell(globalMnt: Boolean = false): Shell {
|
|||||||
} else {
|
} else {
|
||||||
builder.build(getKsuDaemonPath(), "debug", "su")
|
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) {
|
} catch (e: Throwable) {
|
||||||
Log.e(TAG, "su failed: ", e)
|
Log.e(TAG, "su failed: ", e)
|
||||||
builder.build("sh")
|
builder.build("sh")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun execKsud(args: String, newShell: Boolean = false): Boolean {
|
fun execKsud(args: String, newShell: Boolean = false): Boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user