Remove All Ads from XDA
Honor 9 Lite

[GUIDE] How to change WiFi sleep timeout (idle time)

289 posts
Thanks Meter: 319
By Proverbs2, Senior Member on 17th February 2012, 04:22 PM
Post Reply Email Thread
All credit goes to RyanZA for his awesome guide for the Samsung Galaxy S:
I have merely adapted his guide to the Motorola DEFY and simplified a few steps.

What this guide is for:
The Android settings menu only gives you three options for the wifi sleep policy: When screen turns off, Never when plugged in, or Never. (These options are found in Settings > Wireless & networks > Wi-Fi settings > menu button > Advanced > Wi-Fi sleep policy.) The When screen turns off option does not turn off the wifi immediately after the screen is turned off, however. By default, the system waits 15 minutes before disabling the wifi. This guide explains how to change that wifi timeout duration.

What you’ll need:
- ES File Explorer (with the Root Explorer and Mount File System settings enabled), or some other root-enabled file explorer app on your phone

- SQLite Database Browser on your computer:

1) In ES File Explorer, go to the following directory in your phone’s internal memory: /data/data/

2) Copy the “settings.db” file to your SDcard, then to your computer. Make a backup of the original file before making any changes.

3) Open SQLite Database Browser on your computer, select File > Open Database, and open your “settings.db” file.

4) Click the Browse Data tab, and on the Table dropdown menu, select secure.

5) Click New Record. Scroll down to the new empty line that was just created in the table, and double-click on the empty cell in the name column. In the Edit database cell window that appears, type “wifi_idle_ms” (without quotation marks), then click Apply Changes. Next, double click on the cell in the value column, and enter the desired wifi timeout duration in milliseconds (e.g. enter “30000” to specify a timeout duration of 30 seconds), and click Apply Changes.

6) Save the file and exit SQLite. Move the edited file back to your phone’s SD card, then use ES File Explorer to copy and paste it back into the directory where you found it, replacing the original file. (Remember to keep a backup of the original, just in case something goes wrong.) Then reboot the phone.
The Following 2 Users Say Thank You to Proverbs2 For This Useful Post: [ View ] Gift Proverbs2 Ad-Free
13th August 2012, 06:17 PM |#2  
Thanks Meter: 16
It won't open file on computer
No database shown, nothing. Help somehow?
15th August 2012, 12:38 AM |#3  
Unr3aL67's Avatar
Thanks Meter: 34
Originally Posted by Ukiand1

No database shown, nothing. Help somehow?

Are you sure you are browsing as root? If you are using ES File Explorer, check the settings and make sure you have "Root-Explorer" enabled with the SU-permissions granted and the filesystem is mounted as R/W.

You should also mention to set the permissions for settings.db to -rw-rw---- (660) and the owner to system.system again after overwriting the old file, otherwise you'll get a bootloop.

This can by done either by using adb or terminal emulator:
> adb shell
$ su
# chmod 660 /data/data/
# chown system.system /data/data/
# exit
$ exit

> adb reboot
or by using any other app that can do both (I recommend Solid Explorer)

Nice tut otherwise. Now let's see, if it works...

Greetz, Unr3aL67
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes