官网 Android framework源码git地址

github: https://github.com/android/platform_frameworks_base
google 官方: https://android.googlesource.com/platform/frameworks/base.git

现在Android源码也迁移到了github, 就不像原来还需要下载.
但是, github 的速度也不见得快.

在clone源码前需要选择相应的分支, 也可以直接使用主分支.

但是推荐选择一些 tag 分支, 这些分支相对稳定.

其实git clone代码的时候 会吧当前选择的分支的所有 提交记录都给clone 下来
但是其实对于看源码的我们来说, 这些提交记录意义并不大.

其实 framework 源码 大概只有900 M 左右,
但是如果直接 clone 的话 那么将会下载 几个G 的代码

所以,我们只需要选择 说下载最新的一层, 不下载多余的提交记录

我使用的 clone 代码如下:

git clone --branch android-cts-2.3_r12 git@github.com:crianzy/platform_frameworks_base.git --depth 1

选择 2.3 的分支,
--depth 表示深度, 这里选择1 表示之下 最新的一层, 不会下载过多的提交记录.

ok 这样就能相对快速的下载 Android源码了

其实也不止Android 源码, 一些其他的git 项目, 如果太大的话, 也可以通过这样的方法来加快下载速度

更多相关文章

  1. FFmpeg for Android(安卓)collections
  2. [原创] Android(安卓)SDK 安装全记录
  3. 为android-support-v4.jar打包源码
  4. 编译android源码
  5. 为android-support-v4.jar打包源码
  6. Android下使用Logcat打印信息
  7. Android添加单元测试的方法与步骤
  8. Android下使用Logcat打印信息
  9. android好文章或博客地址收藏

随机推荐

  1. Android控件EditText之点击软键盘中的回
  2. android 编写命令行测试程序
  3. Android上的LocalSearch
  4. android对html支持接口总结
  5. android wifi连接
  6. Android中的内存管理
  7. Android播放GIF动画
  8. 分享自己在项目中对android文件系统的一
  9. Android Instrumentation Testing
  10. Android上的C/C++调用Java问题(转载)