0

I'm developing an app to be run on jailbroken devices and I'm a little stuck.

My app requires gdb to dump memory from an app. The problem I have is that creating or modifying files only works within code, when I try and run a command from shell, it won't run as root, and therefore won't let me write outside my sandbox (Which doesn't exist cause the app is for jailbroken devices).

So I have 2 theoretical solutions to my problem.

1) Find a way to run /bin/sh as root *preferred

2) If there's a way to dump memory to the terminal, I can grab with NSData and then create a file for it within my code. However I haven't seen away to do that.

Those are just the 2 ideas I came up with, let me know if this is possible, or if you know another way.

Thanks!

4

1 回答 1

0

任何用户都可以在 /tmp 目录中写入....

我只是更改了将内存转储到 /tmp/file.bin 的位置,然后我可以通过代码随意移动它。

于 2013-02-08T20:35:14.610 回答