id of a device?

Possible Duplicate:
Is there a unique Android device ID?

In the licensing documentation the android developers mention an easy way to more or less securely identify an android device. They are using android.Settings.Secure.ANDROID_ID.

They say they query the system settings for this. But they don't explain this any further.

How do I obtain the android_id and do I need special permissions for doing so?


It's all in the Javadoc, as linked to by this question you edited 30 minutes before this one! :)
Is there a unique Android device ID?

The "Secure" part just means that apps can't write to it, only read. I seem to recall that this device ID isn't always present; it's populated by the Market as required, perhaps.


adb shell sqlite3 /data/data/com.android.providers.settings/databases/settings.db "SELECT value FROM secure WHERE name='android_id'"

Android ID可以根植电话更改...插入一个Android ID:

adb shell sqlite3 /data/data/com.android.providers.settings/databases/settings.db "UPDATE secure SET value='IDHERE' WHERE name='android_id'"
链接地址: http://www.djcxy.com/p/24636.html

上一篇: 特定的序列号

下一篇: 设备的ID?