我不知道这是可能的,但我可以更改股票 iOS 文件吗?更具体地说,我不想在“/System/Library/CoreServices/”中编辑文件“SystemVersion.plist”,而是使用 NSDictionary。这就是我的代码的样子:
NSFileManager *fm = [[NSFileManager alloc] init];
NSArray *array;
fm = [NSFileManager defaultManager];
[fm changeCurrentDirectoryPath:@"/System/Library/CoreServices/"];
array = [fm contentsOfDirectoryAtPath:fm.currentDirectoryPath error:NULL];
NSLog(@"Path:%@ Items:%@", fm.currentDirectoryPath, array);
NSDictionary *systemVersion = [[NSDictionary alloc] initWithContentsOfFile:@"SystemVersion.plist"];
[systemVersion setValue:@"7.0" forKey:@"ProductVersion"];
[systemVersion writeToFile:@"/System/Library/CoreServices/SystemVersion.plist" atomically:NO]; //This code doesn't overwrite the current file!
我在网上找遍了,没有找到答案!我希望我除了越狱别无选择
更新:我问我如何从c或objective-c获得root访问权限会更好吗?