获取Android设备标识符从亚洲开发银行和Android SDK [英] Getting Android Device Identifier From ADB and Android SDK

查看:148
本文介绍了获取Android设备标识符从亚洲开发银行和Android SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找得到来自Android的亚洲开发银行和Android ADK本身就是一个独特的Andr​​oid设备标识符的​​最简单方法。

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

这篇关于获取Android设备标识符从亚洲开发银行和Android SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆