Android系统SVC命令教程

来源:互联网 发布:淘宝售后服务有哪些 编辑:程序博客网 时间:2024/06/05 05:13

svc命令,位置在/system/bin目录下,用来管理电源控制,无线数据,WIFI

[java] view plaincopy
  1. # svc  
  2. svc  
  3. Available commands:  
  4. help     Show information about the subcommands  
  5. power    Control the power manager  
  6. data     Control mobile data connectivity  
  7. wifi     Control the Wi-Fi manager  
  8.    
  9. # svc power  
  10. svc power  
  11. Control the power manager  
  12. usage: svc power stayon [true|false|usb|ac]  
  13. Set the 'keep awake while plugged in' setting.//设置屏幕的常亮,true保持常亮,false不保持,usb当插入usb时常亮,ac当插入电源时常亮  
  14.    
  15. # svc data  
  16. svc data  
  17. Control mobile data connectivity  
  18. usage: svc data [enable|disable]  
  19. Turn mobile data on or off.//设置移动网络的数据是否启用  
  20. svc data prefer  
  21. Set mobile as the preferred data network//设置移动网络的数据优先于WIFI  
  22.    
  23. # svc wifi  
  24. svc wifi  
  25. Control the Wi-Fi manager  
  26. usage: svc wifi [enable|disable]  
  27. Turn Wi-Fi on or off.//设置WIFI是否启用  
  28. svc wifi prefer  
  29. Set Wi-Fi as the preferred data network//设置WIFI优先于移动网络的数据,一般应设置成这样,除非你刻意使用移动网络数据传输  

 

上面的命令都要在shell中执行,需要root。

大家可以用gscript  ,然后输入这些命令做成在快捷方式放在桌面,跟那些开关软件一样方便使用。


0 0
原创粉丝点击