Emulator + Internet behind Proxy

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

Emulator + Internet behind Proxy

Postby Oleg » Wed Nov 28, 2007 1:51 pm

i am not getting internet access using android, how can i be able to
do that...plz give detailed explanation..
Oleg
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Wed Nov 28, 2007 1:49 pm
Location: Ukraine

Top

Postby plusminus » Wed Nov 28, 2007 3:17 pm

Hello Oleg,

Are you behind a firewall? I know there are also problems with the emulator when you are behind a proxy.
So let us know what you are behind.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby Oleg » Wed Nov 28, 2007 3:26 pm

I am behind a proxy!
Oleg
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Wed Nov 28, 2007 1:49 pm
Location: Ukraine

Postby plusminus » Wed Nov 28, 2007 5:30 pm

Hello oleg,

If you are behind a proxy you need to setup Android to do one little thing to let the emulator know the proxy settings, this can be done by using the adb utility on the command line.

Ensure that the emulator is running, now browse to the tools folder of your Android SDK installation in your commandline and type the following:
Code: Select all
adb shell sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db ""INSERT INTO system VALUES(99,'http_proxy','[HOST]:[PORT]');""


Change the HOST and PORT values to the IP or host name of the proxy server and the port number of the proxy.

Now you should be able to connect to the Internet.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby Oleg » Wed Nov 28, 2007 5:58 pm

It works! Thanks!
Oleg
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Wed Nov 28, 2007 1:49 pm
Location: Ukraine

Help me!

Postby congdang » Thu Dec 13, 2007 5:45 am

what's host name and port number!
example to all please! :)
thx a lot!
congdang
Freshman
Freshman
 
Posts: 3
Joined: Thu Dec 13, 2007 4:25 am

Top

Postby Oleg » Thu Dec 13, 2007 8:27 am

Your proxy server's IP or HOSTNAME and PORT!
Example:
adb shell sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db ""INSERT INTO system VALUES(99,'http_proxy','195.15.3.2:8060');""
where 195.15.3.2 is proxy server's IP, 8060 is PORT
Oleg
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Wed Nov 28, 2007 1:49 pm
Location: Ukraine

Postby congdang » Fri Dec 14, 2007 4:01 am

Oleg wrote:Your proxy server's IP or HOSTNAME and PORT!
Example:
adb shell sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db ""INSERT INTO system VALUES(99,'http_proxy','195.15.3.2:8060');""
where 195.15.3.2 is proxy server's IP, 8060 is PORT


you can tell me how connect network without proxy. i haven't proxy :(. Help me!

if i config below:
adb shell sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db ""INSERT INTO system VALUES(99,'http_proxy','127.0.0.1:8000');"" then when connect return BLANK SCREEN. :(
where 127.0.0.1 is localhost

thanks a lot!
I beging android :(
congdang
Freshman
Freshman
 
Posts: 3
Joined: Thu Dec 13, 2007 4:25 am

Postby Oleg » Fri Dec 14, 2007 8:24 am

Are you behind a firewall?
Oleg
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Wed Nov 28, 2007 1:49 pm
Location: Ukraine

Postby Ishtar » Fri Jan 25, 2008 4:45 pm

congdang wrote:you can tell me how connect network without proxy. i haven't proxy :(. Help me!


Don't send proxy settings if you connect without.. :? I doubt your localhost will forward connections from port 8000. Step 1, reinstall android (make sure to remove your userdata.img :!: ). Step 2) try to launch your emulator with your firewall off. warning this is a risk, but unlikely to get you 'killed' in a few minutes. If it does work then. Get your firewall back on and configure it not to block the emulator. If it all doesn't work, install linux, you won't need a firewall :wink:

Ishtar
Ishtar
Experienced Developer
Experienced Developer
 
Posts: 50
Joined: Wed Jan 16, 2008 10:22 pm
Location: Netherlands

Postby congdang » Sat Jan 26, 2008 3:00 am

Ishtar wrote:
congdang wrote:you can tell me how connect network without proxy. i haven't proxy :(. Help me!


Don't send proxy settings if you connect without.. :? I doubt your localhost will forward connections from port 8000. Step 1, reinstall android (make sure to remove your userdata.img :!: ). Step 2) try to launch your emulator with your firewall off. warning this is a risk, but unlikely to get you 'killed' in a few minutes. If it does work then. Get your firewall back on and configure it not to block the emulator. If it all doesn't work, install linux, you won't need a firewall :wink:

Ishtar


Thanks for you! I trying install on linux, hope it work :). Android verry cool!
congdang
Freshman
Freshman
 
Posts: 3
Joined: Thu Dec 13, 2007 4:25 am

Postby ginobiliwang » Mon Jul 07, 2008 1:25 pm

hi plusminus,
i just follow your direction by typing the following strings,

adb shell sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db ""INSERT INTO system VALUES(99,'http_proxy','10.8.59.59:8080');""

but got the error message
Syntax error: "(" unexpected

how can i deal with this error? thanks
ginobiliwang
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Jul 05, 2008 11:26 am

Postby phannguyen » Tue Jul 22, 2008 8:45 am

hi ginobiliwang,
i have same problem with u. I also got a message :
Syntax error: "(" unexpected

Are u solve it?

please help!
thanks.
PhanNguyen
phannguyen
Experienced Developer
Experienced Developer
 
Posts: 56
Joined: Thu Jul 17, 2008 7:37 am

Postby Rabbia » Wed Jul 23, 2008 10:56 am

phannguyen wrote:hi ginobiliwang,
i have same problem with u. I also got a message :
Syntax error: "(" unexpected

Are u solve it?

please help!
thanks.




Hi,
i use the following to avoid this error,it works with no error, but when i tried to open explorer then an error msg is there that is about my Port Number.i dont know what i've to do.....plzzz anyone tell me.... :?

i use this command:
D:Rabbiaandroid-sdk_m5-rc14_windowstools>adb shell sqlite3 /data/data/com.goo
gle.android.providers.settings/databases/settings.db "INSERT INTO system VALUES(
101,'http_proxy3','172.16.14.2:3132');"

Thanks
Bye
Rabbia
Freshman
Freshman
 
Posts: 8
Joined: Wed Jul 23, 2008 10:31 am

Postby Flamaker » Fri Jul 25, 2008 1:34 am

Ishtar wrote:
congdang wrote:you can tell me how connect network without proxy. i haven't proxy :(. Help me!


Don't send proxy settings if you connect without.. :? I doubt your localhost will forward connections from port 8000. Step 1, reinstall android (make sure to remove your userdata.img :!: ). Step 2) try to launch your emulator with your firewall off. warning this is a risk, but unlikely to get you 'killed' in a few minutes. If it does work then. Get your firewall back on and configure it not to block the emulator. If it all doesn't work, install linux, you won't need a firewall :wink:

Ishtar


What do you mean by step 1? Reinstall the SDK?
The reason I ask is because my emulator is not connecting to the internet, throwing a

Code: Select all
Network Error
Unknown Host


in the emulator.

I can see emulator.exe sending out packets across an open firewall connetion, but it's not receiving anything back.

I am not behind a proxy.

thanks!
Flamaker
Freshman
Freshman
 
Posts: 4
Joined: Fri Jul 25, 2008 1:28 am
Location: Adelaide

Top
Next

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests