1#!/system/bin/sh 2 3# `svc wifi` has been migrated to WifiShellCommand, 4# simply perform translation to `cmd wifi set-wifi-enabled` here. 5if [ "x$1" == "xwifi" ]; then 6 # `cmd wifi` by convention uses enabled/disabled 7 # instead of enable/disable 8 if [ "x$2" == "xenable" ]; then 9 exec cmd wifi set-wifi-enabled enabled 10 elif [ "x$2" == "xdisable" ]; then 11 exec cmd wifi set-wifi-enabled disabled 12 else 13 echo "Control the Wi-Fi manager" 14 echo "" 15 echo "usage: svc wifi [enable|disable]" 16 echo " Turn Wi-Fi on or off." 17 echo "" 18 fi 19 exit 1 20fi 21 22if [ "x$1" == "xdata" ]; then 23 if [ "x$2" == "xenable" ]; then 24 exec cmd phone data enable 25 elif [ "x$2" == "xdisable" ]; then 26 exec cmd phone data disable 27 else 28 echo "Enable/Disable Mobile Data Connectivity" 29 echo "" 30 echo "usage: svc data [enable|disable]" 31 echo "" 32 fi 33 exit 1 34fi 35 36export CLASSPATH=/system/framework/svc.jar 37exec app_process /system/bin com.android.commands.svc.Svc "$@" 38 39