The XDAndroid Project is no longer active.
This site provides archived information from while the project was under development. Some links may no longer function.

Difference between revisions of "Getting the Source"

From The XDAndroid Project
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Line 47: Line 47:
  
 
<source lang="bash">
 
<source lang="bash">
$ repo -init -u git://gitorious.org/xdandroid-eclair/manifest.git
+
$ repo -init -u git://gitorious.org/xdandroid-eclair/manifest.git -b eclair
 
</source>
 
</source>
  

Revision as of 23:48, 22 May 2010

XDAndroid is based on the Android open-source project (AOSP). AOSP is separated into many individual repositories for Android programs, frameworks and utilities. The AOSP source tree also includes third-party open-source libraries and programs, used by the Android system to perform various tasks. For all of these repositories, a utility called repo manages the logistics of checking out, updating and modifying the sources.

The following documentation is based highly on the standard AOSP source checkout procedures.

Prerequisites

Building an AOSP source tree requires that several programs and development packages already be installed on the build host. Please check that your system has all of the following packages installed. The procedures for installing required packages varies based on the Linux distribution used on the build host.

  • Git (revision control system), version 1.5.4 or higher
  • Common source-building utilities: automake, GCC, etc. (the build-essential package on Debian/Ubuntu)
  • GNU Privacy Guard (gnupg or gpg)
  • Java Development Kit (JDK) 5.0 series, update 12 or higher. JDK 6.0 and higher is not yet supported
  • flex, a lexical analyzer
  • bison, a parser generator
  • gperf, a hash function generator
  • libsdl and its development files
  • esound (libesd0) and its development files
  • WxWidgets GTK 2.6 (libwxgtk2.6) and its development files
  • zip, a Zip-archive program
  • curl, an HTTP (and others) client and library

If multiple versions of Java JREs or JDKs are available, the system must be configured to use JDK-5 by default. On Debian/Ubuntu systems, this can be done via sudo update-java-alternatives -sjava-1.5.0-sun.

The build host will also need at least 1.5GiB of RAM and 10GiB of disk space for the Android build. The initial checkout of the source tree will require up to 2GiB of disk space.

Installing repo

It is recommended that repo be installed in a normal user's ~/bin directory.

$ mkdir ~/bin
$ curl http://android.git.kernel.org/repo~/bin/repo
$ chmod +x ~/bin/repo
$ export PATH="${PATH}:~/bin"

Initialize repo And Check Out the Source

The XDAndroid project maintains its own manifest for the repo program. This manifest contains a list of all repositories that repo must clone. The XDAndroid manifest directs repo to download variants of certain pieces of AOSP that require modifications for our devices.

The following examples assume you will be checking out the source tree into the directory ~/xdandroid.

$ mkdir ~/xdandroid
$ cd ~/xdandroid
$ repo init -u git://gitorious.org/xdandroid-eclair/manifest.git
$ repo sync

Your tree can be initialized to track a specific branch by adding -b <branch_name> to the end of the repo init command. For example, to grab the eclair source tree, which will then not be forwarded to froyo (and any subsequent releases), the following repo init command would be used:

$ repo -init -u git://gitorious.org/xdandroid-eclair/manifest.git -b eclair

Without a -b <branch_name> argument, the repositories will track the HEAD branch, which will always be the latest released AOSP tree.

Wait quite a while and your XDAndroid source tree will be checked out. This will download up to 2GiB of data, so it may take a long time depending on your Internet connection's capacity, or traffic to the source repository servers, etc.