Is android studio an open source project?
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
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.