自Android 5.0 Lollipop以来,adb shell dumpsys iphonesubinfo不起作用 [英] adb shell dumpsys iphonesubinfo not working since Android 5.0 Lollipop
问题描述
我们以前使用以下命令获取设备ID / IMEI:
We used to get Device ID/IMEI using the following command:
adb shell dumpsys iphonesubinfo
但是自从上次Android更新(5.0-Lollilop)以来,此命令未返回任何内容,因此我在两个Nexus 4上均执行了此测试和Nexus 5。
But since last Android update (5.0 - Lollilop), this command doesn't return anything, I performed this test on both Nexus 4 and Nexus 5.
我知道我可以从代码中获取IMEI,该代码仍在运行,但是有人对ADB有解决方法吗?
I know I can get the IMEI from code, which is still working, but does anyone has a workaround for ADB ?
推荐答案
您始终可以只使用 service call
命令来调用服务方法。
You can always just use service call
command to call the service methods.
这是 android-5.0.0_r1
iphonesubinfo 服务的交易代码>:
here are the TRANSACTION CODES for the iphonesubinfo
service in android-5.0.0_r1
:
1 getDeviceId
2 getDeviceIdForSubscriber
3 getImeiForSubscriber
4 getDeviceSvn
5 getSubscriberId
6 getSubscriberIdForSubscriber
7 getGroupIdLevel1
8 getGroupIdLevel1ForSubscriber
9 getIccSerialNumber
10 getIccSerialNumberForSubscriber
11 getLine1Number
12 getLine1NumberForSubscriber
13 getLine1AlphaTag
14 getLine1AlphaTagForSubscriber
15 getMsisdn
16 getMsisdnForSubscriber
17 getVoiceMailNumber
18 getVoiceMailNumberForSubscriber
19 getCompleteVoiceMailNumber
20 getCompleteVoiceMailNumberForSubscriber
21 getVoiceMailAlphaTag
22 getVoiceMailAlphaTagForSubscriber
23 getIsimImpi
24 getIsimDomain
25 getIsimImpu
26 getIsimIst
27 getIsimPcscf
28 getIsimChallengeResponse
29 getIccSimChallengeResponse
大多数方法都需要 root
。但是幸运的是 getDeviceId
(您需要获取设备的IMEI / MEID的那个)不需要。
Most methods require root
. But fortunately getDeviceId
(the one you need to get device's IMEI/MEID) does not.
对于在设备端对服务调用
命令输出进行正确的解析,没有外部依赖性,请参阅我的在此处回答
For proper parsing of the service call
command output on the device side and without external dependencies see my answer here
也请阅读从ADB Shell调用Android服务以获取更多详细信息。
Also read Calling Android services from ADB shell for more details.
这篇关于自Android 5.0 Lollipop以来,adb shell dumpsys iphonesubinfo不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!