免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2821 | 回复: 0
打印 上一主题 下一主题

Android4源代码下载实录1! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-11-16 10:51 |只看该作者 |倒序浏览
Android4源代码下载实录1!




官方下载介绍网站是这个:
http://source.android.com/source/downloading.html

1. 下载与android自己的git工具,其实是一个shell中调用自己的python脚本。

Bash代码
  1. 1.banxi1988@banxi:~$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo   
  2. 2.  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current   
  3. 3.                                 Dload  Upload   Total   Spent    Left  Speed   
  4. 4.100 19731  100 19731    0     0   1332      0  0:00:14  0:00:14 --:--:--  3923  
  5. 5.banxi1988@banxi:~$   
  6. banxi1988@banxi:~$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
  7.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  8.                                  Dload  Upload   Total   Spent    Left  Speed
  9. 100 19731  100 19731    0     0   1332      0  0:00:14  0:00:14 --:--:--  3923
  10. banxi1988@banxi:~$
复制代码
2. 查看之后,计算sha1的值。跟官方提供的一样。哈哈。正确。
    然后创建工作目录。

Bash代码
  1. 1.banxi1988@banxi:~$ ls -l  bin/repo   
  2. 2.-rw-r--r-- 1 banxi1988 banxi 19731 2011-11-15 23:08 bin/repo   
  3. 3.banxi1988@banxi:~$ chmod a+x ~/bin/repo   
  4. 4.banxi1988@banxi:~$ sha1sum ~/bin/repo   
  5. 5.e1fd3bef059d152edf4d0522590725d317bc637f  /home/banxi1988/bin/repo   
  6. 6.banxi1988@banxi:~$ cd android   
  7. 7.banxi1988@banxi:~/android$ ls   
  8. 8.android-sdk-linux_x86          develop_android.txt                      myworks   
  9. 9.android-sdk_r11-linux_x86.tgz  docs                                     temp   
  10. 10.debug_log                      eclipse   
  11. 11.develop_android_2.txt          eclipse-jee-helios-SR1-linux-gtk.tar.gz   
  12. 12.banxi1988@banxi:~/android$ mkdir android4_source   
  13. 13.banxi1988@banxi:~/android$ cd android   
  14. 14.bash: cd: android: 没有那个文件或目录   
  15. 15.banxi1988@banxi:~/android$ cd android4_source/  
  16. banxi1988@banxi:~$ ls -l  bin/repo
  17. -rw-r--r-- 1 banxi1988 banxi 19731 2011-11-15 23:08 bin/repo
  18. banxi1988@banxi:~$ chmod a+x ~/bin/repo
  19. banxi1988@banxi:~$ sha1sum ~/bin/repo
  20. e1fd3bef059d152edf4d0522590725d317bc637f  /home/banxi1988/bin/repo
  21. banxi1988@banxi:~$ cd android
  22. banxi1988@banxi:~/android$ ls
  23. android-sdk-linux_x86          develop_android.txt                      myworks
  24. android-sdk_r11-linux_x86.tgz  docs                                     temp
  25. debug_log                      eclipse
  26. develop_android_2.txt          eclipse-jee-helios-SR1-linux-gtk.tar.gz
  27. banxi1988@banxi:~/android$ mkdir android4_source
  28. banxi1988@banxi:~/android$ cd android
  29. bash: cd: android: 没有那个文件或目录
  30. banxi1988@banxi:~/android$ cd android4_source/
复制代码
初始化工作副本也就是仓库有点蛋痛了。
第一次失败:

Bash代码
  1. 1.banxi1988@banxi:~/android/android4_source$ repo init -u https://android.googlesource.com/platform/mainifest   
  2. 2.gpg: 钥匙环‘/home/banxi1988/.repoconfig/gnupg/secring.gpg’已建立   
  3. 3.gpg: 钥匙环‘/home/banxi1988/.repoconfig/gnupg/pubring.gpg’已建立   
  4. 4.gpg: /home/banxi1988/.repoconfig/gnupg/trustdb.gpg:建立了信任度数据库   
  5. 5.gpg: 密钥 920F5C65:公钥“Repo Maintainer <repo@android.kernel.org>”已导入   
  6. 6.gpg: 合计被处理的数量:1  
  7. 7.gpg:               已导入:1  
  8. 8.  
  9. 9.Get https://android.googlesource.com/tools/repo   
  10. 10.remote: Counting objects: 1414, done   
  11. 11.remote: Finding sources: 100% (78/78)   
  12. 12.remote: Total 1414 (delta 917), reused 1414 (delta 917)   
  13. 13.Receiving objects: 100% (1414/1414), 429.88 KiB | 4 KiB/s, done.   
  14. 14.Resolving deltas: 100% (917/917), done.   
  15. 15.From https://android.googlesource.com/tools/repo   
  16. 16. * [new branch]      maint      -> origin/maint   
  17. 17. * [new branch]      master     -> origin/master   
  18. 18. * [new branch]      stable     -> origin/stable   
  19. 19. * [new tag]         v1.0       -> v1.0  
  20. 20. * [new tag]         v1.0.1     -> v1.0.1  
  21. 21. * [new tag]         v1.0.2     -> v1.0.2  
  22. 22. * [new tag]         v1.0.3     -> v1.0.3  
  23. 23. * [new tag]         v1.0.4     -> v1.0.4  
  24. 24. * [new tag]         v1.0.5     -> v1.0.5  
  25. 25. * [new tag]         v1.0.6     -> v1.0.6  
  26. 26. * [new tag]         v1.0.7     -> v1.0.7  
  27. 27. * [new tag]         v1.0.8     -> v1.0.8  
  28. 28. * [new tag]         v1.0.9     -> v1.0.9  
  29. 29. * [new tag]         v1.1       -> v1.1  
  30. 30. * [new tag]         v1.2       -> v1.2  
  31. 31. * [new tag]         v1.3       -> v1.3  
  32. 32. * [new tag]         v1.3.1     -> v1.3.1  
  33. 33. * [new tag]         v1.3.2     -> v1.3.2  
  34. 34. * [new tag]         v1.4       -> v1.4  
  35. 35. * [new tag]         v1.4.1     -> v1.4.1  
  36. 36. * [new tag]         v1.4.2     -> v1.4.2  
  37. 37. * [new tag]         v1.4.3     -> v1.4.3  
  38. 38. * [new tag]         v1.4.4     -> v1.4.4  
  39. 39. * [new tag]         v1.5       -> v1.5  
  40. 40. * [new tag]         v1.5.1     -> v1.5.1  
  41. 41. * [new tag]         v1.6       -> v1.6  
  42. 42. * [new tag]         v1.6.1     -> v1.6.1  
  43. 43. * [new tag]         v1.6.10    -> v1.6.10  
  44. 44. * [new tag]         v1.6.10.1  -> v1.6.10.1  
  45. 45. * [new tag]         v1.6.10.2  -> v1.6.10.2  
  46. 46. * [new tag]         v1.6.2     -> v1.6.2  
  47. 47. * [new tag]         v1.6.3     -> v1.6.3  
  48. 48. * [new tag]         v1.6.4     -> v1.6.4  
  49. 49. * [new tag]         v1.6.5     -> v1.6.5  
  50. 50. * [new tag]         v1.6.6     -> v1.6.6  
  51. 51. * [new tag]         v1.6.7     -> v1.6.7  
  52. 52. * [new tag]         v1.6.7.1   -> v1.6.7.1  
  53. 53. * [new tag]         v1.6.7.2   -> v1.6.7.2  
  54. 54. * [new tag]         v1.6.7.3   -> v1.6.7.3  
  55. 55. * [new tag]         v1.6.7.4   -> v1.6.7.4  
  56. 56. * [new tag]         v1.6.7.5   -> v1.6.7.5  
  57. 57. * [new tag]         v1.6.8     -> v1.6.8  
  58. 58. * [new tag]         v1.6.8.1   -> v1.6.8.1  
  59. 59. * [new tag]         v1.6.8.10  -> v1.6.8.10  
  60. 60. * [new tag]         v1.6.8.11  -> v1.6.8.11  
  61. 61. * [new tag]         v1.6.8.2   -> v1.6.8.2  
  62. 62. * [new tag]         v1.6.8.3   -> v1.6.8.3  
  63. 63. * [new tag]         v1.6.8.4   -> v1.6.8.4  
  64. 64. * [new tag]         v1.6.8.5   -> v1.6.8.5  
  65. 65. * [new tag]         v1.6.8.6   -> v1.6.8.6  
  66. 66. * [new tag]         v1.6.8.7   -> v1.6.8.7  
  67. 67. * [new tag]         v1.6.8.8   -> v1.6.8.8  
  68. 68. * [new tag]         v1.6.8.9   -> v1.6.8.9  
  69. 69. * [new tag]         v1.6.9     -> v1.6.9  
  70. 70. * [new tag]         v1.6.9.1   -> v1.6.9.1  
  71. 71. * [new tag]         v1.6.9.2   -> v1.6.9.2  
  72. 72. * [new tag]         v1.6.9.3   -> v1.6.9.3  
  73. 73. * [new tag]         v1.6.9.4   -> v1.6.9.4  
  74. 74. * [new tag]         v1.6.9.5   -> v1.6.9.5  
  75. 75. * [new tag]         v1.6.9.6   -> v1.6.9.6  
  76. 76. * [new tag]         v1.6.9.7   -> v1.6.9.7  
  77. 77. * [new tag]         v1.6.9.8   -> v1.6.9.8  
  78. 78. * [new tag]         v1.7       -> v1.7  
  79. 79. * [new tag]         v1.7.1     -> v1.7.1  
  80. 80. * [new tag]         v1.7.2     -> v1.7.2  
  81. 81. * [new tag]         v1.7.3     -> v1.7.3  
  82. 82. * [new tag]         v1.7.3.1   -> v1.7.3.1  
  83. 83. * [new tag]         v1.7.4     -> v1.7.4  
  84. 84. * [new tag]         v1.7.4.1   -> v1.7.4.1  
  85. 85. * [new tag]         v1.7.4.2   -> v1.7.4.2  
  86. 86. * [new tag]         v1.7.4.3   -> v1.7.4.3  
  87. 87. * [new tag]         v1.7.5     -> v1.7.5  
  88. 88. * [new tag]         v1.7.6     -> v1.7.6  
  89. 89. * [new tag]         v1.7.6.1   -> v1.7.6.1  
  90. 90. * [new tag]         v1.7.7     -> v1.7.7  
  91. 91. * [new tag]         v1.7.7.1   -> v1.7.7.1  
  92. 92. * [new tag]         v1.7.7.2   -> v1.7.7.2  
  93. 93. * [new tag]         v1.7.7.3   -> v1.7.7.3  
  94. 94. * [new tag]         v1.7.7.4   -> v1.7.7.4  
  95. 95. * [new tag]         v1.7.7.5   -> v1.7.7.5  
  96. 96. * [new tag]         v1.7.7.6   -> v1.7.7.6  
  97. 97.Get https://android.googlesource.com/platform/mainifest   
  98. 98.error: android.googlesource.com: <urlopen error [Errno 8] _ssl.c:499: EOF occurred in violation of protocol>   
  99. 99.banxi1988@banxi:~/android/android4_source$   
  100. banxi1988@banxi:~/android/android4_source$ repo init -u https://android.googlesource.com/platform/mainifest
  101. gpg: 钥匙环‘/home/banxi1988/.repoconfig/gnupg/secring.gpg’已建立
  102. gpg: 钥匙环‘/home/banxi1988/.repoconfig/gnupg/pubring.gpg’已建立
  103. gpg: /home/banxi1988/.repoconfig/gnupg/trustdb.gpg:建立了信任度数据库
  104. gpg: 密钥 920F5C65:公钥“Repo Maintainer <repo@android.kernel.org>”已导入
  105. gpg: 合计被处理的数量:1
  106. gpg:               已导入:1

  107. Get https://android.googlesource.com/tools/repo
  108. remote: Counting objects: 1414, done
  109. remote: Finding sources: 100% (78/78)
  110. remote: Total 1414 (delta 917), reused 1414 (delta 917)
  111. Receiving objects: 100% (1414/1414), 429.88 KiB | 4 KiB/s, done.
  112. Resolving deltas: 100% (917/917), done.
  113. From https://android.googlesource.com/tools/repo
  114. * [new branch]      maint      -> origin/maint
  115. * [new branch]      master     -> origin/master
  116. * [new branch]      stable     -> origin/stable
  117. * [new tag]         v1.0       -> v1.0
  118. * [new tag]         v1.0.1     -> v1.0.1
  119. * [new tag]         v1.0.2     -> v1.0.2
  120. * [new tag]         v1.0.3     -> v1.0.3
  121. * [new tag]         v1.0.4     -> v1.0.4
  122. * [new tag]         v1.0.5     -> v1.0.5
  123. * [new tag]         v1.0.6     -> v1.0.6
  124. * [new tag]         v1.0.7     -> v1.0.7
  125. * [new tag]         v1.0.8     -> v1.0.8
  126. * [new tag]         v1.0.9     -> v1.0.9
  127. * [new tag]         v1.1       -> v1.1
  128. * [new tag]         v1.2       -> v1.2
  129. * [new tag]         v1.3       -> v1.3
  130. * [new tag]         v1.3.1     -> v1.3.1
  131. * [new tag]         v1.3.2     -> v1.3.2
  132. * [new tag]         v1.4       -> v1.4
  133. * [new tag]         v1.4.1     -> v1.4.1
  134. * [new tag]         v1.4.2     -> v1.4.2
  135. * [new tag]         v1.4.3     -> v1.4.3
  136. * [new tag]         v1.4.4     -> v1.4.4
  137. * [new tag]         v1.5       -> v1.5
  138. * [new tag]         v1.5.1     -> v1.5.1
  139. * [new tag]         v1.6       -> v1.6
  140. * [new tag]         v1.6.1     -> v1.6.1
  141. * [new tag]         v1.6.10    -> v1.6.10
  142. * [new tag]         v1.6.10.1  -> v1.6.10.1
  143. * [new tag]         v1.6.10.2  -> v1.6.10.2
  144. * [new tag]         v1.6.2     -> v1.6.2
  145. * [new tag]         v1.6.3     -> v1.6.3
  146. * [new tag]         v1.6.4     -> v1.6.4
  147. * [new tag]         v1.6.5     -> v1.6.5
  148. * [new tag]         v1.6.6     -> v1.6.6
  149. * [new tag]         v1.6.7     -> v1.6.7
  150. * [new tag]         v1.6.7.1   -> v1.6.7.1
  151. * [new tag]         v1.6.7.2   -> v1.6.7.2
  152. * [new tag]         v1.6.7.3   -> v1.6.7.3
  153. * [new tag]         v1.6.7.4   -> v1.6.7.4
  154. * [new tag]         v1.6.7.5   -> v1.6.7.5
  155. * [new tag]         v1.6.8     -> v1.6.8
  156. * [new tag]         v1.6.8.1   -> v1.6.8.1
  157. * [new tag]         v1.6.8.10  -> v1.6.8.10
  158. * [new tag]         v1.6.8.11  -> v1.6.8.11
  159. * [new tag]         v1.6.8.2   -> v1.6.8.2
  160. * [new tag]         v1.6.8.3   -> v1.6.8.3
  161. * [new tag]         v1.6.8.4   -> v1.6.8.4
  162. * [new tag]         v1.6.8.5   -> v1.6.8.5
  163. * [new tag]         v1.6.8.6   -> v1.6.8.6
  164. * [new tag]         v1.6.8.7   -> v1.6.8.7
  165. * [new tag]         v1.6.8.8   -> v1.6.8.8
  166. * [new tag]         v1.6.8.9   -> v1.6.8.9
  167. * [new tag]         v1.6.9     -> v1.6.9
  168. * [new tag]         v1.6.9.1   -> v1.6.9.1
  169. * [new tag]         v1.6.9.2   -> v1.6.9.2
  170. * [new tag]         v1.6.9.3   -> v1.6.9.3
  171. * [new tag]         v1.6.9.4   -> v1.6.9.4
  172. * [new tag]         v1.6.9.5   -> v1.6.9.5
  173. * [new tag]         v1.6.9.6   -> v1.6.9.6
  174. * [new tag]         v1.6.9.7   -> v1.6.9.7
  175. * [new tag]         v1.6.9.8   -> v1.6.9.8
  176. * [new tag]         v1.7       -> v1.7
  177. * [new tag]         v1.7.1     -> v1.7.1
  178. * [new tag]         v1.7.2     -> v1.7.2
  179. * [new tag]         v1.7.3     -> v1.7.3
  180. * [new tag]         v1.7.3.1   -> v1.7.3.1
  181. * [new tag]         v1.7.4     -> v1.7.4
  182. * [new tag]         v1.7.4.1   -> v1.7.4.1
  183. * [new tag]         v1.7.4.2   -> v1.7.4.2
  184. * [new tag]         v1.7.4.3   -> v1.7.4.3
  185. * [new tag]         v1.7.5     -> v1.7.5
  186. * [new tag]         v1.7.6     -> v1.7.6
  187. * [new tag]         v1.7.6.1   -> v1.7.6.1
  188. * [new tag]         v1.7.7     -> v1.7.7
  189. * [new tag]         v1.7.7.1   -> v1.7.7.1
  190. * [new tag]         v1.7.7.2   -> v1.7.7.2
  191. * [new tag]         v1.7.7.3   -> v1.7.7.3
  192. * [new tag]         v1.7.7.4   -> v1.7.7.4
  193. * [new tag]         v1.7.7.5   -> v1.7.7.5
  194. * [new tag]         v1.7.7.6   -> v1.7.7.6
  195. Get https://android.googlesource.com/platform/mainifest
  196. error: android.googlesource.com: <urlopen error [Errno 8] _ssl.c:499: EOF occurred in violation of protocol>
  197. banxi1988@banxi:~/android/android4_source$
复制代码
再来,发现不行。

Bash代码
  1. 1.banxi1988@banxi:~/android/android4_source$ repo init -u https://android.googlesource.com/platform/mainifest   
  2. 2.Traceback (most recent call last):   
  3. 3.  File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 355, in <module>   
  4. 4.    _Main(sys.argv[1:])   
  5. 5.  File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 337, in _Main   
  6. 6.    repo._Run(argv)   
  7. 7.  File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 135, in _Run   
  8. 8.    cmd.Execute(copts, cargs)   
  9. 9.  File "/home/banxi1988/android/android4_source/.repo/repo/subcmds/init.py", line 260, in Execute   
  10. 10.    self._SyncManifest(opt)   
  11. 11.  File "/home/banxi1988/android/android4_source/.repo/repo/subcmds/init.py", line 124, in _SyncManifest   
  12. 12.    m.PreSync()   
  13. 13.  File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 2064, in PreSync   
  14. 14.    cb = self.CurrentBranch   
  15. 15.  File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 552, in CurrentBranch   
  16. 16.    b = self.work_git.GetHead()   
  17. 17.  File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 1834, in GetHead   
  18. 18.    fd = open(path, 'rb')   
  19. 19.IOError: [Errno 2] No such file or directory: '/home/banxi1988/android/android4_source/.repo/manifests/.git/HEAD'  
  20. 20.banxi1988@banxi:~/android/android4_source$   
  21. banxi1988@banxi:~/android/android4_source$ repo init -u https://android.googlesource.com/platform/mainifest
  22. Traceback (most recent call last):
  23.   File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 355, in <module>
  24.     _Main(sys.argv[1:])
  25.   File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 337, in _Main
  26.     repo._Run(argv)
  27.   File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 135, in _Run
  28.     cmd.Execute(copts, cargs)
  29.   File "/home/banxi1988/android/android4_source/.repo/repo/subcmds/init.py", line 260, in Execute
  30.     self._SyncManifest(opt)
  31.   File "/home/banxi1988/android/android4_source/.repo/repo/subcmds/init.py", line 124, in _SyncManifest
  32.     m.PreSync()
  33.   File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 2064, in PreSync
  34.     cb = self.CurrentBranch
  35.   File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 552, in CurrentBranch
  36.     b = self.work_git.GetHead()
  37.   File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 1834, in GetHead
  38.     fd = open(path, 'rb')
  39. IOError: [Errno 2] No such file or directory: '/home/banxi1988/android/android4_source/.repo/manifests/.git/HEAD'
  40. banxi1988@banxi:~/android/android4_source$
复制代码
删除因为前面初始化创建的目录后,继续来。
还是不行。然后直接在网站上打开,发现了下面的东西 。
其实没有什么。

Bash代码
  1. 1.git clone https://android.googlesource.com/platform/manifest.git  
  2. git clone https://android.googlesource.com/platform/manifest.git
复制代码
在下面再来一次,哈哈,看起来得了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP