如何获取使用adb devices打印的设备名称?
当我在
adb devices
控制台中键入内容时,它会打印以下内容:
List of devices attached
SH16BV815282 device
How do I programmatically get the SH16BV815282
, if it possible?
我想通过 android 应用程序在运行时获取该值。这个值实际存储在哪里?
When I type
adb devices
in the console, then it prints this:
List of devices attached
SH16BV815282 device
How do I programmatically get the SH16BV815282
, if it possible at all?
I want to get that value by android application at run time. Where this value is actually stored?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我正在使用打击代码来获取设备的名称。
GUIStatics.deviceModel = android.os.Build.MODEL;
I am using blow code for geting name of the device.
GUIStatics.deviceModel = android.os.Build.MODEL;
它是
Build.SERIAL
。但是,它仅适用于 Android 2.3+。It's
Build.SERIAL
. However, it's only available on Android 2.3+.