1、設置軟件源
apt-get install <packagename> 無法使用的解決辦法( Ubuntu 出現apt-get: Package has no installation candidate問題)
# apt-get update
# apt-get upgrade
# apt-get install <packagename>
添加第三方地址:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
2、安裝git-core、curl
3、下載repo
$curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo >repo
$chmod 777 repo
4、申請下載的帳號和密碼
https://android.googlesource.com/new-password
5、把上面那段信息追加到~/.netrc文件結尾(請檢查當前用戶的權限, 如果不存在此文件則自己新建一個),一定要放在當前用戶的home目錄下,root要放到root的home目錄下
6、repo init -u https://android.googlesource.com/a/platform/manifest -b android-2.3.3_r1
7、輸入以下內容,這是爲了解決repo sync 下載到99%的時候無反應的情況。
$sudo sysctl -w net.ipv4.tcp_window_scaling=0
8、repo sync