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

The size of the latest AOSP source code is quite large (about 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 whole repo history? This will save you a lot of bandwidth and memory.

+7
git android android-source
source share
2 answers

You can specify --depth 1 git clone . He will receive only the last shot.

+8
source share

Step to download Android source code (AOSP) in Ubuntu

  • First create one folder like " aosp-m " to copy the AOSP code on your computer.

  • Open a terminal (Ctrl + Alt + T) and change your Dir to the last created Dir let say " aosp-m "

  • After that, run the following command in the terminal: - git clone git: // gitz01 / cm / download / android / manifest if this link does not work, try this repo init -u https://android.googlesource.com/platform/manifest

  • Run the following command in the terminal one after another git config --global user.name "Your name" git config --global user.email " you@example.com "

  • then run the following command to initialize the repo init -u git repo: // gitz01 / cm / download / android / manifest -b master -m identmanifest.xml if this link doesn't work try this repo init --depth = 1 -u https : //android.googlesource.com/platform/manifest -b identmanifest.xml here you can replace identmanifest.xml with the desired AOSP source code, Let Say " android-6.0.1_r10.xml " marshmellow.

  • and in the last run of the " repo sync ". This command starts downloading the desired AOSP code on your computer. This download takes more than 1 hour (depending on the speed of your Internet connection) to download the source code. Thats it ... Happy Coding .......

0
source share

All Articles