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
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 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
(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.)