Skip to content

Instantly share code, notes, and snippets.

@Weeker
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save Weeker/51de49fe2fd08893ae82 to your computer and use it in GitHub Desktop.

Select an option

Save Weeker/51de49fe2fd08893ae82 to your computer and use it in GitHub Desktop.
#!/system/bin/sh
# Fake carrier for ROMs with init.d support
# To disable, touch /etc/no_fix_sim
if [ -e /etc/no_fix_sim ]; then
exit 0
fi
# Wait long enough for possible optimization process
wait_cnt=1000
for i in `seq $wait_cnt`; do
sleep 5;
state=`getprop gsm.sim.state`
if [ -n "$state" ] && [ "$state" = "READY" ] ; then
echo "SIM is ready";
break;
fi
done
num=`getprop fix.sim.debug`
if [ -z "$num" ] ; then
setprop fix.sim.debug 1
fi
num=$(( $num + 1 ))
setprop fix.sim.debug $num
sleep 5
# Do the actual fixing
setprop gsm.sim.operator.alpha "T-Mobile"
setprop gsm.sim.operator.iso-country "us"
setprop gsm.sim.operator.numeric "310026"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment