Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android source code download

I have a few questions regarding android source code download, repo / git.

This page says that The source download is approximately 6GB in size, but when I downloaded my directory size is 11GB. What did I do wrong?

I downloaded the source code using
repo init -u https://android.googlesource.com/platform/manifest
Does it download source code for all versions of Android? If so, I don't see separate directories for different versions. How to check/list all available versions?

And what would have changed if I had used
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1 instead?

Also repo branches outputs (no branches)

like image 959
user1010 Avatar asked Feb 25 '12 07:02

user1010


People also ask

Is Android source code available?

The Android source code is open, so anyone can use it to build any kind of device.

Where is Android App source code?

May be the easy one to see the source: In Android studio 2.3, Build -> Analyze APK -> Select the apk that you want to decompile . You will see it's source code.

Is Android 12 open source?

Android is an open source operating system for mobile devices and a corresponding open source project led by Google.


1 Answers

I can answer you for several your questions:

The source download is approximately 6GB in size, but when I downloaded my directory size is 11GB. What did I do wrong?

You did nothing wrong. Actually this source is not updated with new information. Now sources about 11Gb and if you build them they will take about 16 Gb.

I downloaded the source code using repo init -u https://android.googlesource.com/platform/manifest Does it download source code for all versions of Android? If so, I don't see separate directories for different versions.

Android sources are under git version control system. They are separated in the number of projects. So to deal with all this project the Android team created a special tool called repo. You can read how to use it here.

And what would have changed if I had used repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1 instead?

In the first case you'll sync with the more recent version of Android. This version is not always stable. While in the latter case you switch to the tag that is assigned to a stable version. For instance, I guess now is the more recent version is 4.0.4... So in the first case you'll download this more recent version (that are under development and actually developers post their code to this version), while in the latter case you will download 4.0.1 version.

like image 79
Yury Avatar answered Oct 11 '22 09:10

Yury