iOS
iOS is an operating system created by Apple Inc. for use in the iPhone series of smartphones. Although connecting iOS devices to Linux is not supported by Apple, the libimobiledevice project provides libraries and tools to connect and transfer data between iOS devices and Linux machines.
Installation
Install the libimobiledevice package.
Connecting to a device
Usbmux daemon
The libimobiledevice package depends on usbmuxd, which is responsible for performing the low-level connection to iOS devices. The usbmuxd package also includes an udev rule that automatically starts and stops the daemon whenever a device is connected or disconnected.
Connect the iOS device and verify that usbmuxd.service
is automatically started.
$ systemctl status usbmuxd.service
''...'' Active: active (running) since Sun 2020-01-19 19:23:18 UTC; 22s ago ''...''
Pairing
After connecting your iOS device and unlocking the screen, you should be presented with a "Trust This Computer?" popup on the device. Tap "Trust", then enter your device passcode to complete the pairing process.
If you do not see the popup, you can start the pairing process manually. Connect the device, unlock the screen and run:
If you have multiple iOS devices connected parameter can be passed to target specific device.
You can verify the pairing has succeeded by running:
Transferring data
After pairing, iOS exposes two different filesystems to the computer. One is the media filesystem, containing the device's photos, videos and music. The second filesystem is used for sharing files directly to certain apps. This is sometimes called "iTunes document sharing".
Using a graphical file manager
File managers which use GVFS can interact with iOS devices. To access the media filesystem, install gvfs-gphoto2. To access the app document filesystem, install gvfs-afc.
To access iOS files using Dolphin, install and . This will expose both the media and app document filesystems.
Manual mounting
Install the package. You can then run the following command to mount your iPhone's media filesystem:
$ ifuse mountpoint
You can use this to access the device's photos inside .
To access an app's document filesystem, first you need to identify the app:
You can then mount an application's files using:
$ ifuse --documents APPID mountpoint
Where APPID is the bundle identifier of the desired application, such as org.videolan.vlc-ios
.
After you're done, unmount the filesystem:
$ fusermount -u mountpoint
Importing videos and pictures
Both videos and photos can be found in typically in .
HTML5 videos
Typically you want to convert MOV files to a HTML5 video format like OGV using ffmpeg2theora. Note that the creation date metadata is not in the converted video, so you need to use a script like:
And use or in order to preserve the file's date & time.
Troubleshooting
ifuse fails to mount application directories
When using ifuse to mount application directories, you may run into the following error when trying to list the contents of the mountpoint:
".": Input/output error (os error 5)
This is a known issue that has been fixed in the current development version of libimobiledevice, but has not been released in a stable version yet. A workaround is to install .
Device cannot be redirected to a virtual machine
If you use a Windows virtual machine to sync your device via USB, trying to redirect it may fail with a "device is in use by another application" message. This is due to usbmuxd.service
starting automatically when the device is connected. This can be solved by either stopping or masking usbmuxd.service
.
See also
- Ubuntu documentation for iPhone and iPod Touch (not updated since 2014)
- Apple trailers downloader script