在 Windows 平台下載 Android source 的方式

1. 安裝 cygwin
若是 "Install from Internet" 常會遇到網路連線問題. 可先選 "Download Without Installing", 第二次再選 "Install from Local Directory".
在 Select Packages 時勾選:
Devel 下的 git
Net 下的 curl
Python 下的 python
2. 下載 repo 工具
3. 建立欲存放 Android source 的目錄
4. 設定 git
5. 初始化 repo
~/bin/repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.1_r1
6. 開始下載 Android source
~/bin/repo sync

參考資料:
https://source.android.com/source/downloading.html