6

Hitherto, I've been setting the locale with the 'persist' properties, but on the Android 8 emulator, I get this:

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'

I tried setting the ro. locale-related properties, but surprisingly enough they're still 'ro'.

Does anyone know the new way for Android 8?

2
  • I'm getting the same - it won't let me set it when I call ./emulator either. Did you have any luck in the end? I'll let you know if I find a solution. Aug 17, 2017 at 11:01
  • 1
    @OwenNiblock I'm afraid we ended up adding a Calabash backdoor into the application under test, which resets the locale in the app and then forces the activity to refresh. In another app we currently test with Appium, we added a broadcast receiver to much the same effect. Sep 7, 2017 at 9:28

1 Answer 1

8

Just call adb root before. Then you can change the locale by using the following command as you may have tried before:

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

This even works with emulators (like Android TV x86 emulator) that only comes bundled with English from the settings:

Android TV x86 emulator Language options

Android TV x86 emulator in fr-CA locale

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.