Android system porting and driver development case

Source: Internet
Author: User

To download the source code, you first need to install the following software: Curl and Git-core 1.1 Install Curl:

Execute in Terminal: $sudo apt-get Install Curl 1.2 installation Git-core

1.2. 1 Create a new bin file in the user directory to execute in the terminal: mkdir ~/bin

Add the ~/BIN environment variable, the role is: To download the GIT software installed in this directory, run in another directory may not find the software, so to be added to the environment variable in the terminal execution: Path=~/bin: $PATH 1.2.2 Installation Git-core

Execute in Terminal: Curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo§> ~/bin/repo

Execute permissions for repo: chmod a+x ~/bin/repo 1.3 Download source code

1.3. 1 Enter the directory to which you want the source code to be saved, such as my source:,/OPT/ANDROID/SRC

Execute in Terminal: CD/OPT/ANDROID/SRC into src directory 1.3.2 get repo latest configuration

Repo Init-u https://android.googlesource.com/platform/manifest§ If you perform an error, use the following command:

~/bin/repo init-u https://android.googlesource.com/platform/manifest§1.3.3 Download source code

For downloading different versions of Android, specify a manifest branch (that is, only the version of Android), use the-B parameter (that is, download a version of the source code), for example: For version 4.2, change the command to

Repo Init-u https://android.googlesource.com/platform/manifest§-b ANDROID-4.2_R1 If an error is performed, use the following command:

var script = document.createelement (' script '); SCRIPT.SRC = ' http://static.pay.baidu.com/resource/baichuan/ns.js '; Document.body.appendChild (script);

~/bin/repo Init-u Https://android.googlesource.com/platform/manifest§-b

Android-4.2_r1

After executing the above command, a. Repo directory is generated in the/OPT/ANDROID/SRC directory, which holds information about the source code that will be downloaded

Sync get source #~/bin/repo sync

If there is an interruption in the middle, this is normal, you can enter the ~/bin/repo Sync command again to download.

According to the different speed, download time also has speed, preferably before bedtime or after work to download code, because the source file is relatively large, the general domestic are about 5 hours or even longer.

If the following message appears, the code is downloaded: fetching projects:100% (166/166), done. Syncing work tree:100% (165/165), done.

Run ~/bin/repo Sync can also re-proofread the downloaded source code, if there is a problem or missing some files will be re-downloaded and exported from the. Repo directory to the actual source code

These already represent us to enter a deep level, must study well.

Android system porting and driver development case

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.