For Jailbroken (iOS) Devices:
Check for Jailbreak Tweaks: Look for apps like “SBSettings,” “MobileSubstrate,” or “Winterboard” that indicate the presence of a jailbroken device.
Check for Cydia: Cydia is the most popular app for jailbroken devices. Detecting its presence can confirm the device is jailbroken.
Use Jailbreak Detection Libraries: Libraries like JailMonkey or Objection can help identify if a device is jailbroken by scanning for jailbreak-specific files and system modifications.
Test for Privileged Actions: Jailbroken devices can bypass security restrictions. For example, try to access system files or make privileged API calls, like modifying system settings or reading device logs, which are typically not allowed on non-jailbroken devices.
For Rooted (Android) Devices:
Check for Superuser Access: Rooted devices often have apps like “SuperSU” or “Magisk” installed. These apps provide root permissions to applications, so checking for their presence can help identify a rooted device.
Check for Custom ROMs: Rooting often involves flashing custom ROMs. Check for traces of custom Android ROMs or unusual kernel versions.
Use Root Detection Libraries: Use libraries like RootBeer or SafetyNet to detect rooted devices by checking system files, permissions, and binary files typically associated with rooting.
Test for Privileged Actions: Just like jailbroken iOS devices, rooted Android devices can execute privileged actions. Test by trying to access directories that would normally be inaccessible or by attempting to execute commands that would fail on unrooted devices (like accessing /system
or using su
commands).