获取Android系统供应商ID动态供电设备 [英] Get Vendor ID of Android powered device dynamically
问题描述
我想通过我的code,以获得供应商ID
我的Android设备。
I want to get the Vendor ID
of my Android Device through my code.
我已阅读本: http://developer.android.com/tools/device.html ,但它并没有告诉你如何通过code找回它。
I have read this: http://developer.android.com/tools/device.html, but it does not tell you how to retrieve it through code.
我甚至在搜索 android.os.Build<属性>
但没有人给出了厂商ID
。
I have even searched in android.os.Build.<attributes>
but none of them gives the VendorID
.
任何一个可以告诉我吗?
Can any one tell me?
推荐答案
如果您正在运行Ubuntu / Linux上,只需输入端子 -v的lsusb
和preSS进入。
它会带出所有的USB设备的详细信息。
检查一个名为 idVendor
在结果现场,并找到你的设备。
If you are running Ubuntu/Linux just type in terminal lsusb -v
and press enter.
It will bring out details of all USB devices.
Check for a field called idVendor
in the results and find your device.
例如。我的摩托罗拉Defy(供应商ID = 22b8)给出:
E.g. my Motorola Defy (vendor id = 22b8) gives:
idVendor 0x22b8 Motorola PCS
这篇关于获取Android系统供应商ID动态供电设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!