Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selectively download Android source code

I am following Google's documentation on how to download the source code for Android. But my ISP is very slow and I have been downloading things for 5 days now.

I have noticed it downloads support for many devices that I don't want like LG nexus etc. Is there a way to download just the core source code and support for Nexus 7 (2013, flo) easily?

like image 385
alcarv Avatar asked Apr 13 '15 00:04

alcarv


1 Answers

It seems the preferred way to do it is by using groups in defined in the manifest. That's available with repo's -g option, as I found here.

Like this example, for working with on ARM system image from the emulator:

repo init -u ... -g all,-notdefault,-device,-mips,-x86,-darwin

I guess in my case I would use:

repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.4_r1 \
  -g all,-notdefault,-linux,-mips,-x86,-device,flo

Meaning I will download all groups excluding notdefault, linux pre-built tools, mips and x86 buildng architectures and all devices. But then I add just the flo device which is my Nexus 7.

Another usefull option I found in repo is the -c when syncing which will fetch only the current branch from server:

repo sync -c
like image 167
alcarv Avatar answered Sep 22 '22 01:09

alcarv