Last active
August 29, 2015 14:00
-
-
Save danhantao/112f9a9d7a5988477c78 to your computer and use it in GitHub Desktop.
android源码
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://source.android.com/source/downloading.html | |
# 4.4.2 http://blog.csdn.net/zeroboundary/article/details/17555183 | |
# android api | |
# Platform Version API Level | |
# http://developer.android.com/guide/topics/manifest/uses-sdk-element.html | |
**************************************************************************************************************************** | |
# 解压sample.tar.xz | |
xz -d sample.tar.xz | |
tar -xvf sample.tar | |
# curl tools | |
sudo apt-get install curl | |
sudo apt-get install git-core | |
# http://source.android.com/source/using-repo.html | |
# Installing Repo | |
# Make sure you have a bin/ directory in your home directory and that it is included in your path: | |
$ mkdir ~/bin | |
$ PATH=~/bin:$PATH | |
# .profile | |
$ export PATH=$HOME/bin:$PATH | |
# Download the Repo tool and ensure that it is executable: | |
$ curl http://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo | |
$ chmod a+x ~/bin/repo | |
$ mkdir -p android/kitkat_4.4 | |
$ sudo chmod a+x android/kitkat_4.4 | |
$ hosts smarthosts | |
74.125.31.82 www.googlesource.com | |
74.125.31.82 android.googlesource.com | |
203.208.46.172 cache.pack.google.com | |
59.24.3.173 cache.pack.google.com | |
# https://android.googlesource.com/platform/manifest/+refs | |
$ repo init -u https://android.googlesource.com/platform/manifest | |
$ repo init --mirror -u https://android.googlesource.com/platform/manifest | |
# download.sh 放入当前目录下 | |
#! /bin/bash | |
echo "=====start repo sync======" | |
repo sync | |
while [ $? = 1 ]; do | |
echo "======sync failed, re-sync again======" | |
sleep 3 | |
repo sync | |
done | |
$ chomd a+x download.sh | |
# http://stackoverflow.com/questions/5012163/how-to-discard-changes-using-repo | |
repo forall -vc "git reset --hard" | |
# http://grokbase.com/t/gg/android-building/1338y9ftd6/repo-sync-and-deleted-modified-files | |
repo forall -c 'git reset --hard ; git clean -fdx' | |
# discard all | |
rm -rf * # remove all | |
repo sync -l # repo sync no network | |
# build | |
#sudo apt-get autoclean | |
#sudo apt-get clean | |
#sudo apt-get autoremove | |
****************************************************************************************************************************** | |
# http://blog.csdn.net/tjd0227/article/details/5640418 # android repo/git server | |
# http://blog.csdn.net/leopard_ray/article/details/4306987 # 架设git服务器--使用git-daemon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://blog.csdn.net/rig622/article/details/8027182