diff options
Diffstat (limited to 'udev/85-usbmuxd.rules.in')
| -rw-r--r-- | udev/85-usbmuxd.rules.in | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/udev/85-usbmuxd.rules.in b/udev/85-usbmuxd.rules.in index 82221d4..c0a3900 100644 --- a/udev/85-usbmuxd.rules.in +++ b/udev/85-usbmuxd.rules.in | |||
| @@ -1,23 +1,7 @@ | |||
| 1 | # usbmuxd (iPhone "Apple Mobile Device" MUXer listening on /var/run/usbmuxd) | 1 | # usbmuxd (iPhone "Apple Mobile Device" MUXer listening on /var/run/usbmuxd) |
| 2 | 2 | ||
| 3 | # Skip anything non Apple | 3 | # Forces iPhone 1.0, 3G, 3GS and iPodTouch 1 and 2 to USB configuration 3 and run usbmuxd |
| 4 | ACTION=="add|remove", SUBSYSTEM!="usb|usb_endpoint", ATTRS{idVendor}!="05ac", GOTO="usbmuxd_rules_end" | 4 | ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[0-4]", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", RUN+="@prefix@/sbin/usbmuxd -u" |
| 5 | 5 | ||
| 6 | # Forces iPhone 1.0, 3G, 3GS and iPodTouch 1 and 2 to USB configuration 3 | 6 | # Exit usbmuxd when the last phone is removed |
| 7 | ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="1290|1291|1292|1293|1294", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", GOTO="usbmuxd_rules_end" | 7 | ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="05ac", ENV{ID_MODEL_ID}=="129[0-4]", RUN+="@prefix@/sbin/usbmuxd -x" |
| 8 | |||
| 9 | LABEL="usbmuxd_rules_usbmux" | ||
| 10 | |||
| 11 | # Only apply to usb endpoints | ||
| 12 | ACTION=="add|remove", SUBSYSTEM!="usb_endpoint", GOTO="usbmuxd_rules_end" | ||
| 13 | |||
| 14 | # Setup cute names for the endpoints | ||
| 15 | ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep04", IMPORT{program}="usb_id %p --export", SYMLINK+="usbmux/$env{ID_SERIAL_SHORT}/%s{direction}" | ||
| 16 | ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", IMPORT{program}="usb_id %p --export", SYMLINK+="usbmux/$env{ID_SERIAL_SHORT}/%s{direction}" | ||
| 17 | |||
| 18 | # Start and stop 'usbmuxd' as required | ||
| 19 | ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", RUN+="@prefix@/sbin/usbmuxd -u" | ||
| 20 | ACTION=="remove", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", RUN+="@prefix@/sbin/usbmuxd -x" | ||
| 21 | |||
| 22 | # skip | ||
| 23 | LABEL="usbmuxd_rules_end" | ||
