pragma mark - 测试 启动时检测手机设备是否越狱
//方法一: 检测手机中是否有cydia软件.
- (BOOL)isJailBreak1
{
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@”cydia://”]])
{
[self stringWarning];
return YES;
}
return NO;
}
//方法二: 检测手机中是够有以下几个表与包,如果有代表手机已经越狱
define ARRAY_SIZE(a) sizeof(a)/sizeof(a[0])
const char* jailbreak_tool_pathes[] = {
“/Applications/Cydia.app”,
“/Library/MobileSubstrate/MobileSubstrate.dylib”,
“/bin/bash”,
“/usr/sbin/sshd”,
“/etc/apt”
};
- (BOOL)isJailBreak2
{
for (int i=0; i