Last active
August 29, 2015 14:13
-
-
Save Weeker/51de49fe2fd08893ae82 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
| #!/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