2019-08-08 07:59:23 +00:00
|
|
|
package com.topjohnwu.magisk
|
|
|
|
|
|
|
|
import com.topjohnwu.magisk.model.entity.UpdateInfo
|
|
|
|
import com.topjohnwu.superuser.Shell
|
|
|
|
import com.topjohnwu.superuser.ShellUtils
|
|
|
|
|
|
|
|
object Info {
|
|
|
|
|
2019-10-07 18:09:12 +00:00
|
|
|
@JvmStatic
|
2019-08-08 07:59:23 +00:00
|
|
|
var magiskVersionCode = -1
|
|
|
|
|
2019-10-07 18:09:12 +00:00
|
|
|
@JvmStatic
|
2019-08-08 07:59:23 +00:00
|
|
|
var magiskVersionString = ""
|
|
|
|
|
|
|
|
var remote = UpdateInfo()
|
|
|
|
|
|
|
|
var keepVerity = false
|
|
|
|
var keepEnc = false
|
|
|
|
var recovery = false
|
|
|
|
|
|
|
|
fun loadMagiskInfo() {
|
|
|
|
runCatching {
|
|
|
|
magiskVersionString = ShellUtils.fastCmd("magisk -v").split(":".toRegex())[0]
|
|
|
|
magiskVersionCode = ShellUtils.fastCmd("magisk -V").toInt()
|
|
|
|
Config.magiskHide = Shell.su("magiskhide --status").exec().isSuccess
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|