41

Is Android Studio an open source project? If it is, where can I get its source code?

Can we add plugins for Android Studio?

Where is the API available for Android Studio?

Ted Nyberg
  • 7,001
  • 7
  • 41
  • 72
Naresh Kumar
  • 604
  • 1
  • 5
  • 11

7 Answers7

35

Indeed Android Studio is an open source project. It encourages developers to work on plugins and extensions. You can get the source code here

https://android.googlesource.com/platform/tools/adt/idea/+/refs/heads/mirror-goog-studio-master-dev

Vadim Caen
  • 1,526
  • 11
  • 21
  • 1
    Looks like Android Studio 3 has not been open sourced yet: https://android.googlesource.com/platform/manifest/+refs – mbonnin Sep 18 '17 at 17:04
  • FTR: the source code for android studio emulator is covered in [this question](https://stackoverflow.com/q/8134089/2388257). – Hi-Angel Oct 23 '17 at 09:37
10

Well some of android studio may be but the binary build of the SDK is not. (https://developer.android.com/studio/terms.html). People have asserted that the source code is open source, but this is difficult confirm. But a lot of the source is distributed under the apache project license.

Terms for the binary build of android studio

It has some objectionable terms:

"2.1 In order to use the SDK, you must first agree to the License Agreement. You may not use the SDK if you do not accept the License Agreement." <-- This may well violate the terms of any copyleft part of the the SDK... though I doubt anything is copyleft. Probably not enforceable.

"3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the SDK." <-- Probably not enforceable, unless you distribute things

"4.2 You agree to use the SDK and write applications only for purposes that are permitted by (a) the License Agreement and" <-- You aren't even allowed to use android studio.

Copyright status of the source code

This posts states that these restrictions only apply to the "binary", so maybe you could just build this from source code, the license is not clear about this.

http://www.zdnet.com/article/no-google-is-not-making-the-android-sdk-proprietary-whats-the-fuss-about/

Who knows if it's true, the source code is not exactly easy to get: (see http://tools.android.com/build/studio). I could not find a list of licenses, the studio code is spread across multiple repos: https://android.googlesource.com/platform/manifest/+/studio-2.2.2/default.xml and looking at a few repositories each source file seems to be copyrighted separately under APL v2.0.

Att Righ
  • 1,439
  • 1
  • 16
  • 29
  • 3
    Oops, looks like I've written something worthy of downvoting. For reference here is a definition of open source: https://opensource.org/osd Note that is distinct from merely being able to download the source code. – Att Righ Feb 11 '17 at 08:03
  • There have been efforts by F-Droid, Debian and android-rebuilds to rebuild the SDK from source and providing truely free builds: https://android-rebuilds.beuc.net/ https://wiki.debian.org/AndroidTools Might be worth adding this to your answer. – Forivin Nov 01 '20 at 23:50
7

Just a little addition:

Android Studio is based on a bare version of IntelliJ which is open source. The guys from Google added the Android taste on top of IntelliJ and release this under Apache 2 license which is also open source.

Ben Groot
  • 5,040
  • 3
  • 40
  • 47
5

Here's a little more specific and hopefully clearer information...

The following is from http://tools.android.com/build/studio:

After following the download instructions (here), you will have the Android plugin source code under tools/adt/idea, the IntelliJ IDE base in tools/idea/, and a lot of shared libraries in tools/base/.

So...

The source code for Android Plug-in is available here: https://android.googlesource.com/platform/tools/adt/idea/

The source code for Android Studio is available here: https://android.googlesource.com/platform/tools/idea/

Jesse
  • 1,603
  • 19
  • 20
  • ⁺¹ for browsable links. [The "official" URLs](https://android.googlesource.com/platform/manifest) Google gives might work for downloading, but do not show a code in a browser. – Hi-Angel Oct 23 '17 at 09:26
1

Android Studio is an open source project. and it is hosted as git reposotiry

Link : http://tools.android.com/build/studio

0

In order to checkout the latest Android Studio you have to use instructions from this page: https://android.googlesource.com/platform/tools/base/+/studio-master-dev/source.md

  1. Download an install the repo tool to checkout the source of Android Studio.

  2. Check out the latest published source code using the following commands in a shell

$ mkdir studio-master-dev
$ cd studio-master-dev
$ repo init -u https://android.googlesource.com/platform/manifest -b studio-master-dev
$ repo sync -c -j4 -q
jreznot
  • 2,694
  • 2
  • 35
  • 53
0

It's free opensource software, but Google releases only EULA (hence non-free) builds.

EULA-free binary builds are available here: https://android-rebuilds.beuc.net/

See also: https://opensource.stackexchange.com/questions/10122/is-there-a-free-open-source-version-of-android-sdk-available-for-use

andreoss
  • 1,570
  • 1
  • 10
  • 25