git 从 github 上查看 Android 源代码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7761518/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 06:04:25  来源:igfitidea点击:

Checking out Android source from github

androidgitrepositoryandroid-source

提问by styler1972

After going through all of these steps to check out the Android source code (Gingerbread branch), only to come to a compile error, I have decided to try to get the source code from a different source.

在完成所有这些步骤以查看 Android 源代码(Gingerbread 分支)后,却出现了编译错误,我决定尝试从不同的来源获取源代码。

Here are the steps that I have taken to checkout the source code from the GitHub.com repository.

以下是我从 GitHub.com 存储库检出源代码所采取的步骤。

I checked out the repo tool from the GitHub.com repository

我从 GitHub.com 存储库中查看了 repo 工具

git clone git://github.com/android/tools_repo.git

Inside the repo script file that was downloaded, I changed the location of the repo tool as follows:

在下载的 repo 脚本文件中,我更改了 repo 工具的位置,如下所示:

## repo default configuration
##
#REPO_URL='git://android.git.kernel.org/tools/repo.git'
REPO_URL='git://github.com/android/tools_repo.git'
REPO_REV='stable'

After this, I created the repository for the source code using the repo script 'git wrapper'.

在此之后,我使用 repo 脚本“git wrapper”为源代码创建了存储库。

repo init -u git://github.com/android/platform_manifest.git -b gingerbread

Which gave me a successful results; "repo initialized in /home/my/directory"

这给了我一个成功的结果;“仓库在 /home/my/directory 中初始化”

However, when I try to repo sync, I get the following error message:

但是,当我尝试时repo sync,我收到以下错误消息:

$ repo sync

Initializing project platform/bionic ...
android.git.kernel.org[0: 149.20.4.77]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
error: Cannot fetch platform/bionic

Where are the references to the now-offline android.git.kernel.org? cat repo|grep kernel.orggives me nothing.

对现在离线的 android.git.kernel.org 的引用在哪里? cat repo|grep kernel.org什么都不给我。

采纳答案by netimen

Hereyou can find the howto on checking out from github.

在这里你可以找到如何从 github 中签出。

回答by Eddie

If you look at the default manifestin the platform_manifest repository, you'll see that kernel.org is still used quite frequently.

如果您查看platform_manifest 存储库中的默认清单,您会发现 kernel.org 仍然被频繁使用。

You'll have to wait for kernel.org to come back online, or consider hacking on CyanogenMod, which has a working manifest.

你必须等待 kernel.org 重新上线,或者考虑对 CyanogenMod 进行黑客攻击,它有一个工作清单。

EDIT: It appears that all of the Korg repos are mirrored on GitHub. In that case, try patching with this pull requestand then try a repo sync.

编辑:似乎所有 Korg 存储库都在 GitHub 上进行了镜像。在这种情况下,请尝试使用此拉取请求进行修补,然后尝试 repo 同步。