1

I'm trying to build custom rom for my device from CM source.I'm following this guide to build:

https://wiki.cyanogenmod.org/w/Build_for_quark

I'm using this command to sync the source.

repo init -u https://github.com/CyanogenMod/android.git -b cm-12.1

During download i can see other branches like 7,8,9,10,11,12.Is there any way to download only current branch (12.1)?

1 Answers1

4

The repo sync command is same as git clone when used without any flags, that means you are simply downloading all the branches from all the repositories defined in the manifest file (visit this and see the default.xml file).

To download only the current branch that is cm-12.1, use the -c flag while using the repo sync command. Note that the Android source is made from many projects and is a huge download when you are syncing for the first time.

So your commands should be:

  1. repo init -u https://github.com/CyanogenMod/android.git -b cm-12.1
  2. repo sync -c

For a better understanding of how repo tool works just read this article.

I hope this helps.

Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
Nikhil Sharma
  • 891
  • 1
  • 8
  • 11