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.