开发者

Giving iPhone app root permissions

开发者 https://www.devze.com 2023-03-12 16:11 出处:网络
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

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

精彩评论

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

关注公众号