一种检测是否越狱&获取设备唯一识别码的方式[更新]

#include 

struct statfs buf;
statfs("/", &buf);
NSLog(@"%s", buf.f_mntfromname);
char* prefix = "com.apple.os.update-";
if(strstr(buf.f_mntfromname, prefix)) {
    NSLog(@"未越狱, 设备唯一识别码=%s", buf.f_mntfromname+strlen(prefix));
} else {
    NSLog(@"已越狱, 没有设备唯一识别码");
}

转载:tuancc

你可能感兴趣的:(一种检测是否越狱&获取设备唯一识别码的方式[更新])