Skip to content

Instantly share code, notes, and snippets.

@stonyw
Created September 7, 2015 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stonyw/144333d206825916f9c7 to your computer and use it in GitHub Desktop.
Save stonyw/144333d206825916f9c7 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "Illegal number of parameters: " $@ ". Use xx_XX format instead."
exit
fi
IFS="_" arr=($1)
IFS=" "
if [ ${#arr[@]} -ne 2 ]; then
echo "Illegal number of parameters: " $@ ". Use xx_XX format instead."
exit
fi
adb shell setprop persist.sys.language ${arr[0]}
adb shell setprop persist.sys.country ${arr[1]}
adb shell 'stop;sleep 5;start'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment