Android设备ID的困惑 [英] android device id confusion

查看:145
本文介绍了Android设备ID的困惑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我拨 <大骨节病> * <大骨节病># <大骨节病> * <大骨节病># <大骨节病> 8 <大骨节病> 2 <大骨节病> 5 <大骨节病> 5 <大骨节病># <大骨节病> * <大骨节病># <大骨节病> * ,我让我的Andr​​oid设备ID,它与启动机器人 - 35c2acdd ...

If I dial * # * # 8 2 5 5 # * # * , I get my android device id which starts with android-35c2acdd...

来源

如果我用 Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID)的结果开始的 a96b4b27。 ..

If I use Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID) the result starts with a96b4b27...

如果我用((TelephonyManager)Context.getSystemService(Context.TELEPHONY_SERVICE))。getDeviceId()的结果开始的 3538330 ...

If I use ((TelephonyManager) Context.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId() the result starts with 3538330...

这些ID-S之间的区别是什么?我怎样才能得到的结果。

What is the difference between these ID-s? How can I get the result of the

<大骨节病> * <大骨节病># <大骨节病> * <大骨节病># <大骨节病> 8 <大骨节病> 2 <大骨节病> 5 <大骨节病> 5 <大骨节病># <大骨节病> * <大骨节病># <大骨节病> *  拨号?

* # * # 8 2 5 5 # * # * dial?

推荐答案

IMEI

该IMEI是 MAC 的电话模块 - 当它通过连接电话使用的唯一的ID GSM / GPRS / HSPDA /等。 GSM网络使用它来路由呼叫和数据从手机通过GSM网络,一直到网关到因特网(这是一个IP网络)。

The IMEI is the 'MAC' for the telephony module - the unique ID that the telephone uses when it connects via GSM/GPRS/HSPDA/etc. The GSM network uses it to route calls and data from the phone over the GSM network right up to the gateway into the Internet (which is an IP network).

一个电话模块是芯片或电路板处理该电话网络,GSM或者CMDA,而且往往有一个插槽,用于可移动SIM卡。有些手机有一个以上的电话模块(有源双或多卡手机)。每个电话模块都有自己的IMEI。

A telephony module is a chip or circuit board that handles the telephone network, either GSM or CMDA, and often has a slot for a removable SIM card. Some phones have more than one telephony module (active dual- or multi-SIM phones). Each telephony module has its own IMEI.

厂家给每部手机(严格的电话模块)一个唯一的IMEI在制造过程中。然而,数量通常可以重写,如果你有合适的软件。这通常是经过电话被盗给手机一个新的身份和bipass被盗手机阻塞的系统。

Manufacturers give each phone (strictly the telephony module) a unique IMEI during manufacturing. However the number can normally be rewritten if you have the right software. This is often done after a phone has been stolen to give the phone a new identity and bipass stolen phone blocking system.

该IMEI可以用编程方式获得的<一个href="http://developer.android.com/reference/android/telephony/TelephonyManager.html#getDeviceId%28%29">TelephonyManager.getDeviceId() API。

The IMEI can be programmatically obtained using the TelephonyManager.getDeviceId() API.

CDMA手机有一个ESN或MEID 这是的不同的长度和格式,尽管它是使用相同的API检索

CDMA phones have a ESN or MEID which are different lengths and formats, even though it is retrieved using the same API.

Android设备没有电话模块 - 例如,许多平板电脑和电视设备 - 的没有一个IMEI 的。由于 Schlangi 的评论,没有电话模块一些设备的的IMEI号码,所以一个IMEI的presence并不(总是)保证该设备具有电话模块。

Android devices without telephony modules - for example many tablets and TV devices - do not have an IMEI. As Schlangi commented, some devices that do not have a telephony module fake the IMEI, so the presence of an IMEI does not (always) guarantee the device has a telephony module.

ANDROID_ID

该ANDROID_ID是在手机上的其他唯一的数字 - 由操作系统作为它启动的第一次,这是自动生成的(做这种方式使得它的的去除步骤更容易为厂家从生产线)。

The ANDROID_ID is another unique number on the phone - this is automatically generated by the OS as it boots for the first time (doing it this way makes it much easier for the manufacturers by removing a step from the production line).

在ANDROID_ID可以(和做)的变化,例如:

The ANDROID_ID can (and does) change, for example:

  • 在恢复出厂设置(包括重刷OS时)
  • 在软件:如<一href="https://play.google.com/store/apps/details?id=com.vcastroi.changeid">https://play.google.com/store/apps/details?id=com.vcastroi.changeid

主要用于开发人员(如识别和连接设备上使用亚洲开发银行

It is mainly used by developers (eg identifying and connecting to devices using adb)

ANDROID_ID可用于识别给定以上的告诫,现实地意味着它唯一地标识该设备在设备寿命的显著部Android设备,但不能依靠

ANDROID_ID can be used to identify an Android device given the caveats above, realistically meaning that it uniquely identifies the device over significant portions of the device lifetime, but cannot be relied on.

另外注意的是Froyo的一个错误,许多设备给自己的的一样的ANDROID_ID。这是错误

Also note that there was a bug in Froyo where many devices gave themselves the same ANDROID_ID. This is the bug

其他标识符<​​/ STRONG>

Other identifiers

有一些其他的事情,可用于识别设备:

There are a number of other things that can be used identify the device:

  • MAC的WiFi模块的地址:<一href="http://developer.android.com/reference/android/net/wifi/WifiManager.html#getConnectionInfo%28%29">WifiManager.getConnectionInfo() - > <一个href="http://developer.android.com/reference/android/net/wifi/WifiInfo.html#getMacAddress%28%29">WifiInfo.getMacAddress().这可以经常在软件被改变,但一般的是恒定的器件寿命。此外,如果WiFi模块开启它只能被读取。
  • MAC蓝牙模块的地址:<一href="http://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#getAddress%28%29">BluetoothAdaptor.getAddress().像无线MAC,这通常可以在软件的改变,可能会关闭,当你需要它
  • 的用户的电话号码。如果用户请求一个新的号码从电信公司,或者如果用户切换的SIM这可能会改变。它是从<一个获得的href="http://developer.android.com/reference/android/telephony/TelephonyManager.html#getLine1Number%28%29">TelephonyManager.getLine1Number().这仅仅是present的Andr​​oid手机设备与当前的SIM卡安装和付费服务,电信公司。
  • 在SIM卡包含自己的识别号( IMSI )。这是从<一个获得href="https://developer.android.com/reference/android/telephony/TelephonyManager.html#getSubscriberId%28%29">TelephonyManager.getSubscriberId() API。显然,SIM卡可能不是present在任何特定的时间,当SIM卡被改变它改变 - 而且用户可以升级/更换自己的SIM同时保持相同的号码,所以你不能说这是一对 - 酮以一个特定的电话或用户。
  • 相关的IMSI是 MSISDN 。该功能可作为一个的订阅的(您的合同与移动服务提供商特定的电话号码),并因此给出了该装置的电话号码的识别。该MSISDN可以用几个SIM卡,因此一些手机相关联。它配备了所有的告诫读取SIM卡上面。这可以检索与<一href="http://developer.android.com/reference/android/telephony/TelephonyManager.html#getSimSerialNumber%28%29">TelephonyManager.getSimSerialNumber().感谢 Schlangi 的更正和补充
  • 姜饼,后来有<一个href="http://developer.android.com/reference/android/os/Build.html#SERIAL">android.os.Build.SERIAL许多制造商设置的(但不是全部。开溜)。
  • MAC address of the WiFi module: WifiManager.getConnectionInfo() -> WifiInfo.getMacAddress(). This can often be changed in software, but generally is constant over the device lifetime. Also it can only be read if the WiFi module is switched on.
  • MAC address of the BlueTooth module: BluetoothAdaptor.getAddress(). Like WiFi MAC, this can often be changed in software and may be off when you need it
  • The subscriber's telephone number. This may change if the user requests a new number from the telco, or if the user switches SIMs. It is obtained from TelephonyManager.getLine1Number(). This is only present for Android phone devices with a current SIM installed and a paid service with a telco.
  • The SIM contains its own identifying number (IMSI). This is obtained from the TelephonyManager.getSubscriberId() API. Obviously the SIM may not be present at any specific time, and it changes when the SIM is changed - and users can upgrade/replace their SIM while keeping the same number, so you can't say that this is one-to-one to a specific phone or user.
  • Related to the IMSI is the MSISDN. This functions as the identification of a subscription (your contract for a specific telephone number with your mobile provider) and therefore gives the device its telephone number. The MSISDN may be associated with several SIM cards, and therefore several phones. It comes with all the caveats for reading the SIM above. This may be retrieved with TelephonyManager.getSimSerialNumber(). Thanks Schlangi for the corrections and additions
  • Gingerbread and later has android.os.Build.SERIAL which many manufacturers set (but not all. Bugger).

其他笔记

您需要特定的权限来访问每个API,因此,如果您尝试所有这些,在谷歌Play商店中的应用程序的权限看起来相当宽容的。

You need specific permissions to access each and every API, so if you try for all of them, your app's permissions in the Google Play store look fairly permissive.

这篇关于Android设备ID的困惑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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