Additional emulator configurations
Sometimes, what we need to test is outside the reach of the options that can be set when the AVD is created or configured.
One of the cases could be the need to test our application under different locales. Let's say we want to test our application on a Japanese phone—an emulator, with the language and country set to Japanese and Japan respectively.
We have the ability to pass these properties in the emulator command line. The -prop
command line option allows us to set any of the properties we could set:
$ emulator -avd testdevice -no-window -no-audio -no-boot-anim -port 5580 -prop persist.sys.language=ja -prop persist.sys.country=JP
To verify that our settings were successful, we can use the getprop
command to verify them, for example:
$ adb –s emulator-5580 shell "getprop persist.sys.language" ja $ adb –s emulator-5580 shell "getprop persist.sys.country" JP
If you want to clear all the user data after playing with the persistent settings, you can use...