Is there an android shell or adb command that I could use to get a device's IMEI/MEID?

后端 未结 8 891
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-03 02:44

Is there some adb or android shell command that I could run that would return a device\'s IMEI or MEID number? Preferably that\'s all that would be returned.

相关标签:
8条回答
  • 2020-12-03 03:32

    I figured out how to do this. You need to run adb shell dumpsys iphonesubinfo in a shell. It will give you a bit more than you need, but it will also return IMEI or MEID number.

    Edit (2017): In Android 5.0+ you'll need to use the service call command. More info about that can be found here.

    0 讨论(0)
  • 2020-12-03 03:33

    IMEI- adb shell service call iphonesubinfo 1 | awk -F "'" '{print $2}' | sed '1 d'| sed 's/.//g' | awk '{print}' ORS=''

    Android ID=

    adb shell settings get secure android_id

    0 讨论(0)
提交回复
热议问题