简体   繁体   中英

Download Specific Android Source Code

I would just like to know how to download specific version of Android Source Code. I have already tried the following command

repo init -u https://android.googlesource.com/platform/manifest
repo sync

and I was able to download gingerbread 2.3.4. However, I would also like to download 2.3.3. Is there anyone who can tell me the proper command? Is there also a way to the download the source code without version files because I have no plans of changing the source code and uploading?

You could download the source from
http://grepcode.com/snapshot/repository.grepcode.com/java/ext/com.google.android/android/2.3.4_r1

Other versions are also available. You could search them in this site.

I was able to download 2.3.3 by using the these commands:

repo init -u git://android.git.kernel.org/platform/manifest.git -b android-2.3.3_r1
repo sync

Thanks for your help.

Although this question has been answered, none of the answers work for me. It took me a while to figure this out, so I thought I would share the answer as it may save someone some pain.

To download the source code go to the github mirror, you can download a ZIP (see the left of the screenshot the "Download ZIP" button) and select the tag of the version you want. See this screen shot.

在此输入图像描述

There is not the android-2.3.4_r1 tag in https://android.googlesource.com/platform/manifest repository.

For example, https://android.googlesource.com/platform/dalvik repository has the android-2.3.4_r1 tag. You are able to see that tag on https://android.googlesource.com/platform/dalvik/+refs .

To sum up, the android-2.3.4_r1 tag is tagged in a part of android repositories.

If you check the android-2.3.4_r1 tagging source code on dalvik, try this commands as below.

repo init -u https://android.googlesource.com/platform/manifest
repo sync
cd dalvik
git checkout android-2.3.4_r1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM