su -c "setprop persist.radio.noril 1"
su -c "setprop persist.radio.noril 0"
# This function detaches a device from the cellular network # Upon execution, a reboot must be performed function radiooff { if [ "$(whoami)" != "root" ]; then echo "Error: must be executed as root." return 1 fi if [ "$(getprop persist.radio.noril)" == "1" ]; then echo "Radio is already disabled." return 1 fi setprop persist.radio.noril 1 if [ "$(getprop persist.radio.noril)" == "1" ]; then echo "Radio is now disabled. Please reboot." return 0 else echo "Error: unable to disable radio." return 1 fi }
# This function connects a device back on the cellular network # Upon execution, a reboot must be performed function radioon { if [ "$(whoami)" != "root" ]; then echo "Error: must be executed as root." return 1 fi if [ "$(getprop persist.radio.noril)" == "0" ]; then echo "Radio is already enabled." return 1 fi setprop persist.radio.noril 0 if [ "$(getprop persist.radio.noril)" == "0" ]; then echo "Radio is now enabled. Please reboot." return 0 else echo "Error: unable to enable radio." return 1 fi }