If you are behind a proxy and looking to connect the emulator to Internet, Luisa Magarian have posted the way to set proxy for the emulator. It uses the command line and the adb utility. First change directory to the emulator tools folder, you will find also the adb utility there. Run the emulator, then from command line :
- ./adb shell sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db “\”INSERT INTO system VALUES(99,’http_proxy’,’ [host_or_IP]:[port]’);\”"
- Change [host_or_ip] and [port] to your correct proxy values
- Try to connect from Android and it should be working fine.
Luisa posted also the way to access some Android’s system setting using SQLite, this will help to get more information on how Android work, for example to retrieve all settings :
- ./adb shell sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db “\”SELECT * FROM system\”"
- This will return :
1|music_volume|3
2|voice_volume|3
3|ringer_volume|3

Popularity: 51%



RSS Feed
Twitter page
Facebook Group
November 20th, 2007 at 4:41 pm
So the hack works for the browser … fair enough.
Unfortunately it does not for the map viewer.
Ufux
November 23rd, 2007 at 6:55 pm
Tnx,
It works.
November 23rd, 2007 at 6:58 pm
2 Ufux
The same
December 4th, 2007 at 4:28 am
How can i connect to the Map in Android through a proxy server which need username and password?
Thanks
December 8th, 2007 at 9:16 am
Hi,
i set the proxy…browser works fine. but i can’t view the map.anyone can tell me…what is the solution..
December 11th, 2007 at 2:50 pm
i have same problem Blank screen without any map show on my Android emulator……plz help how to acess map on android emulator??
January 22nd, 2008 at 12:44 pm
What should i give in ‘http_proxy’ field?
I am not getting it.
My IP is DHCP enabled. So is there any problem caused by this?
Plz reply..
April 2nd, 2008 at 10:39 am
How if the proxy setting is automatically by a http://xx.xx.xx/xx.pac
June 24th, 2008 at 10:54 am
How can i connect to the Map in Android through a proxy server which need username and password?
September 20th, 2008 at 11:13 am
I am using following and gives folooeing result
If anybody have answer plz reply me
E:\jagtap\Andriod SDK\android-sdk-windows-0.9_beta\tools>adb shell
# sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db
sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db
sqlite3: not found
#
September 20th, 2008 at 11:20 am
I am using following and gives following result
If anybody have answer plz reply me
E:\jagtap\Andriod SDK\android-sdk-windows-0.9_beta\tools>adb shell
# sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db
sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db
sqlite3: not found
#
October 3rd, 2008 at 9:07 pm
Hi, I am getting proxy issue.
In office not able to run map application. Tried to execute INSERT on system table fails. Can anybody give exact steps to be followed.
Thanks!!
Avinash.
December 13th, 2008 at 1:02 am
Hi, the reason that Browser works and Maps doesn’t is that Browser calls an API in WebView called ‘enablePlatformNotifications’ - this API will cause a listener to be setup which will eventually set the proxy for the current request queue.
If you were to write your own Activity and use WebView, all you would need to do would be to call WebView.enablePlatformNotifications() … you could rebuild Maps from source and add that line in the Activity onCreate method…
February 3rd, 2009 at 11:28 am
I am using WebView.enablePlatformNotifications() this line in my OnCreate()
of my application but still not working. Is anybody tried this API and working? If so please suggest me how to use.
March 19th, 2009 at 8:28 am
i have same problem Blank screen without any map show on my Android emulator……plz help how to acess map on android emulator through proxy??
May 7th, 2009 at 11:26 am
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’,':’);
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 : in Additional emulator command line options.
June 16th, 2009 at 7:08 pm
This fix doesn’t seem to be working anymore. Maybe something changes with the 1.5 release?
October 19th, 2009 at 12:25 pm
There is a much easier way of doing this.
With in the emulator GUI you can go Menu > Settings > Wireless
Controls > Mobile Networks > Access Point Names and create a new Access Point which connects to your proxy server. Taken me several hours to locate this but it seems to have worked a dream :o)