I am trying to give root access to my app on Jailbroken iPhone 9.3.3
I have followed the same steps as mentioned here - Gaining root permissions on iOS for NSFileManager (Jailbreak)
However the app does not gets root access. It looks like, the setuid(0) fails. I am using setuid(0)
and setgid(0)
in main function.
int main(int argc, char *argv[]) {
if(!(setuid(0) == 0 && setgid(0) == 0)) {
exit(EXIT_FAILURE);
}
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
The app exits in the above condition.
Any help will be greatly appreciated.