Obtain the android source code

Source: Internet
Author: User

Obtain the android source code

Where is the source code?
You can access the andorid source code repository through http://android.git.kernel.org.
The source code is about 2.1 GB. You need 6 GB of space to build the entire source code.

Build a PC Build Environment
Linux (Ubuntu is recommended)
Required software packages for Ubuntu Linux 32-bit x86 machine:
. Git 1.5.4 or newer
. Jdk5.0/jdk6.0 (in fact, both versions can be used currently. Check the build/CORE/Main. mk file)
. Flex, Bison, gperf, libsdl-Dev, libesd0-dev, libwxgtk2.6-Dev (optional), build-essential, zip, curl
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

You may need to install valgrind to monitor memory leakage: sudo apt-Get install valgrind
Ubuntu 8.10 users may need to install the libreadline New Version: sudo apt-Get install lib32readline5-dev

Install Repo
Repo is a script used to manage the android source code based on the GIT tool.
Install repo:
$ Cd ~
$ Mkdir Bin
$ Echo $ path
$ Curl http://android.git.kernel.org/repo> ~ /Bin/Repo
$ Chmod A + x ~ /Bin/Repo

Initialize the repo client (that is, download the latest Android source code)
$ Mkdir mydroid
$ CD mydroid
$ Repo init-u git: // android.git.kernel.org/platform/manifest.git
Or
$ Repo init-u git: // android.git.kernel.org/platform/manifest.git-B froyo (get froyo Branch)
$ Repo sync

Repo will prompt you to enter your name and mail address. If you want to submit your code, you 'd better enter a mail associated with your Google account.
What is the manifest file? Because there are many repositories and branches of the android source code, the manifest file is a guiding file for synchronizing the android source code to your local machine, it tells you which repositories or branches are remotely obtained based on the source code of your specified branch.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.