Getting Android Sources Behind A Restrictive Proxy

I’ll have to assume you’re suffocated by both the following bottlenecks in getting the Android Open Source Project code:

  • Blocked git:// protocol and port
  • A limit on the amount you’re allowed to download

The Android sources amount to around 6GB in total, so anonymous proxy programs like Your-Freedom will choke up after a fixed time limit; and repo sync (git) does not resume downloads between projects; though you may resume from the last project you downloaded. To smoothen out the rough edges, do this:

  1. Set your git proxy using this command, replacing what’s necessary: git config –global http.proxy 10.1.8.30:8080
  2. Follow the steps here until you reach Getting The Files: this is the part that won’t work behind a restrictive proxyy.
  3. Switch to the directory where you initially ran repo init -u on the command line and then type in ls -a; you should be able to see a .repo folder. If you don’t, it means your repo init -u failed for some reason.
  4. Type in gedit .repo/manifest.xml and change line 4 to read: fetch=”https://android.git.kernel.org/”
  5. Type in gedit .repo/repo/repo and change line 5 to read: REPO_URL=’http://android.git.kernel.org/tools/repo.git’
  6. Download the modified repo script here and replace your old repo script with the modified one.
  7. Continue with Getting The Files at the Android Open Source Project website and things should be working fine.

Image Credits: Android Stickers

One response to “Getting Android Sources Behind A Restrictive Proxy

  1. doesnt seem to work.

    android@android-compiler:~$ git config –global http.proxy mydomain.net:8080
    android@android-compiler:~$ git config –get http.proxy
    mydomain.net:8080
    android@android-compiler:~$ repo init -u git://github.com/IceColdSandwich/android.git -b ics

    cp /home/android/.repo/repo/repo /home/android/bin/repo

    fatal: unable to connect to github.com:
    github.com: Name or service not known

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s