通过adb shell获取第二个imei号码

时间:2016-02-06 05:49:11

标签: adb

我能通过命令

通过adb shell获得一个imei号码
adb shell service call iphonesubinfo 1

但设备有两个imei号码,

如何通过adb shell获取第二个imei号码

adb shell服务调用iphonesubinfo 1的输出如下(介于引号之间)

Result: 

Parcel(
0x00000000: 00000000 0000000f 00320031 00340033 '........1.2.3.4.'
0x00000010: 00360035 00380037 00300039 00380039 '5.6.7.8.9.0.9.8.'
0x00000020: 00360037 00000035                   '7.6.5... ') 

imei = 123456789098765

帮我找到第二个imei ......

1 个答案:

答案 0 :(得分:0)

是的,您可以同时通过服务电话iphonesubinfo获得IMEI。

尽管从我的经验来看,获取它们的顺序并不总是确定的,但是您可以始终获取它们并在需要时进行比较。

/system/bin/service call iphonesubinfo 3 i32 1 | cut -d\' -f2 | sed -e 's/[^0-9]//g' | tr -d '\n'


/system/bin/service call iphonesubinfo 3 i32 2 | cut -d\' -f2 | sed -e 's/[^0-9]//g' | tr -d '\n'

如果从adb而不是从设备外壳运行,则可以用/system/bin/service替换adb shell service