Thursday 29 September 2016

Downloading Android Source Code on Windows Using Cygwin & Repo

I am working on some Android camera stuff for a new project.
I need access to the Android source code. (AOSP)
Thankfully it is open source and easily available.
However, to get the code it is not simply a case of doing git clone...

Because Google are massive and have a lot of source code, they have created their own tool to sit on top of git called 'Repo'.

The instructions for downloading the source using Repo are here

They are pretty good instructions but I had a few issues.
I am using Windows so I loaded up Cygwin.

My installation was fresh and so only had the default 'base' packages.
I discovered that I was missing dependencies required for Repo.


  • Git (under 'devel' category)
  • Python (under 'devel' category)
  • Curl (under 'net' category)

  • You have to run Cygwin setup again in order to add new packages (there is no apt-get).

    I am posting this purely because the errors I received were not helpful.
    I received this when running 'Repo sync' AFTER successfully installing Repo.

    error: command 'sync' requires repo to be installed first.
             Use "repo init" to install it here.
    WTF? First time using Repo it was a bit confusing.

    It was a bit of common sense that sorted this out in the end, but you know, sometimes that takes a while to turn up.








    No comments:

    Post a Comment