Sep 15, 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/ 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/ 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/
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.

ph0wn CTF 2017 Write-up: Misc/helpxman - Stage 2 and 3

After successfully getting the flag of  Stage 1 , the challenge told us to continue looking for something interesthing from the app. After ...