3

Till now we are using this approach How do I change the Mobile Country Code (MCC) in the Android Emulator? to change the sim country value. Since we run our emulated devices with API 24 the Emulator stays in default us country code.

This is how we run it within gradle:

tasks.withType(Test) {
    systemProperties = System.getProperties()
    systemProperty "buildDir", "${buildDir}"
    systemProperty "file.encoding", "UTF8"

    beforeTest {
        logger.info "restoring android emulator SIM country to AT"
        exec {
            commandLine "bash", "-c", "source ~/.bash_profile && adb -e shell setprop gsm.sim.operator.iso-country at
            ignoreExitValue true
        }
    }
}
CodeChimpy
  • 560
  • 1
  • 6
  • 26

1 Answers1

8

For me it works when I run this command as root user on AVD version 24+:

adb shell su root setprop gsm.sim.operator.iso-country at
ukostas
  • 126
  • 4