[I am not sure if I recall this correctly...try this if you want to]
There is a com.android.providers.settings folder on the emulator(inside data/data/) which has a database named settings.db.In this database, there is a table called "system". You can insert a row in this table which contains details of your proxy.
I think I was able to connect to internet from the browser of my emulator after this..
You used to have to make the database change but in current versions the option seems to be sufficient.
shruthi sridhar
Greenhorn
Joined: Oct 10, 2007
Posts: 11
posted
0
You can follow these steps to set up proxy for emulator:
1. Connect to the emulator using the "adb shell" command (From "tools" folder of SDK)
adb shell enter this..
# sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite> INSERT INTO system VALUES(99,'http_proxy','<PROXY_IP>:<PROXY_Port>');
2. Use the below command to check if the value is inserted
sqlite> SELECT * FROM system;
3. Restart the emulator and check for the browser to work.
4. An alternate if this doesnt work is, Go to Run -> Run Configurations ->Target in eclipse and enter
-http-proxy <PROXY_IP>:<PROXY_Port> in Additional emulator command line options.
Ed Burnette wrote:You used to have to make the database change but in current versions the option seems to be sufficient.
I concur with you, Sir. Lately, I have been using the command line switch(-http -proxy) to start the emulator instances(but I think the row in the system table is still there unless I have chosen to "wipe data").
I wonder what all can be set for emulator by making an entry in system table. What is the domain set of settings!? Is using the system table deprecated?
Thanks.
This message was edited 1 time. Last update was at by Monu Tripathi
Ed Burnette
Author
Ranch Hand
Joined: Jun 10, 2003
Posts: 142
posted
0
Using the system table is definitely not the recommended way to do things, and it's undocumented and subject to change with each release. That said, there are probably some interesting things in there if you find yourself bored one afternoon. Personally I'd rather take the time to read the source. Or to keep up with Android forums.