Change Device language via ADB

前端 未结 11 2344
温柔的废话
温柔的废话 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条回答
  •  春和景丽
    2020-11-28 12:37

    This is all over the place, to put it simply

    setprop will only work on an AVD or a rooted physical device

    The alternative is to use the settings in the Launcher.

    Rooted device or AVD this works:

    /platform-tools/adb shell
    root@generic:/ # getprop persist.sys.language
    getprop persist.sys.language
    en
    root@generic:/ # setprop persist.sys.language fr
    setprop persist.sys.language fr
    root@generic:/ # setprop persist.sys.country CA
    setprop persist.sys.country CA
    root@generic:/ # stop
    stop
    root@generic:/ # start
    start
    root@generic:/ # sleep 5
    sleep 5
    root@generic:/ # getprop |grep lang
    getprop |grep lang
    [persist.sys.language]: [fr]
    root@generic:/ # getprop |grep country
    getprop |grep country
    [persist.sys.country]: [CA]
    root@generic:/ #
    

提交回复
热议问题