shell获得第二个imei号

shell获得第二个imei号

本文介绍了通过adb shell获得第二个imei号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够使用命令

adb shell service call iphonesubinfo 1

但是设备有两个imei数字,

But device has two imei numbers ,

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

How to get second imei number through adb shell

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

The output of adb shell service call iphonesubinfo 1 is as below (which is inbetween quotes)

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=123456789098765

帮我找到第二个imei……

Help me to find second imei......

推荐答案

是的,您可以通过服务呼叫iphonesubinfo来获得IMEI.

Yes, you can get both IMEI with service call iphonesubinfo.

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

Though the order in which they are fetch is not always definite in my experience, but you can always fetch both and compare to one if you need to.

/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而不是从设备外壳运行,则可以用adb shell service替换/system/bin/service.

You can substitute /system/bin/service with adb shell service if you are running from adb and not from device shell.

这篇关于通过adb shell获得第二个imei号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 01:49