Why does the emulator give IMEI number 000000000000000

I found a lot of posts about this, but did not receive a proper response. My application needs an IMEI number, I did it, but it shows 000000000000000 (15 zero). It works great with the device, but I want it to work correctly on my emulator. I need a unique number besides these zeros. if any software solution is here. Put your answer. I have to set this number instead of (15 zeros) "352373051009616"

TelephonyManager telephonyManager = (TelephonyManager) getSystemService (Context.TELEPHONY_SERVICE);

String imei = telephonyManager.getDeviceId ();

textDeviceID2.setText ("Device ID: -" + imei);

any possible solution (both with software and hard code)

+6
source share
2 answers

What the emulator uses as IMEI. If you really need or want to change it, you can open the emulator executable with a hex editor and change it as http://codepainters.wordpress.com/2009/12/11/android-imei-number-and-the-emulator /

+1
source

Hope this helps you. You can edit the IMEI number of your emulator, and the instructions there are very clear.

+1
source

Source: https://habr.com/ru/post/919548/


All Articles