Viewing and searching the Android source code is simple. You simply visit the AndroidXRef website.
But, if you want to build and run the bleeding-edge version of Superuser, you must first download an entire Android source tree.
Imagine that I want to grab the Android "master" branch from source control.
If I follow Google's official instructions:
- The operation will definitely take at least an hour. It may take half a day or more.
- It will probably pull in tens of gigabytes of data. Where I live, ISPs sometimes charge an "overage fee" when users pull in tens of gigabytes of data in one month. I don't enjoy paying fees or surcharges.
In short, doing an ordinary repo sync
command would probably be slow and wasteful. I don't need the entire history of Android development; and I don't have infinite disk space.
How can I check out the Android source code more quickly?
I know that doing a "shallow clone" would help. How can I do this?
Rakesh writes, elsewhere, that
repo sync -c
will help. Will it? I've read the documentation for the-c
option. But I don't understand Git well enough to know whether or not the option will actually help at all. Here's a related discussion.(Optional:) Are there any other tips or tricks which can I use to speed up the checkout operation?
(Optional:) In the end, how much disk space will I require in order to hold the checked-out code?
P.S. I thank durron597 for the advice s/he gave me in chat last week. Any resulting improvements which have been made to this question are all thanks to him/her.