Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,428 Members 46,965 Now Online
XDA Developers Android and Mobile Development Forum

[REF] Disable Wifi On Screen Off

Tip us?
 
RyanZA
Old
(Last edited by RyanZA; 4th September 2010 at 04:57 PM.)
#1  
Senior Member - OP
Thanks Meter 731
Posts: 2,021
Join Date: Jan 2006
Location: JHB
Default [REF] Disable Wifi On Screen Off

Some people have picked up an annoying bug - I'm not sure where it comes from, some believe it is the voodoo kernel, I think it is probably JPC firmware or similar.

The bug: When you have wifi on and you turn the screen off, wifi does not turn off like it should.

The reality: The wifi turn-off time has been reset to the android default 15 minutes. You can change this setting if you want. (I like 10 seconds myself.)

You will need:
1. ADB root shell access.
2. SQLite3 Explorer - http://www.singular.gr/sqlite/
or SQLiteBrowser - http://sqlitebrowser.sourceforge.net/

What to do:
1. shell command: busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
2. adb command: adb pull /sdcard/settings.db
3. Open settings.db in SQLExplorer
4. Right click on gservices or secure folders**, choose 'Show Data'
5. Click on the green plus icon "Insert Record"
6. Double click on name column, insert "wifi_idle_ms" - Double click on value column and insert "10000" for 10 seconds for wifi to turn off. 30000 for 30 seconds, etc.
7. Click on the green tick.
8. Right click on the folder again, choose show data, scroll to the bottom and ensure that your change has been made.
9. File -> Close Database
10. adb command: adb push settings.db /sdcard/settings.db
11. shell command: busybox mv /dbdata/databases/com.android.providers.settings/settings.db /dbdata/databases/com.android.providers.settings/settings.db.bak
12. shell command: busybox cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings/settings.db
13. shell command: chown system.system /dbdata/databases/com.android.providers.settings/settings.db

** I'm not sure if the correct folder is gservices, or secure. I believe secure is the correct one though. I just added it to both.

This is too hard:
If there are 10 or more people who have this bug but can't do the required fix, I'll make a small utility to do it for you. Let me know.
The Following 6 Users Say Thank You to RyanZA For This Useful Post: [ Click to Expand ]
 
kareeem
Old
#2  
kareeem's Avatar
Retired Senior Moderator
Thanks Meter 168
Posts: 4,021
Join Date: Oct 2006
Location: Southern California

 
DONATE TO ME
Guess I'm one of the few who really likes this feature/"bug."
If I have helped you in any way, shape or form, please consider donating to the Syrian American Council (SAC) to help aid the helpless refugees.
 
RyanZA
Old
#3  
Senior Member - OP
Thanks Meter 731
Posts: 2,021
Join Date: Jan 2006
Location: JHB
Quote:
Originally Posted by kareeem View Post
Guess I'm one of the few who really likes this feature/"bug."
If you like this bug, you might like this even more!
Settings->Wireless and network->Wi-Fi settings->menu button->Advanced->Wi-Fi sleep policy set to never

 
xan
Old
#4  
xan's Avatar
Recognized Developer
Thanks Meter 455
Posts: 1,399
Join Date: May 2006
Location: Crack-ow

 
DONATE TO ME
Code:
D/WifiService( 2333): setting ACTION_DEVICE_IDLE timer for 900000ms.
Feeling like translating something? here you go
Voltage Control Lite/Extreme 4.9.8 *Siyah support + Profiles + Widget + CPU history*: -> Take control of your OC/UV for Galaxy S OC kernels. Android Market / YAAM
ExTweaks / ExTweaks Plus 0.20 *Universal Tweaks Interface frontend for Siyah kernel*

14apr: [Froyo]Insane OC/UV kernel K13E
What is your OC result?
 
Treggs
Old
#5  
Senior Member
Thanks Meter 14
Posts: 114
Join Date: Aug 2010
Quote:
Originally Posted by RyanZA View Post
:
If there are 10 or more people who have this bug but can't do the required fix, I'll make a small utility to do it for you. Let me know.
Had a quick google but how do I get my adb shell into root? The rest makes sense.
 
fane1
Old
#6  
Senior Member
Thanks Meter 35
Posts: 310
Join Date: Dec 2008
Really i dont understand why people are so fuzzed about this "bug".Im really happy with it because at home i always use wiffi and usually i stay at home in the afternoons.So i set wiffi settings to never disconect even at night.Data connection over 3g is expensive here in portugal and i have 600mb month limit wich cost about 15 euro plus my normal bill.And its not by having wifi on during 15 minutes that will drain the battery so much.Anyways i want to thank you again for your work and dedication to help people like me that have some dificulties understanding how the android system works.
 
xan
Old
#7  
xan's Avatar
Recognized Developer
Thanks Meter 455
Posts: 1,399
Join Date: May 2006
Location: Crack-ow

 
DONATE TO ME
Quote:
Originally Posted by Treggs View Post
Had a quick google but how do I get my adb shell into root? The rest makes sense.
adb shell
su
confirm in SuperUser.
done.
Feeling like translating something? here you go
Voltage Control Lite/Extreme 4.9.8 *Siyah support + Profiles + Widget + CPU history*: -> Take control of your OC/UV for Galaxy S OC kernels. Android Market / YAAM
ExTweaks / ExTweaks Plus 0.20 *Universal Tweaks Interface frontend for Siyah kernel*

14apr: [Froyo]Insane OC/UV kernel K13E
What is your OC result?
 
Treggs
Old
#8  
Senior Member
Thanks Meter 14
Posts: 114
Join Date: Aug 2010
Quote:
Originally Posted by xan View Post
adb shell
su
confirm in SuperUser.
done.
Ah, missed the prompt on the phone. Thanks.
 
JaGuR
Old
#9  
Senior Member
Thanks Meter 3
Posts: 161
Join Date: Jul 2009
Quote:
Originally Posted by fane1 View Post
Really i dont understand why people are so fuzzed about this "bug".

Becuae WIFI, uses more battery, when not being used for data, than 3G does.

ANdpossibly, why peoples batteries, are draining so much
 
RyanZA
Old
#10  
Senior Member - OP
Thanks Meter 731
Posts: 2,021
Join Date: Jan 2006
Location: JHB
Quote:
Originally Posted by fane1 View Post
Really i dont understand why people are so fuzzed about this "bug".Im really happy with it because at home i always use wiffi and usually i stay at home in the afternoons.So i set wiffi settings to never disconect even at night.Data connection over 3g is expensive here in portugal and i have 600mb month limit wich cost about 15 euro plus my normal bill.And its not by having wifi on during 15 minutes that will drain the battery so much.Anyways i want to thank you again for your work and dedication to help people like me that have some dificulties understanding how the android system works.
If you want, you can use the guide to increase it up to 30 minutes or more. Point is - choice is good.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Run, Jump, and Shoot in Tales of Ciaxia

There are certain types of games that have become paramount of the portable gaming world. As we have … more

Samsung Gear Live Stock Firmware Image Pulled, Temp Root

Just yesterday,XDA Recognized Developer and TV ProducerAdamOutlertore apart … more

Draw a Line and Let Your Device Do the Rest with LineitApp

Over the years, since evenbefore Android entered the scene, we have striven to … more