问题
I want use
task_for_pid()
and attach to another process and then change its memory on iOS system. I could do it successfully on OS X with the help of authorization services API, but on iOS,task_for_pid()
always returnsKERN_FAILURE
. I need toget task_for_pid()
function to work on jailbreak iPhone under root. As discussed in “Authentication” iOS does not provide this API, What should I do?Could I run as root on iOS Simulator and how to test app required running as root?
回答1:
It is returning KERN_FAILURE
because of sandbox restrictions. Your executable needs the task_for_pid-allow
and get-task-allow
entitlements. See here for help on adding them to an executable.
来源:https://stackoverflow.com/questions/9944451/jailbreak-developer-iphone-with-task-for-pid