remove some magisk related code

Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/89/head
androidacy-user 2 years ago
parent c05f8827f6
commit 90883bff93

@ -23,11 +23,8 @@ class InstallerInitializer {
companion object {
var isKsu: Boolean = false
private val MAGISK_SBIN = File("/sbin/magisk")
private val MAGISK_SYSTEM = File("/system/bin/magisk")
private val MAGISK_SYSTEM_EX = File("/system/xbin/magisk")
private var mgskPth: String? = null
private var mgskVerCode = 0
private var verCode = 0
private var hsRmdsk = false
const val ERROR_NO_PATH = 1
const val ERROR_NO_SU = 2
@ -67,7 +64,7 @@ class InstallerInitializer {
}
fun peekMagiskVersion(): Int {
return mgskVerCode
return verCode
}
fun peekHasRamdisk(): Boolean {
@ -94,7 +91,7 @@ class InstallerInitializer {
}
if (forceCheck) {
if (mgskPth == null) {
mgskVerCode = 0
verCode = 0
}
}
if (mgskPth != null) {
@ -174,6 +171,7 @@ class InstallerInitializer {
if (MainApplication.forceDebugLogging) {
Timber.i("Kernelsu detected")
}
verCode = output[1].toInt()
mgskPth = "/data/adb"
isKsu = true
// if analytics enabled, set breadcrumb for countly
@ -212,7 +210,7 @@ class InstallerInitializer {
if (mgskPth == null && Shell.isAppGrantedRoot() == true) {
Timber.e("[ANOMALY] Failed to get Magisk path but granted root")
}
Companion.mgskVerCode = mgskVerCode
verCode = mgskVerCode
return mgskPth
} catch (ignored: Exception) {
// work around edge case

Loading…
Cancel
Save