I'm trying to get the IMEI with this command "adb shell dumpsys iphonesubinfo" but is not working. Also I try this: adb shell service call iphonesubinfo 1 but neither
I did this too but still is not working
How can I resolve it?
I'm trying to get the IMEI with this command "adb shell dumpsys iphonesubinfo" but is not working. Also I try this: adb shell service call iphonesubinfo 1 but neither
I did this too but still is not working
How can I resolve it?
Use below method to get IMEI simply..
public String getIMEI(Context context){
String imei;
TelephonyManager mngr = (TelephonyManager)context.getSystemService(context.TELEPHONY_SERVICE);
imei = mngr.getDeviceId();
if(imei!=null)
return imei;
else
return "00";
}
Don't forget to get permission in manifest fine as line blew..
<uses-permission android:name="android.permission.READ_PHONE_STATE" />