windows下,下载android源码
2014-02-21 17:43
232 查看
1、下载Git
官方下载:http://code.google.com/p/msysgit/downloads/list
2、运行GitBash (不是Git
GUI),依次执行以下命令
官方下载:http://code.google.com/p/msysgit/downloads/list
2、运行GitBash (不是Git
GUI),依次执行以下命令
①cd g:\git-source (自己装源码的目录) ②git clone http://android.googlesource.com/platform/manifest.git[/code]③cd manifest④git tag⑤git checkout android-4.1.2_r2
这五步执行下来后,manifest目录下的default.xml里的内容,就是android4.1.2 的源码路径信息。
3、git clone http://android.googlesource.com/ + default.xml中的name属性 + .git即可下载相应的资源,如下图:
也可以解析之后,批量下载。
解析代码:public class XmlPar { private static StringBuilder strBuilder = new StringBuilder(); /** * @param args */ public static void main(String[] args) { File file = new File( "E:/workspace/wifier/JavaXmlParser/src/default.xml"); // E:\workspace\wifier\JavaXmlParser\src\XmlPar.java try { parserXml(file); } catch (Exception e) { e.printStackTrace(); } } private static void parserXml(File file) throws Exception { SAXParserFactory saxParFac = SAXParserFactory.newInstance(); SAXParser saxParser = saxParFac.newSAXParser(); saxParser.parse(file, new DefaultHandler() { @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if("project".endsWith(qName)){ String value = attributes.getValue("name"); strBuilder.append("git clone http://android.googlesource.com/"+value+".git\n"); } super.startElement(uri, localName, qName, attributes); } @Override public void endDocument() throws SAXException { System.out.println(strBuilder.toString()); super.endDocument(); } }); } }
注:全部是http,而非https
附4.1.2的地址:git clone http://android.googlesource.com/platform/build.git git clone http://android.googlesource.com/platform/abi/cpp.git git clone http://android.googlesource.com/platform/bionic.git git clone http://android.googlesource.com/platform/bootable/bootloader/legacy.git git clone http://android.googlesource.com/platform/bootable/diskinstaller.git git clone http://android.googlesource.com/platform/bootable/recovery.git git clone http://android.googlesource.com/platform/cts.git git clone http://android.googlesource.com/platform/dalvik.git git clone http://android.googlesource.com/platform/development.git git clone http://android.googlesource.com/device/asus/grouper.git git clone http://android.googlesource.com/device/common.git git clone http://android.googlesource.com/device/generic/armv7-a-neon.git git clone http://android.googlesource.com/device/generic/armv7-a.git git clone http://android.googlesource.com/device/generic/goldfish.git git clone http://android.googlesource.com/device/google/accessory/arduino.git git clone http://android.googlesource.com/device/google/accessory/demokit.git git clone http://android.googlesource.com/device/moto/common.git git clone http://android.googlesource.com/device/moto/stingray.git git clone http://android.googlesource.com/device/moto/wingray.git git clone http://android.googlesource.com/device/sample.git git clone http://android.googlesource.com/device/samsung/crespo.git git clone http://android.googlesource.com/device/samsung/crespo4g.git git clone http://android.googlesource.com/device/samsung/maguro.git git clone http://android.googlesource.com/device/samsung/toro.git git clone http://android.googlesource.com/device/samsung/tuna.git git clone http://android.googlesource.com/device/ti/panda.git git clone http://android.googlesource.com/platform/docs/source.android.com.git git clone http://android.googlesource.com/platform/external/aac.git git clone http://android.googlesource.com/platform/external/android-mock.git git clone http://android.googlesource.com/platform/external/antlr.git git clone http://android.googlesource.com/platform/external/apache-harmony.git git clone http://android.googlesource.com/platform/external/apache-http.git git clone http://android.googlesource.com/platform/external/apache-xml.git git clone http://android.googlesource.com/platform/external/astl.git git clone http://android.googlesource.com/platform/external/bison.git git clone http://android.googlesource.com/platform/external/blktrace.git git clone http://android.googlesource.com/platform/external/bluetooth/bluez.git git clone http://android.googlesource.com/platform/external/bluetooth/glib.git git clone http://android.googlesource.com/platform/external/bluetooth/hcidump.git git clone http://android.googlesource.com/platform/external/bouncycastle.git git clone http://android.googlesource.com/platform/external/bsdiff.git git clone http://android.googlesource.com/platform/external/bzip2.git git clone http://android.googlesource.com/platform/external/checkpolicy.git git clone http://android.googlesource.com/platform/external/chromium.git git clone http://android.googlesource.com/platform/external/chromium-trace.git git clone http://android.googlesource.com/platform/external/cibu-fonts.git git clone http://android.googlesource.com/platform/external/clang.git git clone http://android.googlesource.com/platform/external/compiler-rt.git git clone http://android.googlesource.com/platform/external/dbus.git git clone http://android.googlesource.com/platform/external/dexmaker.git git clone http://android.googlesource.com/platform/external/dhcpcd.git git clone http://android.googlesource.com/platform/external/dnsmasq.git git clone http://android.googlesource.com/platform/external/doclava.git git clone http://android.googlesource.com/platform/external/dropbear.git git clone http://android.googlesource.com/platform/external/e2fsprogs.git git clone http://android.googlesource.com/platform/external/easymock.git git clone http://android.googlesource.com/platform/external/eclipse-basebuilder.git git clone http://android.googlesource.com/platform/external/eclipse-windowbuilder.git git clone http://android.googlesource.com/platform/external/elfutils.git git clone http://android.googlesource.com/platform/external/embunit.git git clone http://android.googlesource.com/platform/external/emma.git git clone http://android.googlesource.com/platform/external/esd.git git clone http://android.googlesource.com/platform/external/expat.git git clone http://android.googlesource.com/platform/external/eyes-free.git git clone http://android.googlesource.com/platform/external/fdlibm.git git clone http://android.googlesource.com/platform/external/flac.git git clone http://android.googlesource.com/platform/external/freetype.git git clone http://android.googlesource.com/platform/external/fsck_msdos.git git clone http://android.googlesource.com/platform/external/ganymed-ssh2.git git clone http://android.googlesource.com/platform/external/gcc-demangle.git git clone http://android.googlesource.com/platform/external/genext2fs.git git clone http://android.googlesource.com/platform/external/giflib.git git clone http://android.googlesource.com/platform/external/google-diff-match-patch.git git clone http://android.googlesource.com/platform/external/grub.git git clone http://android.googlesource.com/platform/external/gtest.git git clone http://android.googlesource.com/platform/external/guava.git git clone http://android.googlesource.com/platform/external/hamcrest.git git clone http://android.googlesource.com/platform/external/harfbuzz.git git clone http://android.googlesource.com/platform/external/hyphenation.git git clone http://android.googlesource.com/platform/external/icu4c.git git clone http://android.googlesource.com/platform/external/iproute2.git git clone http://android.googlesource.com/platform/external/ipsec-tools.git git clone http://android.googlesource.com/platform/external/iptables.git git clone http://android.googlesource.com/platform/external/javasqlite.git git clone http://android.googlesource.com/platform/external/javassist.git git clone http://android.googlesource.com/platform/external/jdiff.git git clone http://android.googlesource.com/platform/external/jhead.git git clone http://android.googlesource.com/platform/external/jmdns.git git clone http://android.googlesource.com/platform/external/jmonkeyengine.git git clone http://android.googlesource.com/platform/external/jpeg.git git clone http://android.googlesource.com/platform/external/jsilver.git git clone http://android.googlesource.com/platform/external/jsr305.git git clone http://android.googlesource.com/platform/external/junit.git git clone http://android.googlesource.com/platform/external/kernel-headers.git git clone http://android.googlesource.com/platform/external/libffi.git git clone http://android.googlesource.com/platform/external/libgsm.git git clone http://android.googlesource.com/platform/external/liblzf.git git clone http://android.googlesource.com/platform/external/libmtp.git git clone http://android.googlesource.com/platform/external/libnfc-nxp.git git clone http://android.googlesource.com/platform/external/libnl-headers.git git clone http://android.googlesource.com/platform/external/libpcap.git git clone http://android.googlesource.com/platform/external/libphonenumber.git git clone http://android.googlesource.com/platform/external/libpng.git git clone http://android.googlesource.com/platform/external/libselinux.git git clone http://android.googlesource.com/platform/external/libsepol.git git clone http://android.googlesource.com/platform/external/libusb.git git clone http://android.googlesource.com/platform/external/libusb-compat.git git clone http://android.googlesource.com/platform/external/libvpx.git git clone http://android.googlesource.com/platform/external/libxml2.git git clone http://android.googlesource.com/platform/external/libxslt.git git clone http://android.googlesource.com/platform/external/libyuv.git git clone http://android.googlesource.com/platform/external/linux-tools-perf.git git clone http://android.googlesource.com/platform/external/littlemock.git git clone http://android.googlesource.com/platform/external/llvm.git git clone http://android.googlesource.com/platform/external/lohit-fonts.git git clone http://android.googlesource.com/platform/external/markdown.git git clone http://android.googlesource.com/platform/external/mdnsresponder.git git clone http://android.googlesource.com/platform/external/mesa3d.git git clone http://android.googlesource.com/platform/external/mksh.git git clone http://android.googlesource.com/platform/external/mockwebserver.git git clone http://android.googlesource.com/platform/external/mtpd.git git clone http://android.googlesource.com/platform/external/naver-fonts.git git clone http://android.googlesource.com/platform/external/netcat.git git clone http://android.googlesource.com/platform/external/netperf.git git clone http://android.googlesource.com/platform/external/neven.git git clone http://android.googlesource.com/platform/external/nist-sip.git git clone http://android.googlesource.com/platform/external/oauth.git git clone http://android.googlesource.com/platform/external/opencv.git git clone http://android.googlesource.com/platform/external/openfst.git git clone http://android.googlesource.com/platform/external/openssh.git git clone http://android.googlesource.com/platform/external/openssl.git git clone http://android.googlesource.com/platform/external/oprofile.git git clone http://android.googlesource.com/platform/external/ping.git git clone http://android.googlesource.com/platform/external/ping6.git git clone http://android.googlesource.com/platform/external/ppp.git git clone http://android.googlesource.com/platform/external/proguard.git git clone http://android.googlesource.com/platform/external/protobuf.git git clone http://android.googlesource.com/platform/external/qemu.git git clone http://android.googlesource.com/platform/external/qemu-pc-bios.git git clone http://android.googlesource.com/platform/external/quake.git git clone http://android.googlesource.com/platform/external/regex-re2.git git clone http://android.googlesource.com/platform/external/replicaisland.git git clone http://android.googlesource.com/platform/external/safe-iop.git git clone http://android.googlesource.com/platform/external/sepolicy.git git clone http://android.googlesource.com/platform/external/skia.git git clone http://android.googlesource.com/platform/external/smali.git git clone http://android.googlesource.com/platform/external/sonivox.git git clone http://android.googlesource.com/platform/external/speex.git git clone http://android.googlesource.com/platform/external/sqlite.git git clone http://android.googlesource.com/platform/external/srec.git git clone http://android.googlesource.com/platform/external/srtp.git git clone http://android.googlesource.com/platform/external/stlport.git git clone http://android.googlesource.com/platform/external/strace.git git clone http://android.googlesource.com/platform/external/stressapptest.git git clone http://android.googlesource.com/platform/external/svox.git git clone http://android.googlesource.com/platform/external/tagsoup.git git clone http://android.googlesource.com/platform/external/tcpdump.git git clone http://android.googlesource.com/platform/external/tinyalsa.git git clone http://android.googlesource.com/platform/external/tinyxml.git git clone http://android.googlesource.com/platform/external/tremolo.git git clone http://android.googlesource.com/platform/external/v8.git git clone http://android.googlesource.com/platform/external/valgrind.git git clone http://android.googlesource.com/platform/external/webkit.git git clone http://android.googlesource.com/platform/external/webp.git git clone http://android.googlesource.com/platform/external/webrtc.git git clone http://android.googlesource.com/platform/external/wpa_supplicant_6.git git clone http://android.googlesource.com/platform/external/wpa_supplicant_8.git git clone http://android.googlesource.com/platform/external/xmlwriter.git git clone http://android.googlesource.com/platform/external/yaffs2.git git clone http://android.googlesource.com/platform/external/zlib.git git clone http://android.googlesource.com/platform/external/zxing.git git clone http://android.googlesource.com/platform/frameworks/av.git git clone http://android.googlesource.com/platform/frameworks/base.git git clone http://android.googlesource.com/platform/frameworks/compile/libbcc.git git clone http://android.googlesource.com/platform/frameworks/compile/linkloader.git git clone http://android.googlesource.com/platform/frameworks/compile/mclinker.git git clone http://android.googlesource.com/platform/frameworks/compile/slang.git git clone http://android.googlesource.com/platform/frameworks/ex.git git clone http://android.googlesource.com/platform/frameworks/mff.git git clone http://android.googlesource.com/platform/frameworks/ml.git git clone http://android.googlesource.com/platform/frameworks/native.git git clone http://android.googlesource.com/platform/frameworks/opt/calendar.git git clone http://android.googlesource.com/platform/frameworks/opt/emoji.git git clone http://android.googlesource.com/platform/frameworks/opt/inputmethodcommon.git git clone http://android.googlesource.com/platform/frameworks/opt/mailcommon.git git clone http://android.googlesource.com/platform/frameworks/opt/vcard.git git clone http://android.googlesource.com/platform/frameworks/rs.git git clone http://android.googlesource.com/platform/frameworks/support.git git clone http://android.googlesource.com/platform/frameworks/testing.git git clone http://android.googlesource.com/platform/frameworks/wilhelm.git git clone http://android.googlesource.com/platform/gdk.git git clone http://android.googlesource.com/platform/hardware/broadcom/wlan.git git clone http://android.googlesource.com/platform/hardware/invensense.git git clone http://android.googlesource.com/platform/hardware/libhardware.git git clone http://android.googlesource.com/platform/hardware/libhardware_legacy.git git clone http://android.googlesource.com/platform/hardware/msm7k.git git clone http://android.googlesource.com/platform/hardware/qcom/gps.git git clone http://android.googlesource.com/platform/hardware/qcom/media.git git clone http://android.googlesource.com/platform/hardware/ril.git git clone http://android.googlesource.com/platform/hardware/ti/omap3.git git clone http://android.googlesource.com/platform/hardware/ti/omap4xxx.git git clone http://android.googlesource.com/platform/hardware/ti/wlan.git git clone http://android.googlesource.com/platform/hardware/ti/wpan.git git clone http://android.googlesource.com/platform/libcore.git git clone http://android.googlesource.com/platform/libnativehelper.git git clone http://android.googlesource.com/platform/ndk.git git clone http://android.googlesource.com/platform/packages/apps/BasicSmsReceiver.git git clone http://android.googlesource.com/platform/packages/apps/Bluetooth.git git clone http://android.googlesource.com/platform/packages/apps/Browser.git git clone http://android.googlesource.com/platform/packages/apps/Calculator.git git clone http://android.googlesource.com/platform/packages/apps/Calendar.git git clone http://android.googlesource.com/platform/packages/apps/Camera.git git clone http://android.googlesource.com/platform/packages/apps/CellBroadcastReceiver.git git clone http://android.googlesource.com/platform/packages/apps/CertInstaller.git git clone http://android.googlesource.com/platform/packages/apps/Contacts.git git clone http://android.googlesource.com/platform/packages/apps/DeskClock.git git clone http://android.googlesource.com/platform/packages/apps/Email.git git clone http://android.googlesource.com/platform/packages/apps/Exchange.git git clone http://android.googlesource.com/platform/packages/apps/Gallery.git git clone http://android.googlesource.com/platform/packages/apps/Gallery2.git git clone http://android.googlesource.com/platform/packages/apps/HTMLViewer.git git clone http://android.googlesource.com/platform/packages/apps/KeyChain.git git clone http://android.googlesource.com/platform/packages/apps/Launcher2.git git clone http://android.googlesource.com/platform/packages/apps/LegacyCamera.git git clone http://android.googlesource.com/platform/packages/apps/Mms.git git clone http://android.googlesource.com/platform/packages/apps/Music.git git clone http://android.googlesource.com/platform/packages/apps/MusicFX.git git clone http://android.googlesource.com/platform/packages/apps/Nfc.git git clone http://android.googlesource.com/platform/packages/apps/PackageInstaller.git git clone http://android.googlesource.com/platform/packages/apps/Phone.git git clone http://android.googlesource.com/platform/packages/apps/Protips.git git clone http://android.googlesource.com/platform/packages/apps/Provision.git git clone http://android.googlesource.com/platform/packages/apps/QuickSearchBox.git git clone http://android.googlesource.com/platform/packages/apps/Settings.git git clone http://android.googlesource.com/platform/packages/apps/SoundRecorder.git git clone http://android.googlesource.com/platform/packages/apps/SpareParts.git git clone http://android.googlesource.com/platform/packages/apps/SpeechRecorder.git git clone http://android.googlesource.com/platform/packages/apps/Stk.git git clone http://android.googlesource.com/platform/packages/apps/Tag.git git clone http://android.googlesource.com/platform/packages/apps/VideoEditor.git git clone http://android.googlesource.com/platform/packages/apps/VoiceDialer.git git clone http://android.googlesource.com/platform/packages/experimental.git git clone http://android.googlesource.com/platform/packages/inputmethods/LatinIME.git git clone http://android.googlesource.com/platform/packages/inputmethods/OpenWnn.git git clone http://android.googlesource.com/platform/packages/inputmethods/PinyinIME.git git clone http://android.googlesource.com/platform/packages/providers/ApplicationsProvider.git git clone http://android.googlesource.com/platform/packages/providers/CalendarProvider.git git clone http://android.googlesource.com/platform/packages/providers/ContactsProvider.git git clone http://android.googlesource.com/platform/packages/providers/DownloadProvider.git git clone http://android.googlesource.com/platform/packages/providers/DrmProvider.git git clone http://android.googlesource.com/platform/packages/providers/MediaProvider.git git clone http://android.googlesource.com/platform/packages/providers/PartnerBookmarksProvider.git git clone http://android.googlesource.com/platform/packages/providers/TelephonyProvider.git git clone http://android.googlesource.com/platform/packages/providers/UserDictionaryProvider.git git clone http://android.googlesource.com/platform/packages/wallpapers/Basic.git git clone http://android.googlesource.com/platform/packages/wallpapers/Galaxy4.git git clone http://android.googlesource.com/platform/packages/wallpapers/HoloSpiral.git git clone http://android.googlesource.com/platform/packages/wallpapers/LivePicker.git git clone http://android.googlesource.com/platform/packages/wallpapers/MagicSmoke.git git clone http://android.googlesource.com/platform/packages/wallpapers/MusicVisualization.git git clone http://android.googlesource.com/platform/packages/wallpapers/NoiseField.git git clone http://android.googlesource.com/platform/packages/wallpapers/PhaseBeam.git git clone http://android.googlesource.com/platform/pdk.git git clone http://android.googlesource.com/platform/prebuilt.git git clone http://android.googlesource.com/platform/prebuilts/eclipse.git git clone http://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.6.git git clone http://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.6.git git clone http://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/mips/mipsel-linux-android-4.4.3.git git clone http://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/mips/mipsel-linux-android-4.6.git git clone http://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/x86/i686-android-linux-4.4.3.git git clone http://android.googlesource.com/platform/prebuilts/gcc/darwin-x86/x86/i686-linux-android-4.6.git git clone http://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6.git git clone http://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6.git git clone http://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.4.3.git git clone http://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6.git git clone http://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6.git git clone http://android.googlesource.com/platform/prebuilts/gcc/linux-x86/mips/mipsel-linux-android-4.4.3.git git clone http://android.googlesource.com/platform/prebuilts/gcc/linux-x86/mips/mipsel-linux-android-4.6.git git clone http://android.googlesource.com/platform/prebuilts/gcc/linux-x86/x86/i686-android-linux-4.4.3.git git clone http://android.googlesource.com/platform/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6.git git clone http://android.googlesource.com/platform/prebuilts/misc.git git clone http://android.googlesource.com/platform/prebuilts/ndk.git git clone http://android.googlesource.com/platform/prebuilts/qemu-kernel.git git clone http://android.googlesource.com/platform/prebuilts/sdk.git git clone http://android.googlesource.com/platform/prebuilts/tools.git git clone http://android.googlesource.com/platform/sdk.git git clone http://android.googlesource.com/platform/system/bluetooth.git git clone http://android.googlesource.com/platform/system/core.git git clone http://android.googlesource.com/platform/system/extras.git git clone http://android.googlesource.com/platform/system/media.git git clone http://android.googlesource.com/platform/system/netd.git git clone http://android.googlesource.com/platform/system/security.git git clone http://android.googlesource.com/platform/system/vold.git[/code]
相关文章推荐
- 使用face++接口实现在Android设备上的人脸识别
- android游戏引擎汇总
- android 自定义TextView跑马灯
- android:descendantFocusability用法简析
- Android 中java 关于字符串与整形转换的相关问题(Invalid Int)
- Android给拼接好的Bitmap加上个性化边框
- [Android]高低API版本兼容之@TargetApi
- android 增量更新之 服务端 附带java 调用示例
- Android通讯录数据库介绍与基本操作(增删改查)
- Android优化
- 使用图片自定义android控件EditText 边框背景
- android中Actionbar详解
- android应用程序中启动另一个应用程序
- android手机内的通讯录数据库
- Android Service 自动启动
- 也谈Android中的Context(1)
- android 电子书源码,翻页效果
- Android 开发性能优化之SparseArray(三)
- android项目用到的公共类方法
- 近百android开源项目贡献