Investigation led us to the following conclusions: LG Android Phones
- The LG Optimus V has a Wifi bug that drains the battery rapidly
- Wifi consumes less power than 3G when downloading, but more power when idle.
- 3G consumes the same power as airplane mode when idle.
Yet most of you don’t believe conclusion number 3. You’ve set Tasker to turn off your 3G when the screen is off and have seen great battery savings. I know why…
Your installed programs are using your 3G even when the screen is off. It makes sense that you want to turn off your 3G to stop them and get better battery life, but you are punishing the wrong culprit. You may want some of your apps to occasionally update when the screen is off. You may want to use Sipdroid and get incoming calls. You may want your emails to be occasionally updated, but you don’t want Google maps to constantly update the CIA to your precise location every minute. If you want to control exactly which programs have access to 3G/Wifi. LG Phone Problem and Solution
Here is what you should do:
You will need root access to do this. This will setup two script files, one to run when the screen turns off and one to run when the screen turns on. These will "enable" and "disable" the firewall. The firewall is never actually disabled. You are merely changing the rules that apply, either to give access to a limited number of apps or to allow all apps through. Because of the requirement that the scripts be executed with root access, there are actually five script files required. Two are created using Droidwall and are unique to your LG Optimus V. Three scripts are attached in the zip below and are universal. LG-Optimus info
- Install Root Explorer or a similar app. You can also use adb.exe, but it is up to you to figure out the correct commands.
- Install Droidwall .
- Figure out which apps you want grant internet access to when your screen is off. If none, then select none.
- Set the rules in Droidwall and enable the firewall.
- Using Root Explorer to navigate to this folder: /data/data/com.googlecode.droidwall/cache/
- Copy the file droidwall.sh and place it on your microSD card.
- Rename it to droidwall-on.sh
- Open Droidwall again, uncheck all the apps you had selected, and instead check the boxes for "(any application)". This will be the profile that is applied when you actually want to use your LG Optimus V and the screen is on.
You can choose to limit access here as well, but it is safer to choose "(any application)" to for now. You can come back later and recreate a more restrictive profile once you have everything working.
- Apply the rules and then turn the firewall off and then back on again.
- It is important that the firewall is still enabled.
- Navigate back to the folder: /data/data/com.googlecode.droidwall/cache/
- Copy the new droidwall.sh and place it on your microSD card.
- Rename it to droidwall-off.sh
- These two script files will "enable" and "disable" the firewall.
- Use Gscript to test the scripts to make sure they work. Run droidwall-on.sh, and test an app you didn’t give 3G or Wifi access to. It should be blocked from accessing the internet. Now run droidwall-off.sh. That same app should now have internet access. If this test does not work, go back and repeat the steps above. This is also the point where you check that all your critical apps function correctly with either script activated. You must make sure the scripts work as intended before proceeding. If you don’t know how to add/run scripts using Gscript, learn.
While you can run these scripts as root in Gscript, running them as root when the screen turns off/on is a bit harder. The following steps have to all be done in order for the scripts to be executed correctly.
- Install Tasker
- Install SL4A. (more info)
- Run SL4A once so that it creates the following folders on your microSD card or create them yourself: /sdcard/sl4a/scripts/
- Copy droidwall-off.sh and droidwall-on.sh into the "scripts" folder.
- Copy screen-off.sh and screen-on.sh from the zip file attached to this post to the "scripts" folder.
- Using Root Explorer, copy "sush" from the attached zip file to the folder "/system/xbin/". Make sure to "Mount R/W" before pasting the file, and then "Mount R/O" when finished. Read here about why we need this file to run the scripts as root.
- Open Tasker -> New -> Ok -> Event -> Display -> Display On -> Done -> New Task -> Ok -> + -> Misc -> Run Script
- Where it says "Name" select the search button. You should see the four scripts we placed in the "/sdcard/sl4a/scripts/" folder. If not, retrace your steps to see what you did wrong. Select "screen-on.sh". Don’t select the Droidwall scripts because they can’t run as root as they are written.
- Done -> Done
- Repeat the steps to add a profile for when the screen turns off and "screen-off.sh". When you have both profiles, select Apply at the bottom.
- Now when your screen is off only the programs you selected will be allowed to use your 3G or Wifi.
- You no longer need to run Droidwall, but you can use it to update your droidwall-on.sh script. Don’t uninstall Droidwall. If anything goes wrong and you lose all of your internet access, try deleting the scripts in the "/sdcard/sl4a/scripts/" folder, and then allowing all apps to have internet access using Droidwall.
- You can actually setup any number of profiles to control your firewall using location, time of day, …etc. To do so, create the correct ".sh" file using Droidwall. Place it inside the "/sdcard/sl4a/scripts/" folder. Then add a secondary script to run your ".sh" as root. Use "screen-on.sh" as a template to create your secondary script. Then create the proper profile inside Tasker to run the secondary script. If what I just said confuses you, don’t attempt to do this. You can really mess up your LG Optimus V if this is done incorrectly!
LG Cell Phone – Related Posts