Today I was trying to download and install additional SDK R5 components from Internet using the Android SDK and AVD Manager tool. Initially, the download was continuously failed, because, my system is behind a Proxy, which need an authentication. Android SDK and AVD Manager does not provide any option in the proxy settings, to include the proxy authentication (user name and password) details.
So I decided to run my own proxy server locally and configure it to talk to the parent (original) proxy server with authentication detail. Initially, I decided NOT to run the heavy weight proxy Squid and selected TinyProxy for this purpose. But TinyProxy not supported the Authentication feature. So finally ended up running Squid proxy with following configurations:# Listen only local interface
# Parent proxy (192.168.1.253:8080) and Authentication settings
http_port 127.0.0.1:3128
cache_peer 192.168.1.253 parent 8080 0 no-query default login=User:Passwd # No direct access
never_direct allow all
After restarting the Squid, I changed the proxy settings of Android SDK and AVD Manager to:
Proxy: 127.0.0.1
Port: 3128
After this, restarted it. Now the additional components are successfully downloaded.
Where can I get my hands on Squid for Windows?
Hi Victor, Check this link: http://wiki.squid-cache.org/KnowledgeBase/Windows/
OK, I got it, but after configuring it, I still get Authentication Failed on the android SDK. Any ideas? Maybe post the whole config file for squid?
From the browser, Is it possible for you to goto Internet using the User:Passwd, which is mentioned in squid conf file.
After much messing around, I managed to get this working really easily.Edit android.bat, and in the call to java.exe, insert the following parameters VM parameters before -jar-Dhttp.proxyUsername="username" -Dhttp.proxyPassword="password"Note that there’s no space between D and http. You still need to put in the host/port in the settings.
!!!Thank you Shane! Turns out, for the Linux SDK, it’s the very last line of the "tools/android" that these settings belong in.It was a super easy thing to patch… I should probably make those two fields available as command-line options to "android" and see if Google is interested in that feature. It is certainly the best way to make the updater useful behind an authenticated web proxy.
I’m also behind a proxy but we use automatic proxy configuration url. Any idea on how to configure android.bat to use the conf url? thanks!
I am also behind the scripted proxy. Does squid handle that kind of proxy?
Hi, I just moved into Android 2.2 and the problem was solved. Also let me tell you that in my company have 2 proxies and 1 scripted proxy. I tried with one of the proxies and it didn’t work and with the other worked perfectly. I would recommend to talk with your tech support and see what options they have for you. BTW according to google support proxy definitively doesnt work in 2.1.
For non technical people here is a step by step guide on how to set up proxy in Android http://android-proxy.blogspot.com/
Shane, can you mail or paste your modified android.bat file here
im using your freedom for bypassing the proxy and the installation runs fine but it stops at 93%, i dont know if its a problem just on my connection. u can try it to if it works for u all.
Start Manager and set proxy name and port in "settings" tab.Don’t put "HTTP" before proxy name.Edit android.bat file and change the lines before SetPath:rem Finally exec the java program and end here.call %java_exe% -Dcom.android.sdkmanager.toolsdir="%tools_dir%" -Dcom.android.sdkmanager.workdir=%work_dir% -Dhttp.proxyUsername="DOMAINUSER" -Dhttp.proxyPassword="PASSWORD" -classpath "%jar_path%;%swt_path%swt.jar" com.android.sdkmanager.Main %* PIETRO
I can confirm Pietro’s solution worked for me
You can find file: androidtool.cfg on c:Documents and SettingsYOU USER NAME.androidand you add line "http.proxyLogin=USER@PASSWORD" and save the file and try open ANDROID SDKTaranttini – http://www.taranttini.com
installing a squid was a convenient solution.. thank you.was struggling a lot with it..
pietro’s solution worked for me as well.
Thank you Tarantini(of course for linux its in ~/.android/androidtool.cfg)it work 🙂
install ccproxy on vmware,set your ip and u r ready 2 go
Thank you Pietro! Your solution worked flawlessly.
I tried a lot but can not be able to solve this problem I am in a college where proxy server is running with user name and password authorization pls send me a modified android.bat file at this e-mail address trnkumar32@gmail.com pls sir thanks in advance
http://allaboutandroid-frombasictoadvance.blogspot.com/ chk out dis ..no need to do all above stuff
Hello. I installed CCProxy on windows, then i was able to setup upper level proxy, and everything works like charm.
I have the same issue, after install eclipse works just find…. with eclipse you can provide user and pass word for your proxy. Then download ADT Plugin for Eclipse.Now you are able to work.RegardsMario Bedeschi
@ Pietro @Dan @sc @Droid I am not sure but I think you meant AFTER ":SetPath" because what’s before it is not identical with the lines you provided. I assumed it is After, and now the end of my .bat file looks like this (after replacing the original lines that come after SetPath with the ones U suggested):_________________:SetPathrem Finally exec the java program and end here.call %java_exe% -Dcom.android.sdkmanager.toolsdir="%tools_dir%" -Dcom.android.sdkmanager.workdir=%work_dir% -Dhttp.proxyUsername="XXXXXX" -Dhttp.proxyPassword="XXXXXX" -classpath "%jar_path%;%swt_path%swt.jar" com.android.sdkmanager.Main %*rem EOF__________________Yet this gives me "access is denied". Questino is, after Dhttp.proxyUsername should I only input the username, or the domain followed by the username? In what format should that be? Thanx
Thanks, thanks, thanks, thanks, and thanks from Brazil