As malware might try to detect if it runs in an emulated environment it might check for a valid IMSI, IMEI, SIM serial, and/or AndroidId. In order to make your emulated environment as realistic as possible it is possible to set a IMSI, IMEI, SIM serial, and/or AndroidId to your emulator.
config.ini file you might set the following:
hw.gsmModem.imei=123456789012345http://source.android.com) and the patch file (emulator_imsi_patch.patch).
It is assumed that the Android source code is placed in "~/android-2.3".
% cd ~/android-2.3/
% . build/envsetup.sh
% lunch 1
% cd external/qemu
% patch -p0 < ~/emulator_imsi_patch.patch
% cd ~/android-2.3
% make emulator
From the adb shell do the following:
% cd /data/data/com.android.providers.settings/databases/
% sqlite3 settings.db
sqlite> select * from secure where name='android_id'; // Check for existing entry
sqlite> insert into secure (’name’, ‘value’ ) values (’android_id’,'device_id_goes_here’);
Please remark that the database might also be on a different location depending on your Android version.