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 に答える