赞
踩
Downloading the Source
http://source.android.com/source/downloading.html#getting-the-files
http://danny-chiu.iteye.com/blog/378770
在Windows系统下下周Android系统的源代码
1、首先在Windows上安装Linux环境:Cygwin
Cygwin的主页:http://www.cygwin.com/install.html
下载32位windows上的安装程序:setup-x86.exe
注意:这个安装程序只是个安装管理程序,真正的系统包需要从网上下载,大致有几百M,在国内下需要很长时间。
好在国内有4个镜像网站:
可是依然很慢,所以在安装时先安装最基本的包
gcc,make在Dlevel中
2、在Cygwin中配置repo
2.1 安装repo前需要先安装curl
使用cygwin安装程序,手动安装
参考:http://stackoverflow.com/questions/3647569/how-do-i-install-curl-on-cygwin
2.2 安装apt-cyg:
cd c:\cygwinsetup.exe -q -P wget,tar,qawk, bzip2,subversion,vim
2.3 安装git
没有安装git前:
- samsung@samsung-PC ~/bin/WORKING_DIRECTORY
- $ repo-1.19 init -u https://android.googlesource.com/platform/manifest
-
- fatal: 'git' is not available
- fatal: [Errno 2] No such file or directory
-
- Please make sure git is installed and in your path.
-
- samsung@samsung-PC ~/bin/WORKING_DIRECTORY
安装后新的错误:
- samsung@samsung-PC ~/bin/WORKING_DIRECTORY
- $ repo-1.19 init -u https://android.googlesource.com/platform/manifest
- warning: gpg (GnuPG) is not available.
- warning: Installing it is strongly encouraged.
-
- fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- fatal: error [Errno 114] Network is unreachable
-
- samsung@samsung-PC ~/bin/WORKING_DIRECTORY
2.4 安装repo
直接在主页下载:http://code.google.com/p/git-repo/downloads/detail?name=repo-1.19&can=2&q=
没有安装git前
- samsung@samsung-PC ~/bin/WORKING_DIRECTORY
- $ repo-1.19 init -u https://android.googlesource.com/platform/manifest
-
- fatal: 'git' is not available
- fatal: [Errno 2] No such file or directory
-
- Please make sure git is installed and in your path.
-
- samsung@samsung-PC ~/bin/WORKING_DIRECTORY
安装Git后:
2.5 下载出错:
- samsung@samsung-PC ~/bin/WORKING_DIRECTORY
- $ repo-1.19 init -u https://android.googlesource.com/platform/manifest
- warning: gpg (GnuPG) is not available.
- warning: Installing it is strongly encouraged.
-
- fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
- fatal: error [Errno 114] Network is unreachable
网络出错的解决方法:
http://source.android.com/source/downloading.html#getting-the-files
http://code.google.com/p/android/issues/detail?id=21736
2.6 修改下载地址:
- samsung@samsung-PC ~/bin/WORKING_DIRECTORY
- $ repo-1.19 init -u http://android.googlesource.com/platform/manifest
- warning: gpg (GnuPG) is not available.
- warning: Installing it is strongly encouraged.
-
- Get https://gerrit.googlesource.com/git-repo
- remote: Counting objects: 101, done
- remote: Finding sources: 100% (101/101)
- remote: Total 2533 (delta 1442), reused 2533 (delta 1442)
- Receiving objects: 100% (2533/2533), 1.71 MiB | 651 KiB/s, done.
- Resolving deltas: 100% (1442/1442), done.
- From https://gerrit.googlesource.com/git-repo
- * [new branch] maint -> origin/maint
- * [new branch] master -> origin/master
- * [new branch] stable -> origin/stable
- * [new tag] v1.0 -> v1.0
- * [new tag] v1.0.1 -> v1.0.1
- * [new tag] v1.0.2 -> v1.0.2
- * [new tag] v1.0.3 -> v1.0.3
- * [new tag] v1.0.4 -> v1.0.4
- * [new tag] v1.0.5 -> v1.0.5
- * [new tag] v1.0.6 -> v1.0.6
- * [new tag] v1.0.7 -> v1.0.7
- * [new tag] v1.0.8 -> v1.0.8
- * [new tag] v1.0.9 -> v1.0.9
- * [new tag] v1.1 -> v1.1
- * [new tag] v1.10.0 -> v1.10.0
- * [new tag] v1.10.1 -> v1.10.1
- * [new tag] v1.10.2 -> v1.10.2
- * [new tag] v1.10.3 -> v1.10.3
- * [new tag] v1.10.4 -> v1.10.4
- * [new tag] v1.11.0 -> v1.11.0
- * [new tag] v1.11.1 -> v1.11.1
- * [new tag] v1.12.0 -> v1.12.0
- * [new tag] v1.12.1 -> v1.12.1
- * [new tag] v1.12.2 -> v1.12.2
- * [new tag] v1.2 -> v1.2
- * [new tag] v1.3 -> v1.3
- * [new tag] v1.3.1 -> v1.3.1
- * [new tag] v1.3.2 -> v1.3.2
- * [new tag] v1.4 -> v1.4
- * [new tag] v1.4.1 -> v1.4.1
- * [new tag] v1.4.2 -> v1.4.2
- * [new tag] v1.4.3 -> v1.4.3
- * [new tag] v1.4.4 -> v1.4.4
- * [new tag] v1.5 -> v1.5
- * [new tag] v1.5.1 -> v1.5.1
- * [new tag] v1.6 -> v1.6
- * [new tag] v1.6.1 -> v1.6.1
- * [new tag] v1.6.10 -> v1.6.10
- * [new tag] v1.6.10.1 -> v1.6.10.1
- * [new tag] v1.6.10.2 -> v1.6.10.2
- * [new tag] v1.6.2 -> v1.6.2
- * [new tag] v1.6.3 -> v1.6.3
- * [new tag] v1.6.4 -> v1.6.4
- * [new tag] v1.6.5 -> v1.6.5
- * [new tag] v1.6.6 -> v1.6.6
- * [new tag] v1.6.7 -> v1.6.7
- * [new tag] v1.6.7.1 -> v1.6.7.1
- * [new tag] v1.6.7.2 -> v1.6.7.2
- * [new tag] v1.6.7.3 -> v1.6.7.3
- * [new tag] v1.6.7.4 -> v1.6.7.4
- * [new tag] v1.6.7.5 -> v1.6.7.5
- * [new tag] v1.6.8 -> v1.6.8
- * [new tag] v1.6.8.1 -> v1.6.8.1
- * [new tag] v1.6.8.10 -> v1.6.8.10
- * [new tag] v1.6.8.11 -> v1.6.8.11
- * [new tag] v1.6.8.2 -> v1.6.8.2
- * [new tag] v1.6.8.3 -> v1.6.8.3
- * [new tag] v1.6.8.4 -> v1.6.8.4
- * [new tag] v1.6.8.5 -> v1.6.8.5
- * [new tag] v1.6.8.6 -> v1.6.8.6
- * [new tag] v1.6.8.7 -> v1.6.8.7
- * [new tag] v1.6.8.8 -> v1.6.8.8
- * [new tag] v1.6.8.9 -> v1.6.8.9
- * [new tag] v1.6.9 -> v1.6.9
- * [new tag] v1.6.9.1 -> v1.6.9.1
- * [new tag] v1.6.9.2 -> v1.6.9.2
- * [new tag] v1.6.9.3 -> v1.6.9.3
- * [new tag] v1.6.9.4 -> v1.6.9.4
- * [new tag] v1.6.9.5 -> v1.6.9.5
- * [new tag] v1.6.9.6 -> v1.6.9.6
- * [new tag] v1.6.9.7 -> v1.6.9.7
- * [new tag] v1.6.9.8 -> v1.6.9.8
- * [new tag] v1.7 -> v1.7
- * [new tag] v1.7.1 -> v1.7.1
- * [new tag] v1.7.2 -> v1.7.2
- * [new tag] v1.7.3 -> v1.7.3
- * [new tag] v1.7.3.1 -> v1.7.3.1
- * [new tag] v1.7.4 -> v1.7.4
- * [new tag] v1.7.4.1 -> v1.7.4.1
- * [new tag] v1.7.4.2 -> v1.7.4.2
- * [new tag] v1.7.4.3 -> v1.7.4.3
- * [new tag] v1.7.5 -> v1.7.5
- * [new tag] v1.7.6 -> v1.7.6
- * [new tag] v1.7.6.1 -> v1.7.6.1
- * [new tag] v1.7.7 -> v1.7.7
- * [new tag] v1.7.7.1 -> v1.7.7.1
- * [new tag] v1.7.7.2 -> v1.7.7.2
- * [new tag] v1.7.7.3 -> v1.7.7.3
- * [new tag] v1.7.7.4 -> v1.7.7.4
- * [new tag] v1.7.7.5 -> v1.7.7.5
- * [new tag] v1.7.7.6 -> v1.7.7.6
- * [new tag] v1.7.8 -> v1.7.8
- * [new tag] v1.7.8.1 -> v1.7.8.1
- * [new tag] v1.7.8.2 -> v1.7.8.2
- * [new tag] v1.8.0 -> v1.8.0
- * [new tag] v1.8.1 -> v1.8.1
- * [new tag] v1.8.2 -> v1.8.2
- * [new tag] v1.9.0 -> v1.9.0
- * [new tag] v1.9.1 -> v1.9.1
- * [new tag] v1.9.2 -> v1.9.2
- * [new tag] v1.9.3 -> v1.9.3
- * [new tag] v1.9.4 -> v1.9.4
- * [new tag] v1.9.5 -> v1.9.5
- * [new tag] v1.9.6 -> v1.9.6
- 0 [main] python2.7 15928 child_info_fork::abort: address space needed by 'datetime.dll' (0x3D0000) is already occupied
- Traceback (most recent call last):
- File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/main.py", line 414, in <module>
- _Main(sys.argv[1:])
- File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/main.py", line 390, in _Main
- result = repo._Run(argv) or 0
- File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/main.py", line 138, in _Run
- result = cmd.Execute(copts, cargs)
- File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/subcmds/init.py", line 342, in Execute
- git_require(MIN_GIT_VERSION, fail=True)
- File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/git_command.py", line 110, in git_require
- git_version = git.version_tuple()
- File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/git_command.py", line 89, in version_tuple
- ver_str = git.version()
- File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/git_command.py", line 80, in version
- p = GitCommand(None, ['--version'], capture_stdout=True)
- File "/home/samsung/bin/WORKING_DIRECTORY/.repo/repo/git_command.py", line 222, in __init__
- raise GitError('%s: %s' % (command[1], e))
- error.GitError: --version: [Errno 11] Resource temporarily unavailable
2.7 重启cygwin后
- samsung@samsung-PC ~/bin/WORKING_DIRECTORY
- $ repo-1.19 init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
- /usr/bin/env: python: No such file or directory
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。