获取Android设备标识符从亚洲开发银行和Android SDK
我找得到来自Android的亚洲开发银行和Android ADK本身就是一个独特的Android设备标识符的最简单方法。
I am looking for the easiest way to get a unique android device identifier from both the Android adb and the Android ADK itself.
例如,当我使用亚行'设备'的命令,我的连接设备的序列号被输出到屏幕上。我还没有确定在Android SDK中的方法,让我相同的序列号。
For example, when i use the adb 'devices' command, the serial number of my connected device is outputted to the screen. I have yet to identify a method in the Android sdk to get me the same serial number.
我不在乎唯一标识符,只是一些可以来自亚洲开发银行和Android SDK中轻松地检索。生根的设备将不再是一个选项。
I don't care what unique identifier is used, just something that can be easily retrieved from both the adb and android sdk. Rooting a device will not be an option.
您可能会想使用ANDROID_ID。
You would probably want to use ANDROID_ID.
这是如何通过亚行的shell查询它的值:
This is how you can query its value via adb shell:
settings get secure android_id
或者通过查询设置内容提供商:
Or by querying the settings content provider:
content query --uri content://settings/secure/android_id --projection value