15 September 2009

How to set proxy for Android (updated for 1.5 and 1.6_r1 versions)

Here is a tutorial to reconfigure settings of Android , to use proxy for Internet connections.
Basically, we need to modify content of settings.db file in /data/data/com.android.providers.settings/databases/ of Android.

So, we can follow these steps:

1. Go into SDK tools folder
cd [path_to_SDK_folder]/tools
then start emulator.

2. Get settings.db file from Android:
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
3. Use SQLite3 to modify it:

a. If you are using Android SDK version 1.1 or lower,
then use:
sqlite3 settings.db "INSERT INTO system VALUES(99,'http_proxy','[proxy_host]:[proxy_port]');"
b. If you are using Android SDK version 1.5 or higher
then use:
sqlite3 settings.db "INSERT INTO secure (name, value) VALUES('http_proxy','[proxy_host]:[proxy_port]');"
4. Put it back into Android:
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
5. Restart emulator. Then we can use proxy setting for Internet connections.

1 comment:

Siraj said...

Hi these are some really good tips. Any idea if this can be done on the phone and not emulator? I am trying to connect to proxy on Nexus One.

Shellcode that bring back tty input

There are cases that you think you have been able to exploit the bug (e.g. buffer-overflow) but the program is terminated right awa...