diff options
-rw-r--r-- | README.md | 132 |
1 files changed, 85 insertions, 47 deletions
@@ -1,10 +1,8 @@ | |||
1 | # usbmuxd | 1 | # usbmuxd |
2 | 2 | ||
3 | ## About | 3 | *A socket daemon to multiplex connections from and to iOS devices.* |
4 | 4 | ||
5 | A socket daemon to multiplex connections from and to iOS devices. | 5 | ## Features |
6 | |||
7 | ## Background | ||
8 | 6 | ||
9 | usbmuxd stands for "USB multiplexing daemon". This daemon is in charge of | 7 | usbmuxd stands for "USB multiplexing daemon". This daemon is in charge of |
10 | multiplexing connections over USB to an iOS device. | 8 | multiplexing connections over USB to an iOS device. |
@@ -12,70 +10,110 @@ multiplexing connections over USB to an iOS device. | |||
12 | To users, it means you can sync your music, contacts, photos, etc. over USB. | 10 | To users, it means you can sync your music, contacts, photos, etc. over USB. |
13 | 11 | ||
14 | To developers, it means you can connect to any listening localhost socket on the | 12 | To developers, it means you can connect to any listening localhost socket on the |
15 | device. usbmuxd is not used for tethering data transfer which uses a dedicated | 13 | device. |
16 | USB interface as a virtual network device. | ||
17 | |||
18 | Multiple connections to different TCP ports can happen in parallel. | ||
19 | The higher-level layers are handled by libimobiledevice. | ||
20 | |||
21 | When usbmuxd is running (normally started or stopped as a result of _udev_ | ||
22 | auto-insertion messages, or by _systemd_) it provides a socket interface in | ||
23 | `/var/run/usbmuxd` that is designed to be compatible with the socket interface | ||
24 | that is provided on macOS. | ||
25 | |||
26 | You should also create an `usbmux` user that has access to USB devices on your | ||
27 | system. Alternatively, just pass a different username using the `-U` argument. | ||
28 | 14 | ||
29 | The daemon also manages pairing records with iOS devices and the host in | 15 | usbmuxd is not used for tethering data transfer which uses a dedicated USB |
30 | `/var/lib/lockdown` (Linux) or `/var/db/lockdown` (macOS). | 16 | interface as a virtual network device. |
31 | 17 | ||
32 | Ensure proper permissions are setup for the daemon to access the directory. | 18 | Multiple connections to different TCP ports can happen in parallel. |
33 | |||
34 | ## Requirements | ||
35 | 19 | ||
36 | Development Packages of: | 20 | The higher-level layers are handled by [libimobiledevice](https://github.com/libimobiledevice/libimobiledevice.git). |
37 | * libimobiledevice | 21 | The low-level layer is handled by [libusbmuxd](https://github.com/libimobiledevice/libusbmuxd.git). |
38 | * libplist | 22 | |
39 | * libusb | 23 | ## Installation / Getting started |
24 | |||
25 | ### Debian / Ubuntu Linux | ||
26 | |||
27 | First install all required dependencies and build tools: | ||
28 | ```shell | ||
29 | sudo apt-get install \ | ||
30 | build-essential \ | ||
31 | checkinstall \ | ||
32 | git \ | ||
33 | autoconf \ | ||
34 | automake \ | ||
35 | libtool-bin \ | ||
36 | libplist-dev \ | ||
37 | libusbmuxd-dev \ | ||
38 | libimobiledevice-dev \ | ||
39 | libusb-1.0-0-dev \ | ||
40 | udev | ||
41 | ``` | ||
40 | 42 | ||
41 | Software: | 43 | If systemd is not installed and should control spawning the daemon use: |
42 | * make | 44 | ```shell |
43 | * autoheader | 45 | sudo apt-get install \ |
44 | * automake | 46 | systemd |
45 | * autoconf | 47 | ``` |
46 | * libtool | ||
47 | * pkg-config | ||
48 | * gcc or clang | ||
49 | * udev (Linux only) | ||
50 | 48 | ||
51 | Optional: | 49 | Then clone the actual project repository: |
52 | * systemd (Linux only) | 50 | ```shell |
51 | git clone https://github.com/libimobiledevice/usbmuxd.git | ||
52 | cd usbmuxd | ||
53 | ``` | ||
53 | 54 | ||
54 | ## Installation | 55 | Now you can build and install it: |
56 | ```shell | ||
57 | ./autogen.sh | ||
58 | make | ||
59 | sudo make install | ||
60 | ``` | ||
55 | 61 | ||
56 | To compile run: | 62 | If you require a custom prefix or other option being passed to `./configure` |
63 | you can pass them directly to `./autogen.sh` like this: | ||
57 | ```bash | 64 | ```bash |
58 | ./autogen.sh | 65 | ./autogen.sh --prefix=/opt/local --without-preflight --without-systemd |
59 | make | 66 | make |
60 | sudo make install | 67 | sudo make install |
61 | ``` | 68 | ``` |
62 | 69 | ||
70 | To output a list of available configure options use: | ||
71 | ```bash | ||
72 | ./autogen.sh --help | ||
73 | ``` | ||
74 | |||
75 | ## Usage | ||
76 | |||
63 | The daemon is automatically started by udev or systemd depending on what you | 77 | The daemon is automatically started by udev or systemd depending on what you |
64 | have configured it on hotplug of an iOS device and exits if the last device | 78 | have configured upon hotplug of an iOS device and exits if the last device |
65 | was unplugged. | 79 | was unplugged. |
66 | 80 | ||
81 | When usbmuxd is running it provides a socket interface at `/var/run/usbmuxd` | ||
82 | that is designed to be compatible with the socket interface that is provided | ||
83 | on macOS. | ||
84 | |||
85 | You should also create an `usbmux` user that has access to USB devices on your | ||
86 | system. Alternatively, just pass a different username using the `-U` argument. | ||
87 | |||
88 | The daemon also manages pairing records with iOS devices and the host in | ||
89 | `/var/lib/lockdown` (Linux) or `/var/db/lockdown` (macOS). | ||
90 | |||
91 | Ensure proper permissions are setup for the daemon to access the directory. | ||
92 | |||
67 | For debugging purposes it is helpful to start usbmuxd using the foreground `-f` | 93 | For debugging purposes it is helpful to start usbmuxd using the foreground `-f` |
68 | argument and enable verbose mode `-v` to get suitable logs. | 94 | argument and enable verbose mode `-v` to get suitable logs. |
69 | 95 | ||
70 | ## Who/What/Where? | 96 | Please consult the usage information or manual page for a full documentation of |
97 | available command line options: | ||
98 | ```shell | ||
99 | usbmuxd --help | ||
100 | man usbmuxd | ||
101 | ``` | ||
102 | |||
103 | ## Links | ||
71 | 104 | ||
72 | * Home: https://libimobiledevice.org/ | 105 | * Homepage: https://libimobiledevice.org/ |
73 | * Code: `git clone https://git.libimobiledevice.org/usbmuxd.git` | 106 | * Repository: https://git.libimobiledevice.org/usbmuxd.git |
74 | * Code (Mirror): `git clone https://github.com/libimobiledevice/usbmuxd.git` | 107 | * Repository (Mirror): https://github.com/libimobiledevice/usbmuxd.git |
75 | * Tickets: https://github.com/libimobiledevice/usbmuxd/issues | 108 | * Issue Tracker: https://github.com/libimobiledevice/usbmuxd/issues |
76 | * Mailing List: https://lists.libimobiledevice.org/mailman/listinfo/libimobiledevice-devel | 109 | * Mailing List: https://lists.libimobiledevice.org/mailman/listinfo/libimobiledevice-devel |
77 | * Twitter: https://twitter.com/libimobiledev | 110 | * Twitter: https://twitter.com/libimobiledev |
78 | 111 | ||
112 | ## License | ||
113 | |||
114 | This library and utilities are licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), | ||
115 | also included in the repository in the `COPYING.GPLv3` file. | ||
116 | |||
79 | ## Credits | 117 | ## Credits |
80 | 118 | ||
81 | The initial usbmuxd daemon implementation was authored by Hector Martin. | 119 | The initial usbmuxd daemon implementation was authored by Hector Martin. |
@@ -85,4 +123,4 @@ Apple, iPhone, iPod, and iPod Touch are trademarks of Apple Inc. | |||
85 | usbmuxd is an independent software application and has not been | 123 | usbmuxd is an independent software application and has not been |
86 | authorized, sponsored, or otherwise approved by Apple Inc. | 124 | authorized, sponsored, or otherwise approved by Apple Inc. |
87 | 125 | ||
88 | README Updated on: 2020-06-08 | 126 | README Updated on: 2020-06-13 |