title: Changing the Android emulator locale automatically
body: <p>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.<br>
  This works fine, except for the language part.</p>
  
  <p>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:</p>
  
  <ul>
  <li>Extracting/editing/repacking a QEMU image directly before starting the emulator</li>
  <li>Running some sort of system-locale-changing APK on the emulator after startup</li>
  <li>Changing the locale settings on the emulator filesystem after startup</li>
  <li>Changing the locale settings in some SQLite DB on the emulator after startup</li>
  <li>Running a key sequence (via the emulator's telnet interface) that would open the settings app and change the locale</li>
  <li><em>Manually</em> starting the emulator for each platform version, changing the locale by hand in the settings, saving it and archiving the images for later deployment</li>
  </ul>
  
  <p>Any ideas whether this can be done, either via the above methods or otherwise?</p>
  
  <p>Do you know where locale settings are persisted to/read from by the system?</p>
  
  <hr>
  
  <p><strong>Solution:</strong><br>
  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 than all the ideas above!</p>
  
  <p>I have updated his answer below with the details.</p>