Search code examples
androidadbandroid-5.0-lollipop

"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:

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:

adb shell getprop ro.product.model

It returns the correct value.

Anyone knows what is happening?


Solution

  • Found the solution:

    Android has changed this prop name in the last versions. You can use now:

    adb shell getprop ro.product.locale
    

    or

    adb shell getprop persist.sys.locale