Android 出现在 adb 设备上的设备序列号

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3083009/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:38:06  来源:igfitidea点击:

Serial number of device that presented upon adb devices

android

提问by ilana

Iam using a command: adb devices

我正在使用命令:adb devices

and get this: C:>adb devices List of devices attached HT9CTP820385 device

并得到这个:C:>adb devices 附加设备列表 HT9CTP820385 设备

My question is: where this serial number comes from? Does it burned on flash of device one time during a manufectoring or adb drivers assignes it dynamically or it comes with release that is burned on device?

我的问题是:这个序列号从何而来?它是在制造过程中在设备闪存上烧过一次,还是 adb 驱动程序动态分配它,或者随附在设备上烧录的版本?

回答by kingarold

On the samsung g2 this number is written in /sys/class/android_usb/f_accessory/device/iSerial. It can be retrieved by executing adb get-serialno.

在三星 g2 上,这个数字写在/sys/class/android_usb/f_accessory/device/iSerial. 可以通过执行来检索它adb get-serialno

回答by zed_0xff

I got the same number (as the adb gives me) printed under battery inside my device. So, I guess, it's one-time burned on flash of device.

我在设备内的电池下打印了相同的数字(如 adb 给我的)。所以,我想,它是在设备闪存上一次性烧毁的。

However, I cannot guarantee that it cannot be overwritten by the same process as flashing new firmware/bootloader/radio.

但是,我不能保证它不会被与刷新新固件/引导加载程序/无线电相同的过程覆盖。

回答by Moncader

It's the device number deeply embedded in to the device itself. Every single device that connects to a computer (practically) has one of these (In one form or another). It has nothing to do with drivers.

它是深深嵌入设备本身的设备编号。连接到计算机的每个设备(实际上)都有其中一个(以一种或另一种形式)。跟司机没关系。

回答by scottt

Perhaps a bit off-topic, but useful to know:

也许有点偏离主题,但了解一下很有用:

For all of the devices I tested, the value returned by Build.SERIAL(in android.os.Build) returns the same as that returned by ADB DEVICES.

对于我测试的所有设备,Build.SERIAL(in android.os.Build) 返回的值与ADB DEVICES.

It probably won't be true for all manufacturers, but is worth checking on your test devices.

可能并非所有制造商都如此,但值得检查您的测试设备。

回答by Ashutosh

It an old question but might help someone so sharing my answer.

这是一个老问题,但可能会帮助某人分享我的答案。

Go to -> settings-> About -> status

转到 -> 设置 -> 关于 -> 状态

There you will find "Serial Number" which is displayed when you run "adb devices".

在那里您会找到运行“adb devices”时显示的“序列号”。

Hope it help.

希望有帮助。