How to change language of device using commandLine
Changing
language in Android device on-the fly is needed when we are running or
executing automation script in various languages.
To
achieve language change of Android device, we have two ways:
You can watch a Youtube video OR follow the step by step procedure below
You can watch a Youtube video OR follow the step by step procedure below
Below
command can be run from command line , to change the language of device.
adb shell "setprop persist.sys.language fr; setprop persist.sys.country CA;
setprop ctl.restart zygote"
** But
this procedure is having one issue, your phone should be ROOTED to make adb command into effect.
2> Using ADB Change
Language APP installed on your device (link)
Steps:
- Install this APP on to your device.
- Setup adb connection to your device (How to do - follow Link )
- Android OS 4.2 onwards (tip: you can copy the command here and paste it to your command console):
- Install this APP on to your device.
- Setup adb connection to your device (How to do - follow Link )
- Android OS 4.2 onwards (tip: you can copy the command here and paste it to your command console):
adb shell pm grant net.sanapeli.adbchangelanguage
android.permission.CHANGE_CONFIGURATION
- Language change example 1, Brazilian Portuguese:
adb shell am start -n
net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language pt-rBR
- Language change example 2, Canadien French:
adb shell am start -n
net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language fr -e country CA
To make your work easy , create a .bat file
@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@ Create
.bat file @@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@
You
can put the change language command in .bat file and can trigger it from your
code.
Create
a .bat file lets say : "changelang.bat" and paste below 3 line
and save it.
cd
/D
adb shell am start -n
net.sanapeli.adbchangelanguage/.AdbChangeLanguage -e language %1
exit
That's it.
That's it.
hi i followed the above steps trying to change the interface language to Korean but im get the following error. can you help?
ReplyDeleteBad argument: java.lang.IllegalArgumentException: Unknown package: net.sanapelli.adbchangelanguage
Hi Anu ,
DeleteHope this is solved as of now, if it still persist ,can you please explain me what you have done.
Thanks!!