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

后端 未结 8 942
爱一瞬间的悲伤
爱一瞬间的悲伤 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:31

    For ESN you can do

    service call iphonesubinfo 16

    at least it gives me the right one on Motorola Photon Q.

    To clean it up (assuming you have shell on the device and have a capable busybox there, if not I highly recommend one):

        service call iphonesubinfo 16 | busybox awk -F "'" '{print $2}' | busybox sed 's/[^0-9A-F]*//g' | busybox tr -d '\n' && echo
    

    For MEID with cleanup:

    service call iphonesubinfo 1 | busybox awk -F "'" '{print $2}' | busybox sed 's/[^0-9A-F]*//g' | busybox tr -d '\n' && echo
    

提交回复
热议问题