manager: Display Zygisk implementation method with rezygisk support (#278)
* manager: Display Zygisk implementation method with rezygisk support Signed-off-by: prslc <prslc113@gmail.com> * manager: Fix incorrect display of Zygisk implementation when module is disabled Signed-off-by: prslc <prslc113@gmail.com> --------- Signed-off-by: prslc <prslc113@gmail.com>
This commit is contained in:
@@ -558,9 +558,14 @@ fun getKpmVersion(): String {
|
|||||||
fun getZygiskImplement(): String {
|
fun getZygiskImplement(): String {
|
||||||
val shell = getRootShell()
|
val shell = getRootShell()
|
||||||
val zygiskPath = "/data/adb/modules/zygisksu"
|
val zygiskPath = "/data/adb/modules/zygisksu"
|
||||||
val result = if (ShellUtils.fastCmdResult(shell, "test -f $zygiskPath/module.prop")) {
|
val rezygiskPath = "/data/adb/modules/rezygisk"
|
||||||
|
val result = if (ShellUtils.fastCmdResult(shell, "test -f $zygiskPath/module.prop && test ! -f $zygiskPath/disable")) {
|
||||||
ShellUtils.fastCmd(shell, "grep '^name=' $zygiskPath/module.prop | cut -d'=' -f2")
|
ShellUtils.fastCmd(shell, "grep '^name=' $zygiskPath/module.prop | cut -d'=' -f2")
|
||||||
} else "None"
|
} else if (ShellUtils.fastCmdResult(shell, "test -f $rezygiskPath/module.prop && test ! -f $rezygiskPath/disable")) {
|
||||||
|
ShellUtils.fastCmd(shell, "grep '^name=' $rezygiskPath/module.prop | cut -d'=' -f2")
|
||||||
|
} else {
|
||||||
|
"None"
|
||||||
|
}
|
||||||
Log.i(TAG, "Zygisk implement: $result")
|
Log.i(TAG, "Zygisk implement: $result")
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user