Created
April 7, 2015 00:43
-
-
Save newkedison/c2841a8a544dc0358ea2 to your computer and use it in GitHub Desktop.
修改运营商标识
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
直接init.d里面写个脚本,把三个变量改一改就可以了,当然你的内核得支持执行init.d脚本,不行的话去下个$cript | |
#!/system/bin/sh | |
if [ -e /etc/no_fix_sim ]; then | |
exit 0 | |
fi | |
#We will proceed if either | |
#1. gsm.sim.state has a READY value | |
#2. 100s timeout ( this would happen if we are booting without sim card ) | |
#3. in the case of a flo build | |
loop_cnt=20 | |
device=`getprop ro.build.product` | |
if [ $device != "flo" ]; then | |
for i in `seq $loop_cnt` | |
do | |
sleep 5; | |
state=`getprop gsm.sim.state` | |
if [ -n $state ] && [ $state = "READY" ] ; then | |
echo "sim is ready"; | |
break; | |
fi | |
done | |
fi | |
#Now handles the debugging info | |
num=`getprop fix.sim.debug` | |
if [ -z $num ] ; then | |
#We have not initialized this variable before | |
setprop fix.sim.debug 1 | |
fi | |
num=$(( $num + 1 )) | |
setprop fix.sim.debug $num | |
#wait for sometime to waive the potential glitch | |
#finally do the fixing | |
sleep 5 | |
setprop gsm.sim.operator.alpha "T-Mobile" | |
setprop gsm.sim.operator.iso-country "us" | |
setprop gsm.sim.operator.numeric "310260" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment