Android source code compilation--Download

Source: Internet
Author: User

It's been a long time since the source code, really slow ha. I really hope that a company in the country can open the mirror.

Not much to say, the first is the system environment, my system is Ubuntu 64-bit system (14.04), version should be nothing.

Required libraries

Git: Nothing to say, sudo apt-get install Git-core GnuPG

JDK: This is also necessary, need 1.6 version, Java after Oracle download also need account ... Or a cloud inventory?

Http://pan.baidu.com/s/1ntuR9lJ

Easy to install, unzip the copy just fine

1 chmod a+x jdk-[version]-linux-i586.bin  // Change Permissions executable 2sudo// Unzip, then have a jdk-[version] folder 3 sudo MV jak-[verrsion]/USR/LIB/JVM  // put to Ubuntu default directory, no on mkdir

Environment variables, edit ~/.BASHRC file (Vim ~/.BASHRC), add:

# for Javaexport java_home LN -s/user/lib/jvm/jdk-[version]/user/lib/jvm/default-java manufacturing Soft Connect export CLASSPATH=${java_home}/ libexport PATH=${java_home}/bin: $PATH

Other dependent packages:

sudo Install Flex Bison gperf Libsdl-dev libesd0-dev libwxgtk2. 6 Zip Curl Valgrind

All right, the environment is ready. You can start downloading the source code.

Download source code

First of all have to get a repo, in China this is more troublesome, did not turn over the wall to appoint it, in https://android.googlesource.com/'s Tools/repo directory, here is accompanied by a copy.

Http://pan.baidu.com/s/1ntiGtNb

On the Web page affixed to do not follow the paste, check the signature string has a carriage return is more depressed.

Repo this thing is actually a shell script, encapsulated the function of git, without this thing, you have experience with git one directory, I also do not block.

Since it's a shell script, first let him run: chmod a+x repo

Then, you have to find a directory to put the source code, here is the Android good, mkdir Android

CD in, CD Android

Run

Repo init-u https://android.googlesource.com/platform/manifest  #repo是上面可运行的shell脚本
Repo Sync

Init can add--mirror parameters to the warehouse mirror down, so that you can once and for all the next download without waiting for Google. Run repo sync at the end to sync.

If you follow the above to mirror the warehouse, then download the source code can be

Repo Init-u [Your mirrored path]/platform/sync

Synchronize the code from the local warehouse.

Of course, the above init command is to download the branch being developed on the main line, which is more unstable, so you can select the branch with the-b parameter, such as:

Repo init-u https://android.googlesource.com/platform/manifest-  b android-4.0.4_r1sync 

Domestic network to swing down through the wall and wait, I do not have server resources for everyone to download, after all, an image of 34 g, can't carry ing.

Related Article

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.