http://source.android.com Step 1. Configure the Android build environment according to Http://source.android.com/source/initializing.html
http://source.android.com/source/downloading.html configuration good repo, approximate steps are as follows$ mkdir ~/bin$ Path=~/bin: $PATH$ curl Https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo$ chmod a+x ~/bin/repo$ mkdir working_directory$ CD Working_directoryThe above command is no longer explained, very simple and clear. SETP 3. Get source code from another image if you want to download the latest source code, execute: $ repo init-u git://git.omapzoom.org/platform/manifestIf you want to get each tag, such as 2.3.5, you can do it:$ repo init-u git://git.omapzoom.org/platform/manifest-b android-2.3.5_r1 If you do not know the specific tag name, then you can visit http://git.omapzoom.org in the browser, and click on the /platform/manifest link above, then you can see all the tag name. During the execution of the repo init process, you may need to fill in some personal information directly. After configuring repo, perform repo sync to download the source code you need.
Error downloading code
[HTML]View Plaincopy
- error:failed to connect to 2404:6800:4005:c00::52:network are unreachable while accessing https://android.googlesource.c Om/mirror/manifest/info/refs
- Fatal:http request failed
Workaround
1. Browser login Https://android.googlesource.com/new-password and login with Gmail account;
2. Click "Allow access" on the page to get a similar
- Machine android.googlesource.com login git-jacky.rg4.net password 1/dkrigevvc8o8pgg-gsm2abmns_32-u0pf0_vwkyogia
- Machine android-review.googlesource.com login git-jacky.rg4.net password 1/dkrigevvc8o8pgg-gsm2abmns_32-u0pf0_ Vwkyogia
3. Append the above information to the end of the ~/.netrc file (check the permissions of the current user, or create a new one yourself if the file does not exist);
4. The URI is changed to Https://android.googlesource.com/a/platform/manifest ("/A" is added to the middle).
5. Repo Init-u https://android.googlesource.com/a/platform/manifest-b ANDROID-4.0.3_R1
6. Repo Sync
You can pull down the Android source code.
The official argument is that because access is largely anonymous, there is a certain limit to the number of connections to the same IP address in order to prevent too many connections (referred to as intranet/VM). It seems to be certified with a Gmail account.
In this case, you will often encounter this problem if you download it within the corporate network or with a virtual machine.
Source Code Guide website: http://source.android.com/source/downloading.html
View Android Source version
[Plain]View Plaincopy
- $ grep platform_version build/core/version_defaults.mk
- # platform_version
- # Platform_version_codename
- Ifeq "" "$ (platform_version)"
- Platform_version: = 4.1.2
- # SDK Version The branch is based on and Platform_version_codename holds
- Ifeq "" "$ (platform_version_codename)"
- Platform_version_codename: = REL
- Ifeq "REL" "$ (platform_version_codename)"
- DEFAULT_APP_TARGET_SDK: = $ (Platform_version_codename)
Automatic repo sync to continue downloading Android source code when disconnected from the network
Symptom analysis: In the Android source code download, often will break off, at this time, you have to re-enter repo sync, then, is there a way to automatically repo sync when the network is broken?
Solution:
VI repo_sync.sh
#!/bin/bash
Repo Sync
While [$?-ne 0]
Do
Repo Sync
Done
ubuntu10.04 amd64 git version upgrade, error:exited sync due to GC errors
[Plain]View Plaincopy
- ubuntu10.04 appears error:exited sync due to gc Errors workaround
-
- error: exited sync due to gc errors workaround
-
-
-
- upgrade git to 1.7.2 and above, upgrade method
-
- increase ppa
- sudo apt-add-repository& nbsp;ppa:git-core/ppa
- sudo apt-get update
- sudo apt-get install git
-    
- If you have already installed git locally, you can use the Upgrade command:    
- SUDO APT-GET DIST-UPGRADE  
Download Android source code