isRooted
Determine if the root mode is enabled.
🔑 Minimum required license level: Core.
Sample usage
try {
val systemDiagnostic = rasp.diagnostic.system
val isRooted = systemDiagnostic.isRooted()
Log.d("RASP-DEMO", "isRooted: $isRooted")
} catch (e: Exception) {
Log.e("RASP-DEMO", "[systemDiagnostic] isRooted error: ${e.message}")
}
Content copied to clipboard
To observe changes of this function. You can use the observe() method.
val systemNetwork = rasp.watcher.system.observe()
launch {
systemModel.isRooted.collect { detected ->
if (detected != null && detected) {
Log.d("RASP-DEMO", "[isRooted] $detected")
}
}
Content copied to clipboard
Return
Pair<Boolean, ArrayList<RootDiagnosticSymptom>>
— Boolean
true if the device is rooted, — ArrayList<RootDiagnosticSymptom>>
list of root diagnostic symptoms on the device.