Reputation: 1753
I went through various posts which talks about jailbreak detection mechanisms. Whatever I came across is either something that apple would reject during the vetting process or something that could be bypassed. I also came to know that apple removed the jailbreak API..
So, is there any foolproof mechanism with which i can check whether a device is jailbroken?
Upvotes: 3
Views: 6296
Reputation: 19
Use this app for Detecting Jailbroken Devices.
Two ways to bypass Jailbreak Detection
Have a look at this Blog Interesting stuff out there for Bypass Jailbreak Checks.
Upvotes: 1
Reputation: 318884
I can't claim this is foolproof but I know it works, at least in some cases (if not all). I have had this code in one of my App Store apps for 6 months and 4 updates so Apple appears to be OK with this.
if ([[NSFileManager defaultManager] fileExistsAtPath:@"/bin/bash"] ||
[[NSFileManager defaultManager] fileExistsAtPath:@"/Applications/Cydia.app"] ||
[[NSFileManager defaultManager] fileExistsAtPath:@"/private/var/lib/apt"]) {
// Device is jailbroken
}
Any good hacker could probably find a way to no-op this code. Making this more hacker proof is an exercise left to the reader.
Upvotes: 5