Download and switch android

Source: Internet
Author: User

1: Download the main Android Branch

Repo init-u https://android.googlesource.com/platform/manifest

 

2: download other android branches

Repo init-u https://android.googlesource.com/platform/manifest-B android-4.0.1_r1

 

3. view the android branch version

Git -- git-Dir. repo/manifests/. Git/branch-

 

4: view the current Android version

View platform_version In the build/CORE/version_defaults.mk file.

 

5: Switch the android Branch

4.1 initialize the repo client to a branch (take android-4.0.3_r1 as an example)

Repo init-B android-4.0.3_r1

You can view the branch of the repo client in the directory. repo/manifest. xml.

4.1 SynchronizationCode

Repo sync

6: Create your own local branch

6.1 construct a local branch

Repo start myandroid4.0.3-- All: The branch name is myandroid4.0.3

6.2 check out to the branch you created

Repo checkout myandroid4.0.3Or

Repo checkout myandroid4.0.3 ORIGIN/android-4.0.3_r1

7. Download the kernel code for Android Linux

View https://android.googlesource.com/

8: how to obtain the specified version of Linux kernel

Run the following command in the download directory:

Git checkout remotes/ORIGIN/Android-2.6.29

(Take Android-2.6.29 as an example)

9: view the branches that can be switched by Repo
CD. repo/manifests
Git branch-A | cut-D/-F 3

 

Troubleshooting:

1: occurs when repo sync is executed.

Fatal: '../platform/Abi/CPP. Git' does not appear to be a git Repository
Fatal: the remote end hung up unexpectedly
Error: cannot fetch platform/Abi/CPP

------"Locate the fetch attribute in manifest. xml under the. Repo directory,ChangeFetch = "Git: // android.git.linaro.org /", Or
"Http://android.googlesource.com ".

:

 

RepoThe tool is git.Tool encapsulation. Git is used for downloading a single project, and repo is used for downloading all android source code. The usage is the same.

1: Download the main Android Branch

Repo init-u https://android.googlesource.com/platform/manifest

 

2: download other android branches

Repo init-u https://android.googlesource.com/platform/manifest-B android-4.0.1_r1

 

3. view the android branch version

Git -- git-Dir. repo/manifests/. Git/branch-

 

4: view the current Android version

View platform_version In the build/CORE/version_defaults.mk file.

 

5: Switch the android Branch

4.1 initialize the repo client to a branch (take android-4.0.3_r1 as an example)

Repo init-B android-4.0.3_r1

You can view the branch of the repo client in the directory. repo/manifest. xml.

4.1 synchronize code

Repo sync

6: Create your own local branch

6.1 construct a local branch

Repo start myandroid4.0.3-- All: The branch name is myandroid4.0.3

6.2 check out to the branch you created

Repo checkout myandroid4.0.3Or

Repo checkout myandroid4.0.3 ORIGIN/android-4.0.3_r1

7. Download the kernel code for Android Linux

View https://android.googlesource.com/

8: how to obtain the specified version of Linux kernel

Run the following command in the download directory:

Git checkout remotes/ORIGIN/Android-2.6.29

(Take Android-2.6.29 as an example)

9: view the branches that can be switched by Repo
CD. repo/manifests
Git branch-A | cut-D/-F 3

 

Troubleshooting:

1: occurs when repo sync is executed.

Fatal: '../platform/Abi/CPP. Git' does not appear to be a git Repository
Fatal: the remote end hung up unexpectedly
Error: cannot fetch platform/Abi/CPP

------"Locate the fetch attribute in manifest. xml under the. Repo directory,ChangeFetch = "Git: // android.git.linaro.org /", Or
"Http://android.googlesource.com ".

:

 

RepoThe tool is git.Tool encapsulation. Git is used for downloading a single project, and repo is used for downloading all android source code. The usage is the same.

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.