連接手機至虛擬機,可以識別
$ lsusb
Bus 001 Device 002: ID 05c6:90db Qualcomm, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
虛擬中安裝adb后,使用adb devices,能看到id,但提示用戶無權限
$ adb devices
List of devices attached
6c72c46d no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]
adb shell 指令不能用
$ adb shell
error: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
See [http://developer.android.com/tools/device.html] for more information
解決辦法:
1、在下面路徑創建規則文件
/etc/udev/rules.d/xxx.rules
2、規則文件中輸入以下內容
SUBSYSTEM=="usb", MODE="0660", GROUP="plugdev", SYMLINK+="android%n"
3、再次拔插手機即可