How to limit the size of the Android source I need to download with “repo sync”


I'm planning to leave for a country with a poor Internet connection, where I hope to do some software development.

I have been using repo sync to sync the Android source (and the CyanogenMod source on my AWS server). But they are so large (> 30 GB) that I won't get them before I leave my country.

Is there any way I can exclude code from the tree? I only need the Nexus 7 (wifi) (grouper) device. Can I exclude any projects? If so, how?

I'm using Ubuntu 12.04 and repo.

(I am using Android tablets for educating children in very poor parts of the world. I want to lock down the UI, so that children can only use the educational app(s). As an anti-theft measure, I need to enable creation of a Wi-Fi hot spot and get the tablets to disable themselves if not connected to other tablets via Wi-Fi for 48 hours.)

Best Answer

This might be too late. But:

  • You could pass --depth=1 to repo init to get a shallow clone.
  • And you could use repo sync -c to checkout only the current branch.