Magisk/app/src/main/java/com/topjohnwu/magisk/Info.kt

27 lines
661 B
Kotlin
Raw Normal View History

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 {
var magiskVersionCode = -1
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
}
}
}