Android source code download

爷,独闯天下 提交于 2019-12-09 10:34:07

问题


I have a few questions regarding android source code download, repo / git.

This page says that The source download is approximately 6GB in size, but when I downloaded my directory size is 11GB. What did I do wrong?

I downloaded the source code using
repo init -u https://android.googlesource.com/platform/manifest
Does it download source code for all versions of Android? If so, I don't see separate directories for different versions. How to check/list all available versions?

And what would have changed if I had used
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1 instead?

Also repo branches outputs (no branches)


回答1:


I can answer you for several your questions:

The source download is approximately 6GB in size, but when I downloaded my directory size is 11GB. What did I do wrong?

You did nothing wrong. Actually this source is not updated with new information. Now sources about 11Gb and if you build them they will take about 16 Gb.

I downloaded the source code using repo init -u https://android.googlesource.com/platform/manifest Does it download source code for all versions of Android? If so, I don't see separate directories for different versions.

Android sources are under git version control system. They are separated in the number of projects. So to deal with all this project the Android team created a special tool called repo. You can read how to use it here.

And what would have changed if I had used repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1 instead?

In the first case you'll sync with the more recent version of Android. This version is not always stable. While in the latter case you switch to the tag that is assigned to a stable version. For instance, I guess now is the more recent version is 4.0.4... So in the first case you'll download this more recent version (that are under development and actually developers post their code to this version), while in the latter case you will download 4.0.1 version.



来源:https://stackoverflow.com/questions/9442214/android-source-code-download

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!