2020-07-13-Anroid-KillApp
finishAffinity()Utilities/RootChecker.kt
import java.io.File
class RootChecker {
fun isRooted(): Boolean {
return findBinary("su")
}
fun findBinary(binaryName: String): Boolean {
var found = false
if (!found) {
val places = arrayOf(
"/sbin/", "/system/bin/", "/system/xbin/", "/data/local/xbin/",
"/data/local/bin/", "/system/sd/xbin/", "/system/bin/failsafe/", "/data/local/"
)
for (where in places) {
if (File(where + binaryName).exists()) {
found = true
break
}
}
}
return found
}
}MainActivity.kt
Last updated
Was this helpful?