Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
11-21-2010, 03:10 AM #1
xcode reboot command driving me CRAZY!
So, I'm pretty new to xcode but have some understanding of its basics. For a while now I've been trying to create an method that reboots the phone. I know there are other apps out there that do this already (I've discovered them post trying to do this on my own) however I"m at the point now where I just want to understand how to do it!
I've tried the following with no luck:
I understand that you can go into mobile terminal and gain root access then type "reboot" which will successfully reboot the device, but I have no clue how to gain root access within an app to then use the system("reboot"); command. I'm assuming the reason this doesn't work is because from within the app I don't have root privileges.
Can anyone shine some light on this for me?
12-11-2010, 11:00 AM #2
You need to run the command as root.
12-11-2010, 03:07 PM #3
maxk, thanks for responding but as you'll see in my original post I indicate that I am aware that I need to run it from root. The problem is that I'm not sure how to do that.