I saw a good post and added it to my favorites.
Http://topic.csdn.net/u/20110218/16/1ed56b93-0306-4ef7-9c85-5864bebcf2f5.html? 32725
Because it is not good to use the default shell, we replaced it with the SH of busybox. Later we found that ADB install could not be installed.Program. I looked at the bin directory and found several useful scripts.
1. SVC command. This script is in the/system/bin directory. This command can be used to control power management, Wi-Fi switch, and data switch (that is, Internet traffic)
2. SVC power stayon [true | false | USB | Ac] This is used to control whether the screen is always on when the USB is inserted. If there is a place to set it, I will not say much.
3. SVC data disable
This command can close the data connection, that is, the Internet traffic. We all know that there are many switches to control the Internet, but most of them are achieved by adding a suffix to the access point on the APN, however, this command does not change any settings of the APN and closes the data connection directly at the underlying layer. This should be the most thorough, without affecting the APN settings.
What is the difference between this and apndroid? When apndroid is disabled, the connection that has been downloaded may not be forcibly closed (this is also mentioned in apndroid's own description ). For example, if you are downloading a 10 m movie, you have downloaded 1 m. Close the connection with apndroid. This download may continue and will not be stopped immediately.
But with this command, it is absolutely no mercy to kill.
4. SVC data enable is used to connect to Internet data, which is the opposite of a command.
5 SVC data prefer
Commands give priority to controlling 3G data connections over wifi. We all know that, under normal circumstances, 3G connections are not used when there is WiFi. However, this command is the opposite. If 3G is used, 3G traffic is used first, and WiFi is used when 3G is not used. I don't think you are so stupid, so this command is useless.
6. SVC WiFi disable WiFi connection
7 SVC WiFi enable WiFi connection
8 SVC WiFi prefer: Set WiFi priority, which is the opposite of 5.
The above commands must be executed in shell and must be root.
You can use gscript (search for a forum), and then enter these commands to put the shortcut on the desktop, which is as convenient as those of the switch software.
Source from:
Http://51shouji.blogbus.com/logs/71788144.html