/lib/udev/rules.d/10-blackberry.rules is in barry-util 0.18.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | #
# Blackberry devices
#
# Note: the following rules may appear wasteful, in that bcharge is run
# twice: once for changing the mode, and once again after the
# device resets itself to enter this mode. This is required
# in order to support older kernels (approx. 2.6.20 to 2.6.22) with
# CONFIG_USB_SUSPEND enabled. The second time bcharge is run
# is when the -p argument comes into play, adjusting the device's
# autosuspend settings.
#
# Note: SUBSYSTEM=="usb_device" is not reliably available on all kernels
# and all versions of udev, so instead we use the very first
# kernel message of: SUBSYSTEM=="usb", ENV{DEVTYPE}="usb_device"
# (See the output of 'udevadm monitor --kernel')
# Since the device is likely not created at this point, we
# can't set permissions... so permissions are handled in the
# generic 99-blackberry-perms.rules file.
#
#
# Older devices that only use 0x0001 (no USB Mass Storage)
#
# Classic device, no Dual mode, only autosuspend adjustment
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
ATTR{idVendor}=="0fca", ATTR{idProduct}=="0001", \
RUN="/usr/sbin/bcharge -p %p"
#
# Newer devices with USB Mass Storage:
# 0x8007 usually get transformed into 0x8004
# 0x8004 sometimes get transformed into 0x0004
# 0x0006 usually get transformed into 0x0004
#
# Pearl 0x0006 classic, force a change into 0x0004
# No need to fiddle with autosuspend here, since a reset is
# nearly guaranteed
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
ATTR{idVendor}=="0fca", ATTR{idProduct}=="0006", \
RUN="/usr/sbin/bcharge -d"
# Storm 9530, ask bcharge to guess best setting
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
ATTR{idVendor}=="0fca", ATTR{idProduct}=="8007", \
RUN="/usr/sbin/bcharge -g -p %p"
# Pearl 8120 and Storm 9550, ask bcharge to guess best setting
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
ATTR{idVendor}=="0fca", ATTR{idProduct}=="8004", \
RUN="/usr/sbin/bcharge -g -p %p"
# Pearl Flip... bcharge guesses
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
ATTR{idVendor}=="0fca", ATTR{idProduct}=="8001", \
RUN="/usr/sbin/bcharge -g -p %p"
# Pearl Dual mode already, so just adjust autosuspend
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
ATTR{idVendor}=="0fca", ATTR{idProduct}=="0004", \
RUN="/usr/sbin/bcharge -p %p"
|