Google+ Followers

Tuesday, 25 February 2014

calabash-android: Start emulator , Set language/region/locale and quit using command line

  • Wipe emulator and start again
emulator -wipe-data -avd <avd-name>
TO create avd check here - http://www.mobiletestworld.com/2014/02/fast-android-emulator-haxm-or-genymotion.html

Check device is launched or wait

adb wait-for-device
echo "device ready now"
  • set country to germany - de and locale to german- de and restart emulator (this command also works on rooted devices)
adb shell 'setprop persist.sys.language de; setprop persist.sys.country de; stop; sleep 5; start'
  • Wait until device is ready
adb wait-for-device
echo "device ready now"
  • Run all commands at once
emulator -wipe-data -avd Android-4.2 &
adb wait-for-device;echo "device ready now";sleep 10
adb shell 'setprop persist.sys.language de; setprop persist.sys.country de; stop; sleep 5; start'
adb wait-for-device;echo "device ready now";sleep 20


No comments:

Post a Comment