[GUIDE] How to change WiFi sleep timeout (idle time)
All credit goes to RyanZA for his awesome guide for the Samsung Galaxy S: http://forum.xda-developers.com/showthread.php?t=774507
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: http://sqlitebrowser.sourceforge.net/
1) In ES File Explorer, go to the following directory in your phone’s internal memory: /data/data/com.android.providers.settings/databases/
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.