- 论坛徽章:
- 0
|
Android4源代码下载实录1!
官方下载介绍网站是这个:
http://source.android.com/source/downloading.html
1. 下载与android自己的git工具,其实是一个shell中调用自己的python脚本。
Bash代码- 1.banxi1988@banxi:~$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
- 2. % Total % Received % Xferd Average Speed Time Time Time Current
- 3. Dload Upload Total Spent Left Speed
- 4.100 19731 100 19731 0 0 1332 0 0:00:14 0:00:14 --:--:-- 3923
- 5.banxi1988@banxi:~$
- banxi1988@banxi:~$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 100 19731 100 19731 0 0 1332 0 0:00:14 0:00:14 --:--:-- 3923
- banxi1988@banxi:~$
复制代码 2. 查看之后,计算sha1的值。跟官方提供的一样。哈哈。正确。
然后创建工作目录。
Bash代码- 1.banxi1988@banxi:~$ ls -l bin/repo
- 2.-rw-r--r-- 1 banxi1988 banxi 19731 2011-11-15 23:08 bin/repo
- 3.banxi1988@banxi:~$ chmod a+x ~/bin/repo
- 4.banxi1988@banxi:~$ sha1sum ~/bin/repo
- 5.e1fd3bef059d152edf4d0522590725d317bc637f /home/banxi1988/bin/repo
- 6.banxi1988@banxi:~$ cd android
- 7.banxi1988@banxi:~/android$ ls
- 8.android-sdk-linux_x86 develop_android.txt myworks
- 9.android-sdk_r11-linux_x86.tgz docs temp
- 10.debug_log eclipse
- 11.develop_android_2.txt eclipse-jee-helios-SR1-linux-gtk.tar.gz
- 12.banxi1988@banxi:~/android$ mkdir android4_source
- 13.banxi1988@banxi:~/android$ cd android
- 14.bash: cd: android: 没有那个文件或目录
- 15.banxi1988@banxi:~/android$ cd android4_source/
- banxi1988@banxi:~$ ls -l bin/repo
- -rw-r--r-- 1 banxi1988 banxi 19731 2011-11-15 23:08 bin/repo
- banxi1988@banxi:~$ chmod a+x ~/bin/repo
- banxi1988@banxi:~$ sha1sum ~/bin/repo
- e1fd3bef059d152edf4d0522590725d317bc637f /home/banxi1988/bin/repo
- banxi1988@banxi:~$ cd android
- banxi1988@banxi:~/android$ ls
- android-sdk-linux_x86 develop_android.txt myworks
- android-sdk_r11-linux_x86.tgz docs temp
- debug_log eclipse
- develop_android_2.txt eclipse-jee-helios-SR1-linux-gtk.tar.gz
- banxi1988@banxi:~/android$ mkdir android4_source
- banxi1988@banxi:~/android$ cd android
- bash: cd: android: 没有那个文件或目录
- banxi1988@banxi:~/android$ cd android4_source/
复制代码 初始化工作副本也就是仓库有点蛋痛了。
第一次失败:
Bash代码- 1.banxi1988@banxi:~/android/android4_source$ repo init -u https://android.googlesource.com/platform/mainifest
- 2.gpg: 钥匙环‘/home/banxi1988/.repoconfig/gnupg/secring.gpg’已建立
- 3.gpg: 钥匙环‘/home/banxi1988/.repoconfig/gnupg/pubring.gpg’已建立
- 4.gpg: /home/banxi1988/.repoconfig/gnupg/trustdb.gpg:建立了信任度数据库
- 5.gpg: 密钥 920F5C65:公钥“Repo Maintainer <repo@android.kernel.org>”已导入
- 6.gpg: 合计被处理的数量:1
- 7.gpg: 已导入:1
- 8.
- 9.Get https://android.googlesource.com/tools/repo
- 10.remote: Counting objects: 1414, done
- 11.remote: Finding sources: 100% (78/78)
- 12.remote: Total 1414 (delta 917), reused 1414 (delta 917)
- 13.Receiving objects: 100% (1414/1414), 429.88 KiB | 4 KiB/s, done.
- 14.Resolving deltas: 100% (917/917), done.
- 15.From https://android.googlesource.com/tools/repo
- 16. * [new branch] maint -> origin/maint
- 17. * [new branch] master -> origin/master
- 18. * [new branch] stable -> origin/stable
- 19. * [new tag] v1.0 -> v1.0
- 20. * [new tag] v1.0.1 -> v1.0.1
- 21. * [new tag] v1.0.2 -> v1.0.2
- 22. * [new tag] v1.0.3 -> v1.0.3
- 23. * [new tag] v1.0.4 -> v1.0.4
- 24. * [new tag] v1.0.5 -> v1.0.5
- 25. * [new tag] v1.0.6 -> v1.0.6
- 26. * [new tag] v1.0.7 -> v1.0.7
- 27. * [new tag] v1.0.8 -> v1.0.8
- 28. * [new tag] v1.0.9 -> v1.0.9
- 29. * [new tag] v1.1 -> v1.1
- 30. * [new tag] v1.2 -> v1.2
- 31. * [new tag] v1.3 -> v1.3
- 32. * [new tag] v1.3.1 -> v1.3.1
- 33. * [new tag] v1.3.2 -> v1.3.2
- 34. * [new tag] v1.4 -> v1.4
- 35. * [new tag] v1.4.1 -> v1.4.1
- 36. * [new tag] v1.4.2 -> v1.4.2
- 37. * [new tag] v1.4.3 -> v1.4.3
- 38. * [new tag] v1.4.4 -> v1.4.4
- 39. * [new tag] v1.5 -> v1.5
- 40. * [new tag] v1.5.1 -> v1.5.1
- 41. * [new tag] v1.6 -> v1.6
- 42. * [new tag] v1.6.1 -> v1.6.1
- 43. * [new tag] v1.6.10 -> v1.6.10
- 44. * [new tag] v1.6.10.1 -> v1.6.10.1
- 45. * [new tag] v1.6.10.2 -> v1.6.10.2
- 46. * [new tag] v1.6.2 -> v1.6.2
- 47. * [new tag] v1.6.3 -> v1.6.3
- 48. * [new tag] v1.6.4 -> v1.6.4
- 49. * [new tag] v1.6.5 -> v1.6.5
- 50. * [new tag] v1.6.6 -> v1.6.6
- 51. * [new tag] v1.6.7 -> v1.6.7
- 52. * [new tag] v1.6.7.1 -> v1.6.7.1
- 53. * [new tag] v1.6.7.2 -> v1.6.7.2
- 54. * [new tag] v1.6.7.3 -> v1.6.7.3
- 55. * [new tag] v1.6.7.4 -> v1.6.7.4
- 56. * [new tag] v1.6.7.5 -> v1.6.7.5
- 57. * [new tag] v1.6.8 -> v1.6.8
- 58. * [new tag] v1.6.8.1 -> v1.6.8.1
- 59. * [new tag] v1.6.8.10 -> v1.6.8.10
- 60. * [new tag] v1.6.8.11 -> v1.6.8.11
- 61. * [new tag] v1.6.8.2 -> v1.6.8.2
- 62. * [new tag] v1.6.8.3 -> v1.6.8.3
- 63. * [new tag] v1.6.8.4 -> v1.6.8.4
- 64. * [new tag] v1.6.8.5 -> v1.6.8.5
- 65. * [new tag] v1.6.8.6 -> v1.6.8.6
- 66. * [new tag] v1.6.8.7 -> v1.6.8.7
- 67. * [new tag] v1.6.8.8 -> v1.6.8.8
- 68. * [new tag] v1.6.8.9 -> v1.6.8.9
- 69. * [new tag] v1.6.9 -> v1.6.9
- 70. * [new tag] v1.6.9.1 -> v1.6.9.1
- 71. * [new tag] v1.6.9.2 -> v1.6.9.2
- 72. * [new tag] v1.6.9.3 -> v1.6.9.3
- 73. * [new tag] v1.6.9.4 -> v1.6.9.4
- 74. * [new tag] v1.6.9.5 -> v1.6.9.5
- 75. * [new tag] v1.6.9.6 -> v1.6.9.6
- 76. * [new tag] v1.6.9.7 -> v1.6.9.7
- 77. * [new tag] v1.6.9.8 -> v1.6.9.8
- 78. * [new tag] v1.7 -> v1.7
- 79. * [new tag] v1.7.1 -> v1.7.1
- 80. * [new tag] v1.7.2 -> v1.7.2
- 81. * [new tag] v1.7.3 -> v1.7.3
- 82. * [new tag] v1.7.3.1 -> v1.7.3.1
- 83. * [new tag] v1.7.4 -> v1.7.4
- 84. * [new tag] v1.7.4.1 -> v1.7.4.1
- 85. * [new tag] v1.7.4.2 -> v1.7.4.2
- 86. * [new tag] v1.7.4.3 -> v1.7.4.3
- 87. * [new tag] v1.7.5 -> v1.7.5
- 88. * [new tag] v1.7.6 -> v1.7.6
- 89. * [new tag] v1.7.6.1 -> v1.7.6.1
- 90. * [new tag] v1.7.7 -> v1.7.7
- 91. * [new tag] v1.7.7.1 -> v1.7.7.1
- 92. * [new tag] v1.7.7.2 -> v1.7.7.2
- 93. * [new tag] v1.7.7.3 -> v1.7.7.3
- 94. * [new tag] v1.7.7.4 -> v1.7.7.4
- 95. * [new tag] v1.7.7.5 -> v1.7.7.5
- 96. * [new tag] v1.7.7.6 -> v1.7.7.6
- 97.Get https://android.googlesource.com/platform/mainifest
- 98.error: android.googlesource.com: <urlopen error [Errno 8] _ssl.c:499: EOF occurred in violation of protocol>
- 99.banxi1988@banxi:~/android/android4_source$
- banxi1988@banxi:~/android/android4_source$ repo init -u https://android.googlesource.com/platform/mainifest
- gpg: 钥匙环‘/home/banxi1988/.repoconfig/gnupg/secring.gpg’已建立
- gpg: 钥匙环‘/home/banxi1988/.repoconfig/gnupg/pubring.gpg’已建立
- gpg: /home/banxi1988/.repoconfig/gnupg/trustdb.gpg:建立了信任度数据库
- gpg: 密钥 920F5C65:公钥“Repo Maintainer <repo@android.kernel.org>”已导入
- gpg: 合计被处理的数量:1
- gpg: 已导入:1
- Get https://android.googlesource.com/tools/repo
- remote: Counting objects: 1414, done
- remote: Finding sources: 100% (78/78)
- remote: Total 1414 (delta 917), reused 1414 (delta 917)
- Receiving objects: 100% (1414/1414), 429.88 KiB | 4 KiB/s, done.
- Resolving deltas: 100% (917/917), done.
- From https://android.googlesource.com/tools/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.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
- Get https://android.googlesource.com/platform/mainifest
- error: android.googlesource.com: <urlopen error [Errno 8] _ssl.c:499: EOF occurred in violation of protocol>
- banxi1988@banxi:~/android/android4_source$
复制代码 再来,发现不行。
Bash代码- 1.banxi1988@banxi:~/android/android4_source$ repo init -u https://android.googlesource.com/platform/mainifest
- 2.Traceback (most recent call last):
- 3. File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 355, in <module>
- 4. _Main(sys.argv[1:])
- 5. File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 337, in _Main
- 6. repo._Run(argv)
- 7. File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 135, in _Run
- 8. cmd.Execute(copts, cargs)
- 9. File "/home/banxi1988/android/android4_source/.repo/repo/subcmds/init.py", line 260, in Execute
- 10. self._SyncManifest(opt)
- 11. File "/home/banxi1988/android/android4_source/.repo/repo/subcmds/init.py", line 124, in _SyncManifest
- 12. m.PreSync()
- 13. File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 2064, in PreSync
- 14. cb = self.CurrentBranch
- 15. File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 552, in CurrentBranch
- 16. b = self.work_git.GetHead()
- 17. File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 1834, in GetHead
- 18. fd = open(path, 'rb')
- 19.IOError: [Errno 2] No such file or directory: '/home/banxi1988/android/android4_source/.repo/manifests/.git/HEAD'
- 20.banxi1988@banxi:~/android/android4_source$
- banxi1988@banxi:~/android/android4_source$ repo init -u https://android.googlesource.com/platform/mainifest
- Traceback (most recent call last):
- File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 355, in <module>
- _Main(sys.argv[1:])
- File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 337, in _Main
- repo._Run(argv)
- File "/home/banxi1988/android/android4_source/.repo/repo/main.py", line 135, in _Run
- cmd.Execute(copts, cargs)
- File "/home/banxi1988/android/android4_source/.repo/repo/subcmds/init.py", line 260, in Execute
- self._SyncManifest(opt)
- File "/home/banxi1988/android/android4_source/.repo/repo/subcmds/init.py", line 124, in _SyncManifest
- m.PreSync()
- File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 2064, in PreSync
- cb = self.CurrentBranch
- File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 552, in CurrentBranch
- b = self.work_git.GetHead()
- File "/home/banxi1988/android/android4_source/.repo/repo/project.py", line 1834, in GetHead
- fd = open(path, 'rb')
- IOError: [Errno 2] No such file or directory: '/home/banxi1988/android/android4_source/.repo/manifests/.git/HEAD'
- banxi1988@banxi:~/android/android4_source$
复制代码 删除因为前面初始化创建的目录后,继续来。
还是不行。然后直接在网站上打开,发现了下面的东西 。
其实没有什么。
Bash代码- 1.git clone https://android.googlesource.com/platform/manifest.git
- git clone https://android.googlesource.com/platform/manifest.git
复制代码 在下面再来一次,哈哈,看起来得了。 |
|