Libimobiledevice: Difference between revisions

From NixOS Wiki
imported>Jiehong
Created page with "In order to be able to automatically mount your iOS device (such as an iPhone) when connecting it, you need to install `libimobiledevice` and to activate the `usbmuxd` service..."
 
imported>Tobias.bora
No edit summary
Line 7: Line 7:
environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs; [
   libimobiledevice
   libimobiledevice
  ifuse # optional, to mount using 'ifuse'
];
];
</syntaxhighlight>
</syntaxhighlight>
You can then mount your device using ifuse:
<syntaxhighlight>
$ mkdir /tmp/iphone
$ ifuse /tmp/iphone
</syntaxhighlight>
If you get an error about `ERROR: No device found!`, check the status of `usbmuxd`:
<syntaxhighlight>
$ sudo systemctl status usbmuxd.service
</syntaxhighlight>
If you see an error
<syntaxhighlight>
ERROR: Could not connect to lockdownd on device [...], lockdown error -8
</syntaxhighlight>
you may need to restart the usbmuxd service as reported [here https://github.com/NixOS/nixpkgs/issues/152592]:
<syntaxhighlight>
$ sudo systemctl restart usbmuxd.service
</syntaxhighlight>
(it may take a bit of time)

Revision as of 10:25, 30 December 2021

In order to be able to automatically mount your iOS device (such as an iPhone) when connecting it, you need to install `libimobiledevice` and to activate the `usbmuxd` service.

Add the following to your `configuration.nix`:

services.usbmuxd.enable = true;
environment.systemPackages = with pkgs; [
  libimobiledevice
  ifuse # optional, to mount using 'ifuse'
];

You can then mount your device using ifuse:

$ mkdir /tmp/iphone
$ ifuse /tmp/iphone

If you get an error about `ERROR: No device found!`, check the status of `usbmuxd`:

$ sudo systemctl status usbmuxd.service

If you see an error

ERROR: Could not connect to lockdownd on device [...], lockdown error -8

you may need to restart the usbmuxd service as reported [here https://github.com/NixOS/nixpkgs/issues/152592]:

$ sudo systemctl restart usbmuxd.service

(it may take a bit of time)