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.
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