开发者

Giving iPhone app root permissions

I am trying to give my iPhone app root permissions from inside the app itself whe开发者_运维知识库n I launch it, it will run on a jailbroken device also. Could anyone explain how I might do this?


First, are you really really sure that your app actually needs root? root is very dangerous if you don't know exactly what you're doing.

That said, to run as root, install your app into /Applications/ then setuid the executable to root.

If you can, separate out the code that needs root privileges into a separate setuid'd executable and shell out to that from your main application (which would run as mobile). This lets you isolate the privileged code to make securing it easier.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜