Android 8 - 如何通过 ADB 设置模拟器语言环境?

标签 android adb locale android-8.0-oreo

到目前为止,我一直在使用“持久”属性设置语言环境,但在 Android 8 模拟器上,我得到了这个:

setprop: failed to set property 'persist.sys.language' to 'en'
setprop: failed to set property 'persist.sys.country' to 'GB'
setprop: failed to set property 'ctl.restart' to 'zygote'

我尝试设置 ro。与语言环境相关的属性,但令人惊讶的是它们仍然是“ro”。

有人知道 Android 8 的新方法吗?

最佳答案

之前调用adb root即可。然后您可以像以前尝试过的那样使用以下命令更改语言环境:

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

这甚至适用于仅与设置中的英语 bundle 在一起的模拟器(如 Android TV x86 模拟器):

Android TV x86 emulator Language options

Android TV x86 emulator in fr-CA locale

关于Android 8 - 如何通过 ADB 设置模拟器语言环境?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44943433/

相关文章:

java - Spring 3.0 本地化在 tomcat 中不起作用,只能从本地的 jetty

android - Vertical Recyclerview 只允许向下滚动但阻止向上滚动

Android禁用Scrollview结束动画

android - 设置 calendar.DAY_OF_MONTH 时出现问题

android - 当另一个 Activity 通过通知从锁定屏幕启动时,不会调用当前 Activity onResume()

android - 执行 chmod 时 ADB Shell 给出错误模式(在 su 下)

android - Volley 的详细调试日志

在 C 中检查语言环境

Android Studio 无法访问 ADB 服务器

ios - 如何解决计算中使用区域设置小数点/逗号的 iOS 错误? (与 NumberFormatter)