Changing the Android emulator locale automatically
Posted
by Christopher
on Stack Overflow
See other posts from Stack Overflow
or by Christopher
Published on 2010-03-10T14:04:28Z
Indexed on
2010/03/11
19:54 UTC
Read the original article
Hit count: 827
For automated testing (using Hudson) I have a script that generates a bunch of emulators for many combinations of Android OS version, screen resolution, screen density and language.
This works fine, except for the language part.
I need to find a way to change the Android system locale automatically. Here's some approaches I can think of, in order of preference:
- Extracting/editing/repacking a QEMU image directly before starting the emulator
- Running some sort of system-locale-changing APK on the emulator after startup
- Changing the locale settings on the emulator filesystem after startup
- Changing the locale settings in some SQLite DB on the emulator after startup
- Running a key sequence (via the emulator's telnet interface) that would open the settings app and change the locale
- Manually starting the emulator for each platform version, changing the locale by hand in the settings, saving it and archiving the images for later deployment
Any ideas whether this can be done, either via the above methods or otherwise?
Do you know where locale settings are persisted to/read from by the system?
Solution:
Thanks to dtmilano's info about the relevant properties, and some further investigation on my part, I came up with a solution even better and simpler simpler than all the ideas above!
I have updated the answer below with the details.
© Stack Overflow or respective owner