Debian Codegraph @

cmds/svc/svc.sh

raw symbols SCIP
1 #!/system/bin/shscip-shell filesystem . . `/system/bin/sh`.
2
3 # `svc wifi` has been migrated to WifiShellCommand,
4 # simply perform translation to `cmd wifi set-wifi-enabled` here.
5 if [scip-shell system . . `[`. "x$1" == "xwifi" ]; then
6 # `cmd wifi` by convention uses enabled/disabled
7 # instead of enable/disable
8 if [scip-shell system . . `[`. "x$2" == "xenable" ]; then
9 exec cmd wifi set-wifi-enabled enabled
10 elif [scip-shell system . . `[`. "x$2" == "xdisable" ]; then
11 exec cmd wifi set-wifi-enabled disabled
12 else
13 echoscip-shell system . . echo. "Control the Wi-Fi manager"
14 echoscip-shell system . . echo. ""
15 echoscip-shell system . . echo. "usage: svc wifi [enable|disable]"
16 echoscip-shell system . . echo. " Turn Wi-Fi on or off."
17 echoscip-shell system . . echo. ""
18 fi
19 exit 1
20 fi
21
22 if [scip-shell system . . `[`. "x$1" == "xdata" ]; then
23 if [scip-shell system . . `[`. "x$2" == "xenable" ]; then
24 exec cmd phone data enable
25 elif [scip-shell system . . `[`. "x$2" == "xdisable" ]; then
26 exec cmd phone data disable
27 else
28 echoscip-shell system . . echo. "Enable/Disable Mobile Data Connectivity"
29 echoscip-shell system . . echo. ""
30 echoscip-shell system . . echo. "usage: svc data [enable|disable]"
31 echoscip-shell system . . echo. ""
32 fi
33 exit 1
34 fi
35
36 # `svc bluetooth` has been migrated to BluetoothShellCommand,
37 # simply perform translation to `cmd bluetooth set-bluetooth-enabled` here.
38 if [scip-shell system . . `[`. "x$1" == "xbluetooth" ]; then
39 # `cmd wifi` by convention uses enabled/disabled
40 # instead of enable/disable
41 if [scip-shell system . . `[`. "x$2" == "xenable" ]; then
42 exec cmd bluetooth_manager enable
43 elif [scip-shell system . . `[`. "x$2" == "xdisable" ]; then
44 exec cmd bluetooth_manager disable
45 else
46 echoscip-shell system . . echo. "Control the Bluetooth manager"
47 echoscip-shell system . . echo. ""
48 echoscip-shell system . . echo. "usage: svc bluetooth [enable|disable]"
49 echoscip-shell system . . echo. " Turn Bluetooth on or off."
50 echoscip-shell system . . echo. ""
51 fi
52 exit 1
53 fi
54
55 export CLASSPATH=/system/framework/svc.jarscip-shell filesystem . . `/system/framework/svc.jar`.
56 exec app_process /system/binscip-shell filesystem . . `/system/bin`. com.android.commands.svc.Svc "$@"
57