AOSP 存储库同步时间过长

AOSP repo sync takes too long(AOSP 存储库同步时间过长)
本文介绍了AOSP 存储库同步时间过长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从同名的书中学习嵌入式 Android.作者建议与 AOSP 姜饼分支合作.于是我跟着去下载源码:

I'm trying to learn Embedded Android from the book with the same name. And the author suggested working with AOSP gingerbread branch. So I followed to download the source:

$ repo init -u https://android.googlesource.com/platform/manifest.git
-b gingerbread

$ repo sync

但这需要的时间太长了.同样从输出来看,在我看来它也在从其他分支下载源代码(我看到 android-5 .....),这不是我想要的.我想知道这是否是它需要这么长时间的原因.

But it's taking too long. Also from the output, it seems to me like it's also downloading source code from other branches (I see android-5.....) which is not what I want. I'm wondering if that's the reason why it takes so long.

有人遇到过同样的问题吗?请给我一个建议!谢谢!

Has anybody had the same problem? Please give me a suggestion! Thanks!

推荐答案

AOSP 一个数千兆字节的下载,所以你无能为力.但是,将 -c/--current-branch 选项传递给 repo sync 会导致 Repo 告诉 Git 只获取您真正需要的分支而不是每个存储库的所有分支.对于像 Gingerbread 这样的旧版本,理论上这应该是非常有益的.但是,Repo 使用它通过 HTTP 下载的 Git 包为存储库播种,并且包文件不受 -c 选项的影响.使用 --no-clone-bundle 禁用捆绑文件.因此,以下 Repo 命令应该会产生最小的下载量:

AOSP is a multi-gigabyte download so there's not that much you can do. However, passing the -c/--current-branch option to repo sync causes Repo to tell Git to only fetch the branch you really need instead of all branches of each repository. With an old release like Gingerbread this should theoretically be quite beneficial. However, Repo seeds the repositories with Git bundles that it downloads via HTTP, and the bundle files aren't affected by the -c option. Using --no-clone-bundle disables the bundle files. Hence the following Repo command should yield the smallest download:

repo sync -c --no-clone-bundle

(请记住,Gingerbread 是一个几年前的版本.它不能在许多最新硬件上开箱即用.)

(Keep in mind that Gingerbread is a several year old release. It won't work out of the box on a lot of recent hardware.)

这篇关于AOSP 存储库同步时间过长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)