Skip to content

Instantly share code, notes, and snippets.

@weekwood
Created December 12, 2012 21:15
Show Gist options
  • Save weekwood/4271719 to your computer and use it in GitHub Desktop.
Save weekwood/4271719 to your computer and use it in GitHub Desktop.
Check if iPhone jailbreak or not
+(BOOL) jailBreakCheck{
NSArray *jailbrokenPath = [NSArray arrayWithObjects:
@"/Applications/Cydia.app",
@"/Applications/RockApp.app",
@"/Applications/Icy.app",
@"/usr/sbin/sshd",
@"/usr/bin/sshd",
@"/usr/libexec/sftp-server",
@"/Applications/WinterBoard.app",
@"/Applications/SBSettings.app",
@"/Applications/MxTube.app",
@"/Applications/IntelliScreen.app",
@"/Library/MobileSubstrate/DynamicLibraries/Veency.plist",
@"/Applications/FakeCarrier.app",
@"/Library/MobileSubstrate/DynamicLibraries/LiveClock.plist",
@"/private/var/lib/apt",
@"/private/var/stash",
@"/private/var/mobile/Library/SBSettings/Themes",
@"/System/Library/LaunchDaemons/com.ikey.bbot.plist",
@"/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist",
@"/private/var/tmp/cydia.log",
@"/private/var/lib/cydia", nil];
for(NSString *string in jailbrokenPath)
if ([[NSFileManager defaultManager] fileExistsAtPath:string])
return YES;
return NO;
}
@robyzhou
Copy link

Awesome code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment