Access iOS filesystem without jailbreak?

2019-04-07 07:11发布

I would like to write/use an open source script that can access iOS filesystem (non-jailbroken). On a Jailbroken device, i use ssh/scp to access, transfer data from the device. Intent is to copy some part of the iOS filesystem (say /var/mobile/Applications/xxx-xxxx/Documents) to a Mac, from a non-Jailbroken device, using some script. I see that tools like iFunBox is able to do it. Would like to know it manages to do so.

I came across mobiledevice.h but could not really understand how to use it.

Also, would prefer getting this done over USB.. for a jailbroken device, i use tcprelay.py for doing the usb tunneling. Is there something i can use for a non jailbroken device?

2条回答
女痞
2楼-- · 2019-04-07 07:42

The MobileDeviceManager library brings us simple filesystem operations (it's an easy-to-use Objective-C wrapper around the MobileDevice framework you have come across).

The thing is that it doesn't support copying files from the device to the computer, only the other way around. So, in order to work around this issue, I've created a patch (GitHub gist) that you can merge into the included sample program to have it understand the copyFrom command.

查看更多
姐就是有狂的资本
3楼-- · 2019-04-07 07:51

You can install the ifuse tool, which is hosted here: https://github.com/libimobiledevice/ifuse

In order to compile this tool, you will need the a working set of Gnu-tools (make, libtool, etc).

#Don't worry - clang is still default
sudo port install gcc48 

NB: Update your .bash_profile (or similar) to include the following:

#Important - this is where your compiled libs will get installed to, so we need this
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/** 

The rest of this process should take a few minutes

Install fuse4x

sudo port install fuse4x

Build the dependencies:

Check out: https://github.com/libimobiledevice/libplist, cd into the checkout, and run:

./autogen.sh
./configure
make
sudo make install

Check out: https://github.com/libimobiledevice/libusbmuxd, cd into the checkout, and run:

./autogen.sh
./configure
make
sudo make install

Check out: https://github.com/libimobiledevice/libimobiledevice, cd into the checkout, and run:

./autogen.sh
./configure
make
sudo make install

(If you're on Linux you'll also need to install usbmuxd, after building libusbmuxd and libimobiledevice. . otherwise, for Windows and OSX . . . )

Now build iFuse:

Check out: https://github.com/libimobiledevice/ifuse

./autogen.sh
./configure
make
sudo make install

To use ifuse to access your app's documents directory:

Make a mount directory:

sudo mkdir -p /Volumes/myapp.app

Now mount the app's dir:

ifuse --container <appid> /Volumes/abced.app

Where app id is the name what's displayed in the bundle identifier . . example:

 ifuse --container mycompany.ABCED.com /Volumes/abced.app/

(Refer to the attached pic)

enter image description here

查看更多
登录 后发表回答