Android Deep Explore fourth Chapter

Source: Internet
Author: User

This chapter learns the compilation and download of source code.

Android source code includes many things, such as embedded in android app (photo, calculator, calendar, etc.) Source:android SDK With a variety of tools.

First things to do configure the android source code Download Environment

1 Create a directory to hold the download script file

2 Download repo script file

3 Creating a directory to hold android source code

4 Initialization

5 start Download android source code

Android Source directory structure resolution, in addition to the makefile file, the rest of the directory, these directories have saved the android source code of different sub-projects, The meaning of each sub-item can be found through the list of books. If only one part of the source code is needed, it is simple to understand the source directory structure and download any part we want.

You can download subdirectories in one of two ways

1 using the repo sync command

2 using the get clone command

Since each project in the source code has a android.mk file, the files for each project directory are recursively called to compile the current project when compiling the entire Android source code. The steps are as follows:

1 initializing the compilation environment

2 Selecting a target

3 compiling android source code

The Out directory is the default directory that contains the target files generated by the compiled Android source code, which has only two subdirectories. Host is primarily some of the libraries and tools needed during the compilation process,andtargrt contains the java that the program needs to run Libraries and the files to be used by the final target

Then is to download and compile the Linux kernel source code, the meaning of the various directories are also on the book, and then the Ubuntu Linux compiled Linux the cross-compiler required by the kernel is as follows:

1 Preparatory work

2 unzip the compiler

3 Verifying that the compiler is successful

4 Installing libncurses5

Android porting is primarily a porting of the Linux kernel, while the kernel porting the primary Linux driver. So in order to test and develop Linux drivers, two sets of development environments need to be installed: The Android application development environment and the Linux kernel development environment.

My Blog Park address

http://www.cnblogs.com/liang0202/

Android Deep Explore fourth Chapter

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.