简体   繁体   English

“ adb shell getproppersist.sys.country”返回空字符串

[英]“adb shell getprop persist.sys.country” returning empty string

I'm trying to get from the device (running android L) the country and the language with the following commands: 我正在尝试使用以下命令从设备(运行android L)获取国家和语言:

adb shell getprop persist.sys.country
adb shell getprop persist.sys.language

But both return a empty string. 但是两者都返回一个空字符串。

When I try another getprop command, like: 当我尝试另一个getprop命令时,例如:

adb shell getprop ro.product.model

It returns the correct value. 它返回正确的值。

Anyone knows what is happening? 有人知道发生了什么吗?

Found the solution: 找到了解决方案:

Android has changed this prop name in the last versions. Android在最新版本中更改了此prop名称。 You can use now: 您现在可以使用:

adb shell getprop ro.product.locale

or 要么

adb shell getprop persist.sys.locale

There are some other useful commands related to this question: 还有一些与此问题相关的有用命令:

adb shell getprop ro.csc.country_code  //e.g. [Germany] 
adb shell getprop ro.csc.countryiso_code //e.g. [DE]
adb shell getprop ro.csc.sales_code //e.g. [VD2]

It gives information about country and operator the Binary is dedicated to (if not modified of course). 它提供有关Binary的国家/地区和运营商的信息(当然,如果未进行修改)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM