標籤:安卓
VID: Vendor ID
PID: Product ID
查看VID和PID:
device連結Ubuntu,終端下輸入lsusb
[email protected]:~$ lsusb Bus 001 Device 005: ID 04d9:1605 Holtek Semiconductor, Inc. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 001 Device 002: ID 8087:8000 Intel Corp. Bus 001 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical MouseBus 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。
修改android usb的VID PID