Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
RyanZA
Old
(Last edited by RyanZA; 4th September 2010 at 04:57 PM.)
#1  
Senior Member - OP
Thanks Meter 653
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 167
Posts: 4,022
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 653
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 447
Posts: 1,390
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 10
Posts: 103
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 32
Posts: 302
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 447
Posts: 1,390
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 10
Posts: 103
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: 159
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 653
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.

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Gear Up Because it’s Time to Save Earth

*Cue Dramatic Music*Put on your red and blue latex overalls and cape because it’s time to … more

Recognized Contributor Code of Conduct

During the first half of 2012, XDA initiated the Recognized Contributor (RC) program to recognize … more

Careers in Android: What Hiring Managers Won’t Tell You – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more

Coloring Your Logcat World

Getting feedback for your app during development is as simple as adding logging info where necessary and looking … more