Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 8 - how to set the emulator locale via ADB?

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?

like image 470
android.weasel Avatar asked Jul 06 '17 08:07

android.weasel


1 Answers

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

like image 120
anthonymonori Avatar answered Sep 18 '22 10:09

anthonymonori