[REF] Disable Wifi On Screen Off

RyanZA

Senior Member
Jan 21, 2006
2,023
777
0
JHB
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.
 
Last edited:

fane1

Senior Member
Dec 8, 2008
315
36
0
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.
 

RyanZA

Senior Member
Jan 21, 2006
2,023
777
0
JHB
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. :D
 

JaGuR

Senior Member
Jul 27, 2009
174
3
0
I am having trouble getting this to work

I am typing

adb pull /sdcard/settings.db

and I am getting

abd: not found

?
 

JaGuR

Senior Member
Jul 27, 2009
174
3
0
This is what I have done,

Opened CMD, in the adb folder.

adb shell
su

accepted SU permissions

#busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db

#adb pull /sdcard/settings.db

Am I doing something wrong ?
 

Treggs

Senior Member
Aug 9, 2010
114
13
0
This is what I have done,

Opened CMD, in the adb folder.

adb shell
su

accepted SU permissions

#busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db

#adb pull /sdcard/settings.db

Am I doing something wrong ?
Nope worked for me. I'm trying to figure out how to edit the file....
 

JaGuR

Senior Member
Jul 27, 2009
174
3
0
ryanza, thanks for finding this out. tried but cant get sq3liteexplorer to work on win7 64. i get access violation errors.

hope you'll do a simple script for this. [email protected]
Same here to RyanZA, having trouble gettin ADB, to play corrcetly.

And I know few from whirlpool. that would also appreciate, and easier fix :)

Cheers
 
Last edited:

jdrake001

Senior Member
Dec 23, 2007
71
3
0
This is what I have done,

Opened CMD, in the adb folder.

adb shell
su

accepted SU permissions

#busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db

#adb pull /sdcard/settings.db

Am I doing something wrong ?
you need to exit before using adb pull