[HTC Sensation] UnixSlayer:
Wifi does not turn off like it’s supposed to from “Sleep Policy” tick “Never”.

**Disclaimer** This is done at your own risk, and responsibility. Follow instructions, and it will work. **4EXT FULL BACKUP or Titanium FULL SYSTEM & DATA BACKUP** BEFORE YOU EDIT!!

Problem: When wifi is on, and you turn the screen off. Wifi does not turn off like it’s supposed to from “Sleep Policy” tick “Never”.

Happening: The wifi turn-off time has been reset to the android default 15 minutes. You can change this setting to less time.

Props go to RyanZA in the Galaxy S forums for this fix.

You will need:

1. ADB root shell access.

2. SQLite Admin Tool - SQLite Admin Tool Download

What to do:

1). You need to enable root options in ES File Explorer. From ES File Explorer, go to phone root, and the following directory: /data/data/com.android.providers.settings/databases/ Copy settings.db, and copy to sdcard root.

Optional (same as above):

[ADB shell command:]

cp /data/data/com.android.providers.settings/databases/settings.db /sdcard/settings.db

2).Connect to USB, and switch into Disk Drive mode. Copy settings.db to your computer.

Optional: [You can edit the settings.db file directly from your sdcard, if you don’t want to copy to your computer.]

3). Open settings.db in SQLite Maestro Admin Tool.

4). Expand the Database until you see the tables listing. Click on secure , and choose the ‘Data' tab.

Please see following picture:

5). Scroll down to the last data entry on ‘Data’ tab. Click the Blue + button to add "Insert Record". (Just Like I did In Picture - See last line - number 108)

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 apply changes under General..

8). Click on secure folder again, choose ‘Data’ tab, scroll to the bottom and ensure that your change has been made.

9). From Database menu [Top left] -> Disconnect from Database

Please use the picture above as reference for steps 5 thru 9.

10). If you copied file to computer, copy edited settings.db file to sdcard. You can overwrite the one on the sdcard *only*. If you edited it, and saved the edit directly to your sdcard from SQLite Admin Tool; skip this step.

11). Disconnect from Disk Drive, and back to charge only. From Es File Explorer copy edited/copied from computer settings.db on sdcard. Go to phone root. Go to /data/data/com.android.providers.settings/databases.

Find the original “settings.db” file, and rename it to settings.db.old.

Then copy the settings.db to this folder.

11A).

Optional (same as above):

[ADB shell command:] RENAME

rename /data/data/com.android.providers.settings/databases/settings.db /data/data/com.android.providers.settings/databases/settings.db.old]

****^^^^^^^^^^^^^^^^^^^^ Renaming Orig. file. Don’t delete it!

11B).

Optional (same as above):

[ADB shell command:] COPY

cp /sdcard/settings.db /data/data/com.android.providers.settings/databases]

****^^^^^^^^^^^^^^^^^Copies file from sdcard. Rename before you copy!! Rename Directly above this line.

12).

[ADB shell command only:]

chown system.system /data/data/com.android.providers.settings/databases/settings.db

Reboot, and wait for the results.