Change Device language via ADB

前端 未结 11 2364
温柔的废话
温柔的废话 2020-11-28 12:16

I want to change language via ADB. I try:

adb shell setprop persist.sys.language fr;setprop persist.sys.country CA;stop;sleep 5;start

but I

11条回答
  •  猫巷女王i
    2020-11-28 12:51

    Your errors have nothing to do with adb. You just lack understanding of how your local shell processes your command. What you are doing is running these commands locally (on your PC):

    adb shell setprop persist.sys.language fr
    setprop persist.sys.country CA
    stop
    sleep 5
    start
    

    and the error messages you see are from local shell (i.e. there is no setprop executable on your system and start and stop commands have non-optional parameters.

    the correct command would be

    adb shell "setprop persist.sys.language fr; setprop persist.sys.country CA; setprop ctl.restart zygote"
    

    or in more recent Android versions:

    adb shell "setprop persist.sys.locale fr-CA; setprop ctl.restart zygote"
    

提交回复
热议问题