通过 ADB 更改设备语言 [英] Change Device language via ADB

查看:28
本文介绍了通过 ADB 更改设备语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过 ADB 更改语言.我试试:

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

但我收到错误:

setprop: command not found
stop: missing job name
Try `stop --help' for more information.
start: missing job name
Try `start --help' for more information.

怎么了?我想在物理设备上执行此操作

what is wrong? I want to do this on physical device

推荐答案

您的错误与 adb 无关.您只是不了解本地 shell 如何处理您的命令.您正在做的是在本地(在您的 PC 上)运行这些命令:

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

并且您看到的错误消息来自本地 shell(即您的系统上没有 setprop 可执行文件,并且 startstop 命令有非可选参数.

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.

正确的命令是

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

或在更新的 Android 版本中:

or in more recent Android versions:

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

这篇关于通过 ADB 更改设备语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆