How to Add Udev Rules for USB Debugging in Linux: Difference between revisions

From wizarPOS
No edit summary
(Replaced content with "{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/usb-serial-port/add-linux-udev-rules}}")
Tag: Replaced
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
In Linux, when connecting devices for debugging, an error message is displayed:
{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/usb-serial-port/add-linux-udev-rules}}
  insufficient permissions for device: user in plugdev group; are your udev rules wrong?
Or the reply from ADB logcat is always waiting. Even if the terminal is connected, the reply from ADB device is to give permission error.
  $ adb logcat
  - waiting for device -
  ^C
  $ adb devices
  List of devices attached
  ???????????? no permissions
 
The solution is to find the bus and device ID assigned by the kernel:
  $ lsusb
  Bus 001 Device 041: ID 05c6:9025 Qualcomm, Inc. Qualcomm HSUSB Device
 
Add a udev rules file that contains the USB configuration for each device type you want to develop. In the rules file, each device manufacturer is identified by a unique vendor ID specified by the ATTR{ID vendor} attribute. Set device detection on Ubuntu Linux as follows:
  Log in as root and create this file: /etc/udev/rules.d/51-android.rules, or vim /etc/udev/rules.d/51-android.rules
  Use this format to add each vendor to the file:
  SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9025" MODE="0666"
In this case, the vendor ID is Qualcomm's. Mode assignment specifies read/write permissions. A GROUP defines which UNIX group owns the device node.
 
Now execute:
  $ chmod a+r /etc/udev/rules.d/51-android.rules
 
  $ adb kill-server
Connect successfully:
  $ adb devices
  List of devices attached
  WP17451Q20003163 device
 
Please refer to https://developer.android.com/studio/run/device.html#developer-device-options

Latest revision as of 08:24, 7 April 2024

Please visit new link of same subject:

https://smartpossdk.gitbook.io/cloudpossdk/faq/usb-serial-port/add-linux-udev-rules

We're making a move! Our site's content is migrating to a new URL, to provide you with an enhanced browsing experience. Please update your bookmarks accordingly. Thank you for your continuous support!