Power, data and USB management on android device with SVC
SVC binary allows you to control 4 main areas on a device:
- power
- wifi
- data
- usb
It becomes very handy when control over those areas is required for debugging. Here are few tips on how to use it.
1. Control power manager:
svc power stayon -> keeps the device awake while its plugged in, following arguments are accepted [true|false|usb|ac|wireless]
svc power reboot -> performs a shutdown and then reboots device
svc power shutdown -> shutdown the device
2. Control WiFi manager:
svc wifi [enable|disable] -> enable/disable WiFi on a device
svc wifi prefer -> sets preference for WiFi over Data network
3. Control mobile data connectivity:
svc data [enable|disable] -> enable/disable mobile data connectivity
svc data prefer -> sets preference for Data network over WiFi
4. Control USB state:
svc usb setFunction [function] -> sets the USB function
svc usb getFunction -> gets list of currently enabled functions on device