android - ADB上生成Android ID的方法是什么

标签 android encryption adb android-debug code-documentation

当我使用以下命令通过 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/

相关文章:

android - 如何通过集成数据绑定(bind) android 来更改我现有的代码

java - 在java中加密泛型类型

java - 在 .properties 文件中加密值之前是否需要 ENC 函数?

android - React Native adb 反向 ENOENT

android - Facebook android API 函数 executeGraphPathRequestAsync 未给出预期结果

Android抽屉导航透明

android - 如何将 View 动态添加到已在 xml 布局中声明的 RelativeLayout?

mysql - 使用 MySQL 中的加密 blob 字段匹配一行中的所有关键字

android - android "nexus 7"2013 的哪个版本的 adb 接口(interface)

android - 从 adb 获取包的可启动 Activity 名称