Libimobiledevice: Difference between revisions

imported>Onny
No edit summary
imported>Onny
Add information on tethering
Line 2: Line 2:
== Usage ==
== Usage ==


In order to be able to automatically mount your iOS device (such as an iPhone) when connecting it, you need to install <code>libimobiledevice</code> and to activate the <code>usbmuxd</code> service.
=== Preparation ===
 
In order to be able to automatically mount your iOS device (such as an iPhone) when connecting it or to enable USB tehtering, you need to install <code>libimobiledevice</code> and to activate the <code>usbmuxd</code> service.


Add the following to your <code>configuration.nix</code>:
Add the following to your <code>configuration.nix</code>:
Line 14: Line 16:
</syntaxhighlight>
</syntaxhighlight>


You can then mount your device using ifuse:
=== Mounting ===
 
Mounting the device via iFuse is possible with the following commands
 
<syntaxhighlight>
<syntaxhighlight>
$ mkdir /tmp/iphone
$ mkdir /tmp/iphone
$ ifuse /tmp/iphone
$ ifuse /tmp/iphone
</syntaxhighlight>
</syntaxhighlight>
If you get an error about <code>ERROR: No device found!</code>, check the status of <code>usbmuxd</code>:
If you get an error about <code>ERROR: No device found!</code>, check the status of <code>usbmuxd</code>:
<syntaxhighlight>
<syntaxhighlight>
$ sudo systemctl status usbmuxd.service
$ sudo systemctl status usbmuxd.service
</syntaxhighlight>
</syntaxhighlight>
If you see an error
If you see an error
<syntaxhighlight>
<syntaxhighlight>
ERROR: Could not connect to lockdownd on device [...], lockdown error -8
ERROR: Could not connect to lockdownd on device [...], lockdown error -8
</syntaxhighlight>
</syntaxhighlight>
you may need to restart the usbmuxd service as reported [https://github.com/NixOS/nixpkgs/issues/152592 here]:
you may need to restart the usbmuxd service as reported [https://github.com/NixOS/nixpkgs/issues/152592 here]:
<syntaxhighlight>
<syntaxhighlight>
$ sudo systemctl restart usbmuxd.service
$ sudo systemctl restart usbmuxd.service
</syntaxhighlight>
</syntaxhighlight>
(it may take a bit of time)
(it may take a bit of time)
=== Tethering ===
Tethering on iOS is possible via Wifi hotspot, Bluetooth or USB. In order to enable USB tethering, first enable tethering in the iOS networking settings. After that run following command
<syntaxhighlight>
$ idevicepair pair
</syntaxhighlight>
Confirm pairing by accepting the connection on your iOS device. After that an ethernet device will appear in your network device list.


== Maintainence ==
== Maintainence ==