Home Tutorials Training Consulting Products Books Company Donate Contact us









Online training

Events

Quick links

Share

Lars Vogel (c) 2009, 2016 vogella GmbH Version 0.6, 05.07.2016

How to compile the Android source code. This article contains a few pointers to get the Android source code and to compile the Android source code. It also looks how to download the source code for the Android Developer Tools (which are Eclipse plugins). The description is based on Ubuntu.

1. Getting the Android source code

To get the Android source code you need to use two tools, Git and an additional tool called repo.

2. Installation of the required tools

Install the Git command line tool. See Git tutorial for an introduction into Git and its installation.

You also need to install an additional tool called repo. Execute the following commands for this.

# assumes that you have a local directory called bin
# in your home folder

# download the tool from Google
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

# make it executable
chmod a+x ~/bin/repo

3. Cloning Android source code

After you installed the repo tool you can get the Android source code with the following command.

// To get the current master
repo init -u git://android.git.kernel.org/platform/manifest.git ; repo sync ;

The command "git branch -a" show you all available branches, e.g. froyo and gingerbread. You can checkout them via "git checkout branch_name".

To compile the code run the following command.

make

4. The Android Development Tools (ADT)

4.1. ADT tools

The Android Development Tools (ADT) project provide Eclipse and IntellJ based tooling to development Android applications.

Unfortunately the ADT team were not available for an interview. Most of documentation of the tooling can be found under: http://tools.android.com/ - Tool project side.

4.2. Contributing to the ADT project

The contribution process to ADT is based on Gerrit but uses another tool called repo. The contribution process is described here: http://tools.android.com/contributing - Contributing to ADT.

4.3. Building the tools

How to build the Eclipse based ADT tooling is described in the following page: http://tools.android.com/build/eclipse - Building ADT.

5. Android Resources

6. vogella training and consulting support

Copyright © 2012-2018 vogella GmbH. Free use of the software examples is granted under the terms of the Eclipse Public License 2.0. This tutorial is published under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Germany license.