iOS Question Check if device jailbreaked

fziebell

Member
Licensed User
Hello.

Is it possible to determine whether an iphone or ipad is jailbreaked or rooted?
The background is, our customer wants to prevent his app running on manipulated devices.

Thank you, for your answer.
fz
 

Erel

Administrator
Staff member
Licensed User
B4X:
Sub IsJailbroken As Boolean
   Try
     For Each s As String In Array("/bin/bash", "/usr/sbin/sshd", "/etc/apt", "/private/var/lib/apt/", _
     "/Applications/Cydia.app")
       If File.Exists(s, "") Then Return True
     Next
   Catch
     Log(LastException)
   End Try
   Return False
End Sub

Based on this answer: https://stackoverflow.com/a/30580384/971547

I haven't tested it on a jailbroken device.
 
Upvote 0
Top