如何使用"回购"克隆最小的Andr​​oid源? [英] how to use "repo" to clone minimal android source?

查看:172
本文介绍了如何使用"回购"克隆最小的Andr​​oid源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够通过使用回购工具克隆Android源$ C ​​$ C。然而,我想要做的是克隆源$ C ​​$ C比有一个11GB的足迹更最小的方式。这似乎下载相关的每一个Android设备和每一个先前版本的东西。我试着想我可以检查出具体的分支像这样减少这种

I am able to clone the Android source code by using the "repo" tool. However, what I want to do is clone the source code in a more minimal way than having an 11GB footprint. It seems to download things related to every Android device and every prior release. I tried thought I could reduce this by checking out a specific branch like this:

repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1

不过,最终发生的是,我仍然可以参与一切,只是在一个特定的快照(可以理解)。但是,有没有什么办法来限制克隆了多少?

However, what ends up happening is that I still get everything involved, just at a specific snapshot (understandable). But is there any way to limit the amount that is cloned?

推荐答案

Android的源代码树是由许多独立的Git仓库,里面全是由回购管理的。你不能真正降低的下载一个给定的Git仓库中的数据量。

The android source tree is made up of many separate git repositories, which are all managed by repo. You can't really reduce the amount of data that's downloaded for a given git repository.

但是,你只能下载git的回购协议可用,使用回购同步℃的子集;项目> 。即如果你只想要的框架/基础包,你应该能够做到回购同步框架/基,做最初的回购初始化后,

However, you can only download a subset of the git repos that are available, using repo sync <project>. I.e. if you only wanted the frameworks/base package, you should be able to do repo sync frameworks/base, after doing the initial repo init.

如果你实际上是想打造虽然源,你可能要完整的东西。

If you are actually wanting to build the source though, you probably want the full thing.

您可能能够通过删除你不需要的设备库,以节省一两演出。您可以通过编辑&LT做到这一点;源方式&gt;。/回购/ manifest.xml文件和删除您不想要的设备的仓库

You might be able to save a gig or two by removing the device repositories that you don't need. You can do this by editing <source>/.repo/manifest.xml and removing the repositories for the devices you don't want.

这篇关于如何使用&QUOT;回购&QUOT;克隆最小的Andr​​oid源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆