Created
September 9, 2014 08:51
-
-
Save adison/dbd810ebcc71cd33bf5a to your computer and use it in GitHub Desktop.
isJailBroken
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| + (BOOL)isJailbroken { | |
| FILE *f = fopen("/bin/bash", "r"); | |
| BOOL isJailbroken = NO; | |
| if (f != NULL) | |
| // Device is jailbroken | |
| isJailbroken = YES; | |
| else | |
| // Device isn't jailbroken | |
| isJailbroken = NO; | |
| fclose(f); | |
| return isJailbroken; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment