当我使用以下命令通过 USB 将设备连接到 Android 调试桥 (ADB) 时:
> adb device
然后我得到以下(加密的)16 个字符:
df23582e162esfd2 device
这些字符是什么?它们是由 Windows 还是 ADB 生成的?这些字符是否临时存储或显示在其他地方?
最佳答案
它根本没有加密。查看Settings.Secure#ANDROID_ID如果您想了解有关 Android ID 的更多信息,唯一的 64 位设备标识符通常以十六进制字符串形式呈现。 (任何开发人员都必须阅读 wikipedia article on UUIDs,因为,你知道,这些东西都有标准,我们都应该使用它们)
在 Android 应用程序中检索它的代码:
import android.provider.Settings.Secure;
private String android_id = Secure.getString(getContext().getContentResolver(),
Secure.ANDROID_ID);
关于android - ADB上生成Android ID的方法是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28680767/