接手android也有一年的时间了,由于刚开始学习时资料比较少,又大多都是断章取义的,所以对于android我一直处于似懂非懂的状态下。今天终于感觉到该留点学习的经验吧,那就从这篇开始我的android系列文章了。

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需要点时间,安装完后截图如下:

12

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

二。下载Luancher源码

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

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

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

你就可以在你的msysGit安装目录的git下(~\msysgit\msysgit\git)看到Luancher工程文件夹了。

3456

然后打开~\msysgit\msysgit\git\Luancher2文件夹,就可以看到Android的Luancher系统源码工程了。

78

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

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

三。启动msysGit

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

所有的都大功告成了。

更多相关文章

  1. android系统体系结构
  2. Android中常见Intent习惯用法-上篇(附源码下载)
  3. Android manifest之系统自带的permission
  4. android英语字典(内含源码哦)
  5. Android 无法查看外部依赖jar的源码的问题
  6. eclipse查看android源码
  7. Android中关联源码
  8. Android系统对应用程序权限申请的处理方式分析

随机推荐

  1. 动态规划之空间优化与总结回顾
  2. 万字长文!动态规划的终极难题:字符匹配类
  3. Excel数据处理(缺失值/重复值/异常值/拆分
  4. 超详细!详解一道高频算法题:括号生成
  5. 苹果拒绝支持PWA的行为对Web贻害无穷!
  6. 为什么程序员应该写博客?用什么博客系统?在
  7. Excel有哪些相见恨晚的技巧?
  8. 图解一道腾讯笔试算法题:「最长上升子序列
  9. 前端程序员有必要学一点C语言吗?
  10. 用Excel做数据地图