Compile Android source code in Ubuntu9.04

Source: Internet
Author: User
The official version has always been used, and you have to compile your own flash. First, download. The Android source code is hosted on the LinuxKernel source code site, so the version tool is git. For more information about how to use and install git, see my other article "Install Git on UbuntuServer". Create a directory for storing Andorid and create a bin directory in it. MkdirAndroidcdAndroidmkdirbincdbincu

The official version has always been used, and you have to compile your own flash.

First, download the Android source code, which is hosted on the Linux Kernel source code site, so the version tool is git. For more information about how to use and install git, see another article "Install Git on Ubuntu Server".

Create a directory for storing Andorid and create a bin directory in it.

Mkdir Android

Cd Android

Mkdir bin

Cd bin

Curl http://android.git.kernel.org/repo> repo

Sudo chmod a + x repo

Then, create a directory for saving the source code in the Android directory. My name is douandroid.

Mkdir douandroid

Cd douandroid

../Bin/repo init-u git: // android.git.kernel.org/platform/manifest.git

After the settings are complete, start to synchronize the code

../Bin/repo sync

After synchronization, set the environment variables and add JAVA_HOME and ANDROID_JAVA_HOME. You can add the following two lines to the. bashrc file:

Export JAVA_HOME =/usr/lib/jvm/java-6-sun-1.6.0.13
Export ANDROID_JAVA_HOME = $ JAVA_HOME

Restart Terminal.

Install some additional packages

Gcc g ++ flex bison gperf libsdl-dev libesd0-dev libwxgtk2.8-dev build-essential zip valgrind sun-java6-jdk zlib1g-dev libncurses5-dev

Finally, go to the source directory and execute make.

 

This article comes from:Http://blog.douhua.im/2009/06/08/Ubuntu-904-compile-android-source/

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.