Mount iOS under OSX using ifuse

  • Tutorial
The other day I was faced with the task of mounting an iPad in OSX 10.14 as an external drive, with the ability to perform file operations from the console. I found quite a few instructions on the Internet how to do this using the ifuse file system. Unfortunately, nothing came out with iOS 12. The device was unlocked, access to data was allowed, but despite this an error occurred:

Failed to connect to lockdownd service on the device.
Try again. If it still fails try rebooting your device.

This article is written to save time for those who have the same problem.

On github there is an instruction for building ifuse and main dependencies directly from the source in the repository, but this is a rather painstaking way as the main dependencies have many more dependencies, and they also have etc. Therefore, we will use the Homebrew package management system .

It is installed using a script on the offsite:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

The script itself will download all that is needed by homebrew, including the Xcode Command Line Tools. Ifuse requires OSXFuse , which can be downloaded from the offsite or installed using the command:

brew cask install osxfuse

Now you need to install the main dependencies:

brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
#Если libimobiledevice и usbmuxd еще не устанавливались#можно сразу выполнить эти команды
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice

IMPORTANT: If you already have stable versions of libimobiledevice and usbmuxd installed, you must uninstall them and install dev versions with the --HEAD switch otherwise, an error occurs when connecting devices with iOS 12.

Finally, install iFuse:

brew install ifuse

Everything is ready, if one device is connected, then you can mount it with the command:

ifuse ~/_ifuse_mount_point

where ~ / _ifuse_mount_point is the path to the mount point.



Ifuse can mount a publicly accessible file system (or the whole if there is root), as well as application directories that support the file sharing API.

If several devices are connected, in order to choose which one to mount, you must use the -u switch

ifuse ~/ifuse_mnt -u <UniqueDeviceID> 

In order to find out UniqueDeviceID, you can use the command:

ideviceinfo



To start from Spotlight, you can create AppleScript and save it as an application:

trydo shell script "/usr/local/bin/ifuse ~/_ifuse_mount_point"
on error errMsg
	display dialog "ERROR: " & errMsg
end try

Also popular now: