Konubinix' opinionated web of thoughts

Udev Rules to Plug New Android Device

Fleeting

udev rules to plug new android device

adb devices
List of devices attached
bbf2eeaa        no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]
dmesg
[24391.424318] usb 1-1: USB disconnect, device number 42
[24391.953494] usb 1-1: new high-speed USB device number 43 using xhci_hcd
[24395.829550] usb 1-1: new high-speed USB device number 44 using xhci_hcd
[24395.978587] usb 1-1: New USB device found, idVendor=19d2, idProduct=1351, bcdDevice=ff.ff
[24395.978591] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[24395.978592] usb 1-1: Product: Android

Create a udev rules file, let’s say: /etc/udev/rules.d/51-android.rules

SUBSYSTEM==“usb”, ATTR{idVendor}==“18d1”, ATTR{idProduct}==“d002”, MODE=“0660”, GROUP=“plugdev”, SYMLINK+=“android%n”

https://www.janosgyerik.com/adding-udev-rules-for-usb-debugging-android-devices/

cat<<EOF | sudo bash -c 'cat > /etc/udev/rules.d/51-android-zte-blade-s6.rules'
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", ATTR{idProduct}=="1351", MODE="0660",
GROUP="plugdev", SYMLINK+="android%n"
EOF

There is no need to reboot or whatever.

adb devices
List of devices attached
bbf2eeaa	device

Notes pointant ici