原文链接 #include <sys/mount.h> 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(@"已越狱, 没有设备唯一识别码"); }