Very simple, doesn’t do anything to complicated, just checks for null being returned. So how can we get this to not return null in an emulator? Easy — just a simple sqlite3 insert command!
Open a shell to your emulator, and navigate to /data/data/com.android.providers.settings/databases/, open up the db in sqlite3 and insert a value using ‘androidid’ as the key, like the following;
# cd /data/data/com.android.providers.settings/databases
# sqlite3 settings.db
SQLite version 3.6.22
Enter “.help” for instructions
Enter SQL statements terminated with a “;”
sqlite> insert into secure (’name’, ‘value’ ) values (’android_id’,'deadbeef4badcafe’);
sqlite> .exit
That’s all you need to do. Now all programs that use that method for detecting if it is an emulator will be returned the value you’ve entered as the Android_id.