Code Painters The Art of Coding

20Nov/1055

Android emulator patch for configurable IMEI, IMSI and SIM card serial number

My post about hacking the emulator's IMEI number gained a lot of interest, hence I've decided to prepare a patch which makes IMEI, IMSI and SIM card serial configurable on a per-AVD basis. It's necessary to recompile the emulator with the patch applied, so setup your build environment as a first step. I suggest using Ubuntu 10.10 and following the Android compilation hints. Continue reading…

Tagged as: , 55 Comments
11Dec/0923

Android: IMEI number and the emulator

Update: Please see my latest post about this topic.

It is a common practice for mobile applications to identify the user by IMSI number (associated with the SIM card) or IMEI number (unique ID of the device). Of course, it is also possible on Android:

TelephonyManager manager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
String imei = manager.getDeviceId();
String imsi = manager.getSubscriberId();

This code works perfectly fine on a real device, however under emulator IMEI is always all-zero and it's not configurable. It quickly becomes awkward when debugging a network-enabled application which uses IMEI as a user ID. Continue reading…

Tagged as: , 23 Comments