我知道唯一适用于其他版本的命令是“adb shell dumpsys iphonesubinfo”,但它似乎不适用于Android 5.0.
解决方法:
要获取TelephonyManager.getdeviceid(),您可以执行以下 *** 作:
adb shell service call iphonesubinfo 1
如果您在解析服务调用输出时遇到问题,请查看https://gist.github.com/ktnr74/60ac7bcc2cd17b43f2cb
或者您可以使用此windows单行程序在设备端执行此 *** 作:
adb shell "service call iphonesubinfo 1 | grep -o '[0-9a-f]\{8\} ' | tail -n+3 | while read a; do echo -n \u${a:4:4}\u${a:0:4}; done"
或者在linux中:
adb shell 'service call iphonesubinfo 1 | grep -o "[0-9a-f]\{8\} " | tail -n+3 | while read a; do echo -n "\u${a:4:4}\u${a:0:4}"; done'
总结 以上是内存溢出为你收集整理的如何在Android 5.0上使用adb命令获取MEID和IMEI信息?全部内容,希望文章能够帮你解决如何在Android 5.0上使用adb命令获取MEID和IMEI信息?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)