Is there an android adb shell command that I could get the IMEI2 & EID?

663 Views Asked by At

I've a Android Pixel 7 Pro and I can view the IMEI1, IMEI2, EID via the phone dialer *#06#

From other stackoverflow post that I can see there's a adb shell script to capture the IMEI1 from Android device, but unable to get the IMEI2 and EID

adb shell service call iphonesubinfo 1 s16 com.android.shell | cut -d "'" -f2| grep -Eo '[0-9]'| xargs| sed 's/\ //g'

Wondering is there an android adb shell command that I could get the IMEI2 & EID from Android phone?

IMEI1, IMEI2, EID

Tried search other stackoverflow post but can't find any other method that could get IMEI2 & EID

following only get the IMEI1 adb shell service call iphonesubinfo 1 s16 com.android.shell | cut -d "'" -f2| grep -Eo '[0-9]'| xargs| sed 's/\ //g'

1

There are 1 best solutions below

0
dougstar On

I don't really know what I'm doing, but I was trying to do the same thing today. I found some relevant methods in ITelephony.aidl: getImeiForSlot and getUiccSlotsInfo.

For android version 13, you can call them like: adb shell service call phone 146 i32 0 s16 com.android.shell | cut -d "'" -f2| grep -Eo '[0-9]'| xargs| sed 's/\ //g' for IMEI slot 0 (i.e. IMEI1) and adb shell service call phone 146 i32 1 s16 com.android.shell | cut -d "'" -f2| grep -Eo '[0-9]'| xargs| sed 's/\ //g' for IMEI slot 1 (i.e. IMEI2).

You can get the EID with adb shell service call phone 190 s16 com.android.shell | cut -d "'" -f2| grep -Eo '[0-9]'| xargs| sed 's/\ //g' That might not work in the case that you have multiple Uicc slots since the bash commands will jam the IDs together, but you should be able to edit the bash commands to get it to work.