android market - change country

as we all know, the grass is always greener on the other side. this seems to be true for the android market as well. using my android phone here in switzerland with swisscom leads to some applications not being available on the android market for me. if i where in the states and used a us sim card i could download more stuff, interesting stuff as for example the official last.fm client.

luckily there is a way to look over the fense and find out what you’d normally be messing. as described on rac’s blog it is quite simple to fool the android market and make it show you all the stuff those us customers can see :)

i tried this on a rooted Nexus One (Android 2.1) with Canyogen’s Mod installed. i dont think the mod is necessary, but maybe you need to root it.. actually i don’t really know what’s possible without rooting the phone. To upload scripts to your phone simply use the Android SDK which can be downloaded for free. then use

adb remount
adb push yourscript.sh /system/bin/
adb shell
chmod 755 /system/bin/yourscript.sh 
adb remount

to copy your script to the phone and finally use

adb shell

to get a shell from your phone. there you can start your script.

and here is the script from the above mentioned webpage which helps you do the magic.


#!/system/bin/sh
 # Market country change script by rac (http://2030.tk/android)
 # based on reverse engineering from Tim (http://strazzere.com/blog) 
 # and Andrea (http://www.androidiani.com)
 # this script has to be started as root
 case $1 in
 	ch.swisscom)
 		setprop gsm.sim.operator.numeric 22801
 		setprop gsm.operator.numeric 22801
 		setprop gsm.sim.operator.iso-country ch
 		setprop gsm.operator.iso-country ch
 		setprop gsm.operator.alpha Swisscom
 		setprop gsm.sim.operator.alpha Swisscom
 		kill $(ps | grep vending | tr -s ' ' | cut -d ' ' -f2)
 		rm -rf /data/data/com.android.vending/cache/* 
 		sh $0 actual;;
 	
 	ch.sunrise)
 		setprop gsm.sim.operator.numeric 22802
 		setprop gsm.operator.numeric 22802
 		setprop gsm.sim.operator.iso-country ch
 		setprop gsm.operator.iso-country ch
 		setprop gsm.operator.alpha sunrise
 		setprop gsm.sim.operator.alpha sunrise
 		kill $(ps | grep vending | tr -s ' ' | cut -d ' ' -f2)
 		rm -rf /data/data/com.android.vending/cache/* 
 		sh $0 actual;;
 	de.o2)
 		setprop gsm.sim.operator.numeric 26207
 		setprop gsm.operator.numeric 26207
 		setprop gsm.sim.operator.iso-country de
 		setprop gsm.operator.iso-country de
 		setprop gsm.operator.alpha "o2 - de"
 		setprop gsm.sim.operator.alpha "o2 - de"
 		kill $(ps | grep vending | tr -s ' ' | cut -d ' ' -f2)
 		rm -rf /data/data/com.android.vending/cache/* 
 		sh $0 actual;;
 	de.simyo)
 		setprop gsm.sim.operator.numeric 26203
 		setprop gsm.operator.numeric 26203
 		setprop gsm.sim.operator.iso-country de
 		setprop gsm.operator.iso-country de
 		setprop gsm.operator.alpha "E-Plus"
 		setprop gsm.sim.operator.alpha "simyo"
 		kill $(ps | grep vending | tr -s ' ' | cut -d ' ' -f2)
 		rm -rf /data/data/com.android.vending/cache/* 
 		sh $0 actual;;
 	us.tmo)
 		setprop gsm.sim.operator.numeric 310260
 		setprop gsm.operator.numeric 310260
 		setprop gsm.sim.operator.iso-country us
 		setprop gsm.operator.iso-country us
 		setprop gsm.operator.alpha T-Mobile
 		setprop gsm.sim.operator.alpha T-Mobile
 		kill $(ps | grep vending | tr -s ' ' | cut -d ' ' -f2)
 		rm -rf /data/data/com.android.vending/cache/* 
 		sh $0 actual;;
 	actual)
 		getprop|grep gsm.sim.operator.numeric
 		getprop|grep gsm.operator.numeric
 		getprop|grep gsm.sim.operator.iso-country
 		getprop|grep gsm.operator.iso-country
 		getprop|grep gsm.operator.alpha
 		getprop|grep gsm.sim.operator.alpha;;
 	*)
 		echo "Usage:"
 		echo " 	 $0 ch.swisscom"
 		echo "   $0 ch.sunrise"
 		echo "   $0 de.02"
 		echo "   $0 de.simyo"
 		echo "   $0 us.tmo"
 		echo "   $0 actual";;
 esac

don’t be too worried about messing up your settings. once you are done checking out the foreign android market, you can set everything back to normal simply by going into airplane mode and then back online. this will set all these values back to normal ;)

enjoy

Leave a Reply