Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find Android source code online? [closed]

Where can I browse the source code for any Android Open Source Project (AOSP) application (for example the Contacts application)? Is the only way to clone the entire source repository for all of AOSP?

like image 935
pupeno Avatar asked Jan 16 '09 07:01

pupeno


People also ask

Where can I see Android source code?

Since December 2019, you can use the new official public code search tool for AOSP: cs.android.com. There's also the Android official source browser (based on Gitiles) has a web view of many of the different parts that make up android.

Is Android source code available?

To that end, Android is a full, production-quality operating system for consumer products, complete with customizable source code that can be ported to nearly any device and public documentation that is available to everyone (in English at source.android.com and in Simplified Chinese at source.android.google.cn).

What is AOSP source code?

The Android Open Source Project (AOSP) is a collection of Git repositories, which are managed together using the Repo tool. Most Android development tools (such as GitHub) can't see the source code the way that it's laid out when it's checked out on the system.


6 Answers

Everything is mirrored on omapzoom.org. Some of the code is also mirrored on github.

Contacts is here for example.

Since December 2019, you can use the new official public code search tool for AOSP: cs.android.com. There's also the Android official source browser (based on Gitiles) has a web view of many of the different parts that make up android. Some of the projects (such as Kernel) have been removed and it now only points you to clonable git repositories.

To get all the code locally, you can use the repo helper program, or you can just clone individual repositories.

And others:

  • Downloading the Source Tree
like image 63
richq Avatar answered Oct 19 '22 05:10

richq


2020: The official AOSP code search https://cs.android.com/


You can view the source code through http://developer.android.com, when you're reading the API there will be a link to the matching source code on GitHub, you just need to add the Android SDK Reference Search Plugin on Chrome.

I blogged about it here:
http://blog.blundellapps.com/add-source-code-links-to-android-apis/

enter image description here

like image 39
Blundell Avatar answered Oct 19 '22 03:10

Blundell


I stumbled across Android XRef the other day and found it useful, especially since it is backed by OpenGrok which offers insanely awesome and blindingly fast search.

like image 31
scorpiodawg Avatar answered Oct 19 '22 04:10

scorpiodawg


I've found a way to get only the Contacts application:

git clone https://android.googlesource.com/platform/packages/apps/Contacts

which is good enough for me for now, but doesn't answer the question of browsing the code on the web.

like image 27
pupeno Avatar answered Oct 19 '22 05:10

pupeno


You can browse Android SDK samples from your smartphone using "Code Search": https://market.android.com/details?id=sqwady.codesearch

like image 32
Eyal Avatar answered Oct 19 '22 03:10

Eyal


This eclipse plugin allows for inline source viewing and even stepping inside the Android source code:

http://code.google.com/p/adt-addons/

(edit: specifically the "Android Sources" plugin: http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update/)

like image 32
Rangel Reale Avatar answered Oct 19 '22 04:10

Rangel Reale