Android source code compilation-download, android source code compilation

Source: Internet
Author: User

Android source code compilation-download, android source code compilation

For a long time, the source code is really slow. I really hope some Chinese companies can open up their images.

Not to mention, the first is the system environment. My system is a 64-bit Ubuntu System (14.04), and the version should be nothing.

Required Library

Git: It's okay, sudo apt-get install git-core gnupg

JDK: This is also required. version 1.6 is required. If Java is set to Oracle, the account is required for downloading it... Save a copy of the cloud disk.

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

It is easy to install and copy the package.

1 chmod a + x jdk-[version]-linux-i586.bin // change permission to execute 2 sudo-s. /jdk-[version]-linux-i586.bin // unzip, there is a jdk-[version] folder 3 sudo mv jak-[verrsion]/usr/lib/jvm // put it in the default Ubuntu directory, mkdir is not available

Environment variable, edit ~ /. Bashrc file (vim ~ /. Bashrc), add:

# For Javaexport JAVA_HOME =/usr/lib/jvm/default-java # your own style, use sudo ln-s/user/lib/jvm/jdk-[version]/user/lib/jvm/default-java to create a soft connection export CLASSPATH =$ {JAVA_HOME}/libexport PATH = $ {JAVA_HOME}/bin: $ PATH

Other dependent packages:

sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl valgrind

Okay, now that the environment is ready, you can download the source code.

Download source code

First of all have to make a repo, in china this is more troublesome, did not flip the wall to appoint it, in the https://android.googlesource.com/tools/repo directory, here also comes with a copy.

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

Do not paste the content on the web page. It is depressing to check that there is a carriage return in the signature string.

The repo is actually a shell script that encapsulates the functions of git. Without this stuff, I won't stop you from using git directories one by one.

Since it is a shell script, first let it run: chmod a + x repo

 

Then, you have to find a directory to put the source code. Here we will use Android. mkdir Android

Cd, cd Android

Run

Repo init-u https://android.googlesource.com/platform/manifest # repo is the shell script that runs above
Repo sync

During init, you can add the -- mirror parameter to the repository image so that you can download the image once and for all without waiting for google. Finally, you can run repo sync to synchronize data.

If you use the repository image as shown above, you can download the source code later.

Repo init-u [path of your image]/platform/manifest. git repo sync

Synchronize code from the local repository.

Of course, the above init command is to download the branch being developed on the main line, which is relatively unstable, so you can add the-B parameter to select the branch, such:

repo init -u https://android.googlesource.com/platform/manifest  -b android-4.0.4_r1repo sync

 

The domestic network has to go through the wall and wait for a long time. I have no server resources for you to download. After all, an image of GB cannot help ing.


Download the source code and compile an Android system that can be used on a mobile phone?

Android developer phone (now Nexus One) can download the source code from the google website, for other mobile phones, go to the developer Platform website of the mobile phone manufacturer to check whether the source code exists. Because each camera has its corresponding BSP, these must be provided by the vendor.

How to compile the android 44 System with the source code of a mobile phone?

Code compilation...
I'm afraid this is not something that can be easily understood here...
First, download the android 4.4 kernel,
Then compile the manufacturer's mobile phone source code,
Write the script on your own,
Many of them are very technical.
Can lz hold it?

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.