Closed ghost closed 3 months ago
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(@"已越狱, 没有设备唯一识别码"); }
this is a method by the H5GG dev
hey! Thanks for your suggestion
Hey! I checked that technique on a non-jailbroken iPhone and on Dopamine jailbroken iPhone. Both have ID in the buf.f_mntfromname - so the code you provide seems not to work :(
buf.f_mntfromname
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(@"已越狱, 没有设备唯一识别码"); }
this is a method by the H5GG dev