[转]IOS下如何判断机器是否越狱
转自: http://blog.csdn.net/kaizi318/article/details/9135385
关于判断iPhone是否是jailbreak机器,可参考如下代码:
static const char* jailbreak_apps[] = { "/Applications/Cydia.app", "/Applications/blackra1n.app", "/Applications/blacksn0w.app", "/Applications/greenpois0n.app", "/Applications/limera1n.app", "/Applications/redsn0w.app", NULL, }; - (BOOL)isJailBrokeDevice { // Check whether the jailbreak apps are installed for (int i = 0; jailbreak_apps[i] != NULL; ++i) { if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString thUTF8String:jailbreak_apps[i]]]) { return YES; } } return NO; }
iOS下如何判断机器是否越狱
BOOL isJailBreak() { int res = access(”/var/mobile/Library/AddressBook/AddressBook.sqlitedb”, F_OK); if (res != 0) return NO; return YES; }
申明
非源创博文中的内容均收集自网上,若有侵权之处,请及时联络,我会在第一时间内删除.再次说声抱歉!!!
博文欢迎转载,但请给出原文连接。