VID: Vendor ID
PID: Product ID
查看VID和PID:
device链接Ubuntu,终端下输入lsusb
yin123@yin:~$ lsusb Bus 001 Device 005: ID 04d9:1605 Holtek Semiconductor, Inc. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 8087:8000 Intel Corp. Bus 001 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse Bus 001 Device 008: ID 8087:1234 Intel Corp.
显示所有链接的USB设备,冒号前后分别对应VID和PID
修改VID和PID的代码对应于:
android/device/intel/yyy/init.zzz.usb.rc文件
yyy为对应平台
其中
# 0x8087:0x0928 : ADB plus 3xCDC plus MTP # --------------------------------------- on property:sys.usb.config=mtp,adb write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 8087 write /sys/class/android_usb/android0/idProduct 1234 write /sys/class/android_usb/android0/functions mtp,adb,acm write /sys/class/android_usb/f_acm/instances 3 write /sys/class/android_usb/android0/enable 1 start adbd setprop sys.usb.state ${sys.usb.config}
idVendor和idProduct分别对应VID和PID,原来这里的idProduct为0928,现在被我该成1234,测试OK。