system environment varibles - http_proxy should also set before doing following steps.
or add option -http_proxy when starting emulator.
1. go to your android sdk directory
2. cd tools
3. adb shell
4. in the shell, type following - please note the path may change in different sdk:
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
5. you will get a sqlite interactive shell, type followings to check the environment variables - please note the ending colon";" :
select * from system;
6. add http_proxy into the system table by typing following:
insert into system values(255, 'http_proxy', 'the proxy:port');
please note choose a unique id, here is 255 in my system.
7. incase you want to remove the proxy, type following:
delete from system where _id=255;
8. ctrl-D to exit