Is there a way to change the IMEI that will be returned by the emulator's TelephonyManager
? Also, is there a way to change the ID returned by Settings.Secure.ANDROID_ID
?
I use these IDs to distinguish my users from one another when storing their data on the server side. It would be nice if my QA team could change these IDs so that they are not all using the same set of user data.
As far as Settings.Secure.ANDROID_ID
goes, this should do the trick:
adb shell sqlite3 /data/data/com.android.providers.settings/databases/settings.db "UPDATE secure SET value='newid' WHERE name='android_id'
"
Where newid
is usually the 16 hex digit code (i.e. don't append "Android_" to it).
I only tried this on the emulator. I imagine a real phone would need to be rooted first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With