Android使用Git管理源代码的,在Linux下我们可以使用ubuntu来获取系统源码,下面我就逐步介绍在Windows些如何获取Android系统源码了。

一。安装msysGit

在google的http://code.google.com/p/msysgit/中这样介绍到:

If you just want to use Git to do your version control in Windows, you will need to download Git for Windows, run the installer, and you are ready to start. Note: Git for Windows is a project run by volunteers, so if you want it to improve, volunteer!

If you want to download and install the complete source code of Git for Windows (including C compiler) to start hacking, you will need to install the full development system which is called msysGit.

注释:如果你需要使用Git工具在Windows下进行版本控制,你可以使用基于Windows的Git,这里提供了msysGit的安装下载。

我们选择full安装版本,http://code.google.com/p/msysgit/downloads/detail?name=msysGit-fullinstall-1.7.3.1-preview20101002.exe。

下载msysGit安装包后安装,在安装过程中msysGit会自动的安装或编译基于Windows环境的Git。编译Git需要点时间,安装完后截图如下:

这就是Git的shell窗口,你可以在其中通过命名行操作下载得到Android的系统源码,下面就以Lunacher——桌面——为例下载源码。

二。下载Luancher源码

Android系统源码都在http://android.git.kernel.org/网址下,其中那个系统app都在platform/packages/apps结构下。

连接还有:https://github.com/Android 此网站可以直接下载zip 压缩包, https://android.googlesource.com/

在刚才的Git的shell命名行窗口中输入下面的命名:

git clone git://android.git.kernel.org/platform/packages/apps/Luancher2.git


对于其他的app系统源码的获取方法和上述的Luancher相同,只是命名行后的参数不同。

git clone git://android.git.kernel.org/需下载源码的app所在的位置。

三。启动msysGit

有些朋友在关闭了msysGit命名行窗口后就找不到重新打开的链接了,不用着急,你只需要在你安装的msysGit路径下双击执行msys.bat文件即可。

所有的都大功告成了。

更多相关文章

  1. EventBus源码解析
  2. Android源码目录结构
  3. android 在应用中安装其他程序
  4. android输入法02:openwnn源码解析02—Keyboard和KeyboardView
  5. Android(安卓)4.4源码编译环境升级gcc版本的方法
  6. Android(安卓)PackageManagerService(四)本地安装流程详解
  7. android_1 环境搭建
  8. 【Android】ArrayList通过remove方法删除元素对象源码分析
  9. 编译android源码的过程

随机推荐

  1. Android中GridView来显示图片
  2. Android菜单实现两种方式
  3. android edittext编辑框光标改变事件
  4. android之File
  5. android 获取wifi 信号质量
  6. android 自定义TextView中Html超链接点击
  7. android 弹出软盘
  8. Android(安卓)近百个项目的源代码,覆盖And
  9. Android实现检测手机摇晃的监听器
  10. Android 5.1 SystemUI-状态栏