From e1866496eb25daba639492f6fa8b8529f0950501 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 26 Sep 2013 22:39:11 +0200 Subject: udev: lower rules numbering to make sure we start as early as possible To prevent the trust dialog from appearing on iOS7 devices we need to make sure that no PTP access is happening before usbmuxd starts. So we start as early as possible so the device will be in trusted host state. --- configure.ac | 2 +- udev/39-usbmuxd.rules.in | 7 +++++++ udev/85-usbmuxd.rules.in | 7 ------- 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 udev/39-usbmuxd.rules.in delete mode 100644 udev/85-usbmuxd.rules.in diff --git a/configure.ac b/configure.ac index c41d806..3067304 100644 --- a/configure.ac +++ b/configure.ac @@ -104,7 +104,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AC_OUTPUT([ Makefile src/Makefile -udev/85-usbmuxd.rules +udev/39-usbmuxd.rules ]) echo " diff --git a/udev/39-usbmuxd.rules.in b/udev/39-usbmuxd.rules.in new file mode 100644 index 0000000..da8042d --- /dev/null +++ b/udev/39-usbmuxd.rules.in @@ -0,0 +1,7 @@ +# usbmuxd ("Apple Mobile Device" muxer listening on /var/run/usbmuxd) + +# Forces iDevices to the last USB configuration and runs usbmuxd +ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", OWNER="usbmux", RUN+="@prefix@/sbin/usbmuxd -u -U usbmux" + +# Exit usbmuxd when the last device is removed +ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ENV{INTERFACE}=="255/*", RUN+="@prefix@/sbin/usbmuxd -x" diff --git a/udev/85-usbmuxd.rules.in b/udev/85-usbmuxd.rules.in deleted file mode 100644 index da8042d..0000000 --- a/udev/85-usbmuxd.rules.in +++ /dev/null @@ -1,7 +0,0 @@ -# usbmuxd ("Apple Mobile Device" muxer listening on /var/run/usbmuxd) - -# Forces iDevices to the last USB configuration and runs usbmuxd -ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", OWNER="usbmux", RUN+="@prefix@/sbin/usbmuxd -u -U usbmux" - -# Exit usbmuxd when the last device is removed -ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ENV{INTERFACE}=="255/*", RUN+="@prefix@/sbin/usbmuxd -x" -- cgit v1.1-32-gdbae