Android: getDeviceId() returns an IMEI, adb shell dumpsys iphonesubinfo returns Device ID=NULL

匿名 (未验证) 提交于 2019-12-03 10:24:21

问题:

Different results for my low cost chinese tablet. It's not a phone so why getDeviceId() returns a number that seems to be a valid IMEI?

C:\>adb shell dumpsys iphonesubinfo Phone Subscriber Info:   Phone Type = GSM   Device ID = null 

but using

TelephonyManager tManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String uid = tManager.getDeviceId(); 

uid = 35881700... (I'm not showing the whole IMEI number for privacy)

回答1:

Is there any kind of GSM radio in your tablet? (Sorry for posting an answer, but I am not allowed to post comments ..)

According GSMPhone.java in the android version that I am looking at, the IMEI is set when the radio used by the device becomes initialized.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!