How to download only a working directory of the AOSP source code without the entire repo history?

妖精的绣舞 提交于 2019-12-01 00:35:18

问题


The size of the latest AOSP source code is rather large (around 30-35 Gb for the .repo directory and another 15 Gb or so for the working directory). Is there a way to download only a snapshot of the latest version of the source code (official marshmallow release) without the entire repo history? That would save me a lot in bandwidth and storage.


回答1:


You can specify --depth 1 to git clone command. It will only get the latest snapshot.




回答2:


Step to download android source code(AOSP) in Ubuntu

  1. First create one folder like "aosp-m" to copy AOSP code in your machine.

  2. Open terminal(Ctrl+Alt+T) and change your Dir to latest created Dir let say "aosp-m"

  3. After that Run the following command in terminal :- git clone git://gitz01/cm/download/android/manifest if this link not work then try this one repo init -u https://android.googlesource.com/platform/manifest

  4. Run Following command in terminal one by one git config --global user.name "Your Name" git config --global user.email "you@example.com"

  5. then run following command for repo init repo init -u git://gitz01/cm/download/android/manifest -b master -m identifiedmanifest.xml if this link not work then try this one repo init --depth=1 -u https://android.googlesource.com/platform/manifest -b identifiedmanifest.xml here you can replace identifiedmanifest.xml to your desired AOSP source code , Let Say "android-6.0.1_r10.xml" marshmellow.

  6. and in the last run "repo sync" command. This command start downloading your desired AOSP code in your machine. This opertation take more than 1 hours(depending on your internet connection speed) to download source code. Thats it... Happy Coding.......



来源:https://stackoverflow.com/questions/33053615/how-to-download-only-a-working-directory-of-the-aosp-source-code-without-the-ent

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