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
}
}
}