diff --git a/pdk/docs/source/download.jd b/pdk/docs/source/download.jd index 6679ebcc5..65bcc708f 100644 --- a/pdk/docs/source/download.jd +++ b/pdk/docs/source/download.jd @@ -1,305 +1,202 @@ page.title=Get Android Source Code doc.type=source @jd:body -
This document describes how to set up your local work environment, how to use Repo to get the Android files, and how to build the files on your machine.
+Related reading: +
To see snapshots and histories of the files available in the public Android repositories, visit the GitWeb web interface.
+The source is approximately 2.6GB in size. You will need 6GB free to complete the build.
To build the Android source files, you will need to use Linux or Mac OS. Building under Windows is not currently supported.
+ +The Android build is routinely tested in house on recent versions of Ubuntu (10.04 and later), but most distributions should have the required build tools available. Reports of successes or failures on other distributions are welcome.
+In general you will need: +
The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used. +
Java 6: for Gingerbread and newer +
Java 5: for Froyo and older +
To set up your development environment, install the following required packages: +
You might also want Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc.
+ +To build the Android files in a Mac OS environment, you need an Intel/x86 machine running MacOS 10.4 (Tiger), 10.5 (Leopard), or 10.6 (Snow Leopard). The Android build system and tools do not support the obsolete PowerPC architecture.
+Android must be built on a case-sensitive file system because the sources contain files that differ only in case. We recommend that you build Android on a partition that has been formatted with the journaled file system HFS+. HFS+ is required to successfully build Mac OS applications such as the Android Emulator for OS X.
+If you want to avoid partitioning/formatting your hard drive, you can use a case-sensitive disk image instead. To create the image, launch Disk Utility and select "New Image". A size of 8 GB is sufficient, or more if you prefer. Be sure to select "case sensitive, journaled" as the volume format.
+This will create a .dmg file which, once mounted, acts as a drive with the required formatting for Android development. For a disk image named "android.dmg" stored in your home directory, you can add the following to your ~/.bash_profile to mount the image when you execute "mountAndroid": +
To set up your Mac OS development environment, follow these steps: +
Edit /opt/local/etc/macports/sources.conf and a line that says
Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see Using Repo and Git.
+To install, initialize, and configure Repo, follow these steps: +
After installing Repo, set up your client to access the android source repository: +
To pull down files to your working directory from the repositories as specified in the default manifest, run +
The Android source files will be located in your working directory under their project names.
Load the following public key into your GnuPG key database. The key is used to sign annotated tags that represent releases. +
To build the files, run envsetup, lunch, and make from within your working directory: +
$ sudo apt-get install -git-core gnupg -sun-java5-jdk -flex bison gperf libsdl-dev libesd0-dev -libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev-
- -
-$ sudo apt-get install valgrind-
-
$ -sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl -sun-java5-jdk zlib1g-dev - -gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev-
There's no reason why Android cannot be built on non-Ubuntu systems. Please send any success or failure reports to android-porting@googlegroups.com -. In general you will need: -
-Anything missing from this list? Please let us know!
-Requirements: -
-Repo is a tool that makes it easier to work with Git in the context of
-Android. For more information about Repo, see Using Repo and Git
-.
What is a manifest file? -
-The Android source files are divided among a number of different repositories.
-A manifest
-file contains a mapping of where the files from these repositories will be placed within your working directory w
-hen you synchronize your files.
-
-
-----BEGIN PGP PUBLIC KEY BLOCK------
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF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ISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
If your build fails, complaining about a missing "run-java-tool", try setting the ANDROID_JAVA_HOME env var to $JAVA_HOME before making. E.g.,
-$ export ANDROID_JAVA_HOME=$JAVA_HOME
-ImportError: No module na
-med
-
-readline
-
-
-
-
Mac users getting this should install Python 2.5.2. -
-Linux users that installed Python from source, make sure the dependencies for libreadline are installed, and rebuild Python. -
-See Using Eclipse for instructions on how to use an IDE for Android platform development. To learn about reporting an issue and searching previously reported issues, see Report bugs. For information about editing the files and uploading changes to the code-review server, see Contribute.