The first step: install macports This I do not narrate, there are countless tutorials on the internet
Step Two: Create a disk image
1. Open the Disk utility and then:
Step Three: Install the build environment using Macport
1. Open terminal to enter the following content
sudo port install gmake libsdl git-core GnuPG
2. Installation is complete without error
Fourth Step: Install and configure repo
1. Create a bin folder in the user directory
mkdir ~/bin$path=~/bin: $PATH
2. Download Repo
Curl Https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
3. Modify Repo Permissions
chmod a+x ~/bin/repo
Fifth step: Mount Android image
Sixth step: Get the Android source branch and download
Cd/volumes/androidmkdir WORKINGSPACECD Workingspacerepo init-u https://android.googlesource.com/platform/ Manifestrepo init-u https://android.googlesource.com/platform/manifest-b Android-4.4.2_r1
Seventh step: Modify the. Repo folder under the Manifest.xml file
Vim. Repo/manifest.xml
Eighth step: Find the Fetch project and ".." Instead: "Git://android.git.linaro.org"
Nineth Step: Pull the source code
Repo Sync
Tenth step: No.
Green color PS: Because of GFW harmony, before doing the above operation, please first cross the wall
MacOS10.9 get Android Source not fully notes (2014)