@@ -23,11 +23,8 @@ class InstallerInitializer {
2323
2424 companion object {
2525 var isKsu: Boolean = false
26- private val MAGISK_SBIN = File (" /sbin/magisk" )
27- private val MAGISK_SYSTEM = File (" /system/bin/magisk" )
28- private val MAGISK_SYSTEM_EX = File (" /system/xbin/magisk" )
2926 private var mgskPth: String? = null
30- private var mgskVerCode = 0
27+ private var verCode = 0
3128 private var hsRmdsk = false
3229 const val ERROR_NO_PATH = 1
3330 const val ERROR_NO_SU = 2
@@ -67,7 +64,7 @@ class InstallerInitializer {
6764 }
6865
6966 fun peekMagiskVersion (): Int {
70- return mgskVerCode
67+ return verCode
7168 }
7269
7370 fun peekHasRamdisk (): Boolean {
@@ -94,7 +91,7 @@ class InstallerInitializer {
9491 }
9592 if (forceCheck) {
9693 if (mgskPth == null ) {
97- mgskVerCode = 0
94+ verCode = 0
9895 }
9996 }
10097 if (mgskPth != null ) {
@@ -174,6 +171,7 @@ class InstallerInitializer {
174171 if (MainApplication .forceDebugLogging) {
175172 Timber .i(" Kernelsu detected" )
176173 }
174+ verCode = output[1 ].toInt()
177175 mgskPth = " /data/adb"
178176 isKsu = true
179177 // if analytics enabled, set breadcrumb for countly
@@ -212,7 +210,7 @@ class InstallerInitializer {
212210 if (mgskPth == null && Shell .isAppGrantedRoot() == true ) {
213211 Timber .e(" [ANOMALY] Failed to get Magisk path but granted root" )
214212 }
215- Companion .mgskVerCode = mgskVerCode
213+ verCode = mgskVerCode
216214 return mgskPth
217215 } catch (ignored: Exception ) {
218216 // work around edge case
0 commit comments