Android设备ID(不IMEI) [英] android device ID (not IMEI)
问题描述
我用命令:ADB设备列出连接的设备。 在我的电脑,我得到: 设备名单附后 HT9CTP820988设备
I use the command: adb devices to list the attached devices. On my computer I get : List of devices attached HT9CTP820988 device
我的问题是:我怎么能得到这个ID(HT9CTP820988)编程
My question is: how can I get this id (HT9CTP820988) programmatically ?
推荐答案
你看到的 ADB设备
命令序列号是什么:
What you're seeing with the adb devices
command is the serial number:
序列号 - 通过创建一个字符串 亚行的唯一标识 通过模拟器/设备实例的 控制台端口号。的格式 序列号为 - 。 下面是一个例子编号: 模拟器-5554
Serial number — A string created by adb to uniquely identify an emulator/device instance by its console port number. The format of the serial number is -. Here's an example serial number: emulator-5554
(refererence: http://developer.android.com/guide/developing /tools/adb.html )
(refererence: http://developer.android.com/guide/developing/tools/adb.html)
当你问我怎么能得到这个ID编程究竟是什么意思?从一个Android应用程序或桌面应用程序?
When you ask "how can I get this id programmatically" what exactly do you mean? From an Android app or from a desktop app?
这篇关于Android设备ID(不IMEI)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!