如何下载android源码?

时间:2017-08-30 06:45:17

标签: android embedded-linux android-source

我试图从Android源码(android-5.1.1_r9)获取克隆,因为它描述为here。在(Ubuntu 16.04)终端中运行命令后,它不会下载任何内容。该文件夹仍为空。

init

这个过程继续一系列,我不能在这里粘贴所有这些。最后它最终结果如下。

nuwan2@nuwan:~/Desktop/workspace/original_sources$ repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.1_r9
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
remote: Finding sources: 100% (9/9)
remote: Total 9 (delta 1), reused 9 (delta 1)
Unpacking objects: 100% (9/9), done.
From https://gerrit.googlesource.com/git-repo
   c94d6eb..9ead97b  master     -> origin/master
Get https://android.googlesource.com/platform/manifest
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
remote: Counting objects: 523, done        
remote: Total 5705 (delta 1529), reused 5705 (delta 1529)        
Receiving objects: 100% (5705/5705), 4.21 MiB | 248.00 KiB/s, done.
Resolving deltas: 100% (1529/1529), done.
From https://android.googlesource.com/platform/manifest
 * [new branch]      adt_23.0.3 -> origin/adt_23.0.3
 * [new branch]      afw-test-harness-1.5 -> origin/afw-test-harness-1.5
 * [new branch]      afw-test-harness-2.1 -> origin/afw-test-harness-2.1
 * [new branch]      afw-test-harness-marshmallow-dev -> origin/afw-test-harness-marshmallow-dev
 * [new branch]      afw-test-harness-nougat-dev -> origin/afw-test-harness-nougat-dev
 * [new branch]      android-1.6_r1 -> origin/android-1.6_r1
 * [new branch]      android-1.6_r1.1 -> origin/android-1.6_r1.1
 * [new branch]      android-1.6_r1.2 -> origin/android-1.6_r1.2
 * [new branch]      android-1.6_r1.3 -> origin/android-1.6_r1.3
 * [new branch]      android-1.6_r1.4 -> origin/android-1.6_r1.4
 * [new branch]      android-1.6_r1.5 -> origin/android-1.6_r1.5
 * [new branch]      android-1.6_r2 -> origin/android-1.6_r2

我的文件夹仍为空。什么地方出了错?将android源代码克隆到本地机器的正确方法是什么?

2 个答案:

答案 0 :(得分:3)

你应该在初始化后repo sync拉取来源

https://source.android.com/source/downloading

答案 1 :(得分:0)

Android托管在Google repo中,这是一组互连的git存储库。

有关下载Android项目源代码的详细说明,请参阅official documentation