Android Deep Exploration Fourth chapter experience

Source: Internet
Author: User
Tags using git

This chapter focuses on using Git to download two sets of source code. One set is the Android source code, the other is the Linux kernel source code. This article mainly describes how to download and compile Android source code and Linux kernel source code.

Android source code contains many things, such as the source code embedded in the Android system built-in application, the source code of the various tools with the Android SDK and the HAL source.

1. Configure the Android source code download environment to execute a series of commands on the Linux terminal:

First step: Create a directory to hold the download script file (repo) (You can place the script file in any directory where you use ~/bin)

# mkdir ~/bin

# PATH = ~/bin: $PATH

Step two: Download the repo script file

Step three: Create a directory to hold the Android source code (can be placed in another directory)

# mkdir Android_source

# CD Android_source

Fourth Step: Initialize

Fifth step: Start downloading Android source code

# Repo Aync

If you want to back up your Android source code, it's best not to put the repository (. git directory), or the Repo Sync command will re-download the entire Android source code. If you rely on the repository, performing the Repo sync command will only download the change section.

Parsing of 2.android Source code directory

Compiling Android Source code:

First step: Initializing the compilation environment

Step two: Select a directory

Step three: compiling Android source code

# make

# MAKE-J4

Android source code contains embedded in the Android system of the application source code, the Android SDK with the various tools of the source, the Android NDK code, the HAL source.

Android Deep Exploration Fourth chapter experience

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.