1

I am currently using this command adb shell "service call iphonesubinfo 1" to get IMEI number, but it only returns 1st one.

Does anyone know how I can get the 2nd IMEI number?

2

Which code to use with service call depends on Android release. On Android 9 IPhoneSubInfo method 1 returns first IMEI while methods 3 and 4 return both IMEIs:

~$ service call iphonesubinfo 3 i32 1 | grep -oE '[0-9a-f]{8} ' | while read hex; do echo -ne "\u${hex:4:4}\u${hex:0:4}"; done; echo
~$ service call iphonesubinfo 3 i32 2 | grep -oE '[0-9a-f]{8} ' | while read hex; do echo -ne "\u${hex:4:4}\u${hex:0:4}"; done; echo

Related: How to check IMSI/ICCID on MIUI10?

  • 1
    thanks for the help. it works perfectly... – Muhammad Yahya Dec 2 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.