To obtain the source code for third-party components distributed by Google in binary form within an Android product, where the open source license grants you the right to receive the source, go to http://android.googlesource.com. You can find instructions for downloading the source at Download the Android source.
If the source code for the component isn't available on http://android.googlesource.com, you can receive a copy of the source code by submitting the following form:
Request source code
Your information will be used in accordance with Google's Privacy Policy.
We might charge you a fee to cover the cost of processing. Your request must be sent according to whichever of the following rules applies:
Within three years of the date you received the product from Google that included the component or binary files that are the subject of your request.
In the case of code licensed under the GPL v3, for as long as Google offers spare parts or customer support for that product model.