Gaming Console with Lollipop? Ouya Gets an Android TV Port

Android is a very flexible platform, and it can be used on a large variety of … more

Android App Review: Manage Your Connections Automagically – XDA TV

Material Design is all the buzz in the Android world right now. … more

Official TWRP Recovery Lands on Micromax Canvas Magnus

With the recent release of Android One, Micromax and MediaTek released fully buildable … more

Update Overload: SuperSU Heavily Updated

There are apps and apps out there. Very few can reach the level of popularity required to stay at … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[REF] Disable Wifi On Screen Off

OP RyanZA

4th September 2010, 01:52 PM   |  #1  
OP Senior Member
Flag JHB
Thanks Meter: 743
 
2,021 posts
Join Date:Joined: Jan 2006
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 by RyanZA; 4th September 2010 at 05:57 PM.
The Following 6 Users Say Thank You to RyanZA For This Useful Post: [ View ]
4th September 2010, 01:53 PM   |  #2  
kareeem's Avatar
Retired Senior Moderator
Flag Southern California
Thanks Meter: 168
 
4,021 posts
Join Date:Joined: Oct 2006
Donate to Me
Guess I'm one of the few who really likes this feature/"bug."
4th September 2010, 02:03 PM   |  #3  
OP Senior Member
Flag JHB
Thanks Meter: 743
 
2,021 posts
Join Date:Joined: Jan 2006
Quote:
Originally Posted by kareeem

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

4th September 2010, 02:11 PM   |  #4  
xan's Avatar
Recognized Developer
Flag Crack-ow
Thanks Meter: 456
 
1,399 posts
Join Date:Joined: May 2006
Donate to Me
More
Code:
D/WifiService( 2333): setting ACTION_DEVICE_IDLE timer for 900000ms.
4th September 2010, 02:31 PM   |  #5  
Senior Member
Thanks Meter: 14
 
114 posts
Join Date:Joined: Aug 2010
Quote:
Originally Posted by RyanZA

:
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.
4th September 2010, 02:39 PM   |  #6  
Senior Member
Thanks Meter: 35
 
310 posts
Join Date:Joined: 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.
4th September 2010, 02:41 PM   |  #7  
xan's Avatar
Recognized Developer
Flag Crack-ow
Thanks Meter: 456
 
1,399 posts
Join Date:Joined: May 2006
Donate to Me
More
Quote:
Originally Posted by Treggs

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.
4th September 2010, 02:43 PM   |  #8  
Senior Member
Thanks Meter: 14
 
114 posts
Join Date:Joined: Aug 2010
Quote:
Originally Posted by xan

adb shell
su
confirm in SuperUser.
done.

Ah, missed the prompt on the phone. Thanks.
4th September 2010, 02:46 PM   |  #9  
Senior Member
Thanks Meter: 3
 
163 posts
Join Date:Joined: Jul 2009
Quote:
Originally Posted by fane1

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
4th September 2010, 02:48 PM   |  #10  
OP Senior Member
Flag JHB
Thanks Meter: 743
 
2,021 posts
Join Date:Joined: Jan 2006
Quote:
Originally Posted by fane1

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 Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes