Android Deep Exploration Experience (iv)

Source: Internet
Author: User

The main learning in this chapter is to download, compile, and test the Android source code. The second is to learn to download and compile the Linux kernel source code.

The first is to compile the Android source code, because the Android source code in every project directory has the android.mk file, so when compiling the entire Android source code will recursively call each project directory in the Android.mk file to compile the current project.

The compile steps are as follows:

1. Perform any one of the two commands on the Linux terminal

#source build/envsetup.sh

#.build/envsetup.sh

2. The utility Lunch command sets the compilation target. The following command sets the compile target to Full-eng, which means that for all mobile devices, the Android emulator is active and all debugging options are turned on (output debugging information in the Logcat view).

3. Compiling Android Source code

Compile the Android source code by executing the following command.

#make

#make –j4

For downloading and compiling the Linux kernel source code, execute the following command to download the latest Linux kernel source code

#git Clone Https://android.googlesource.com/kernel/common.git

Executing the above command may take a long time to download the Linux kernel. After downloading, in the current directory there will be a common directory, after entering the directory, execute the following command to see which remote Repository is currently available.

Android Deep Exploration Experience (iv)

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.