A library for Codename One to detect if the device is jailbroken/rooted.
This cn1lib is a thin wrapper around DDTJailbreakDetection on iOS and rootbeer on Android. Other platforms don’t support jailbreak detection.
Currently supported on iOS and Android. isJailbroken()
just returns false
elsewhere.
Add the CN1JailbreakDetection.cn1lib to your project through Codename One settings.
If you haven’t activated any cn1libs before in your Codename One projects, see this tutorial which explains the process.
if (JailbreakDetect.isJailbroken()) {
// device is jailbroken
} else {
// device is probably not jailbroken. BUT NOT 100% sure.
}
-
Created by Steve Hannah.
-
Rootbeer created by Scott Alexander-Brown.
-
DDTJailbreakDetection created by Thi