1. 安裝Cygwin 要安裝的packages如下:

    Net -> curl

    Devel -> git* (git, git-completion, git-gui, gitk)

    Libs -> libreadline6, libiconv2

    Editors -> vim

    Python -> python

  2. 下载整个源码

    (启动Cygwin之后,开始Repo)

    $ cd ~

    $ mkdir bin

    $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo> ~/bin/repo

    $ chmod a+x ~/bin/repo

    $ cd ~

    $ mkdir mydroid

    $ cd mydroid

    $ ~/bin/repo init -u https://android.googlesource.com/platform/manifest

    (需要输入一个已申請Google account的email)

    如果cygwin出错:Resource temporarily unavailable。

    退出cygwin,找到cygwin目录下的ash.exe,双击运行。执行shell命令

    /bin/rebaseall

    执行完毕,重新进入cygwin,重新repo init,应该能正常执行了。

    $ ~/bin/repo sync

  3. 下载单个项目的源码

    $ cd ~
    $mkdir android/android-source –p

    $cd android

    $git clone https://android.googlesource.com/platform/frameworks/base.git android-sdk-source

  4. 获取各个版本SDK源码

    $cd ~
    $mkdir android/android-sdk-source –p
    $cd android/android-sdk-source

    //显示所有的分支,包括远程和本地分支,我们没有建立分支,所有没有本地分支

    $git branch –a
    //显示所有标签

    $git tag

    //检出源码

    $git checkout (branch)/(tag)

    其中core/java下即为sdk源码

  5. Platform

    Codename

    API Level

    Android 1.5

    Cupcake

    3

    Android 1.6

    Donut

    4

    Android 2.1

    Eclair

    7

    Android 2.2

    Froyo

    8

    Android 2.3 -
    Android 2.3.2

    Gingerbread

    9

    Android 2.3.3 -
    Android 2.3.7

    10

    Android 3.0

    Honeycomb

    11

    Android 3.1

    12

    Android 3.2

    13

    Android 4.0 -
    Android 4.0.2

    Ice Cream Sandwich

    14

    Android 4.0.3

    15

更多相关文章

  1. 分支和循环(二)(零基础学习C语言)
  2. 【安卓笔记】Volley全方位解析,带你从源码的角度彻底理解
  3. Android(安卓)Instrumentation源码分析(附Activity启动流程)
  4. Android(安卓)JiaoZiVideoPlayer源码分析
  5. vlc-android 移植live555到android
  6. android--startActivity(intent)分析源码
  7. Android(安卓)SQLiteOpenHelper使用和源码详解
  8. 编译Android版本的libmad
  9. Android之grafika源码阅读

随机推荐

  1. Qt on Android Episode 4(翻译)
  2. Android中WebView点击事件的拦截跳转到原
  3. 数字签名的案例说明
  4. android 写入文件到SD卡中去
  5. 深入Android【四】—— 组件调用
  6. android 当前apn的状态以及获取
  7. Android应用程序的构成
  8. android版本及版本代号对照
  9. android 开发常用框架、组件 -UI篇
  10. android判断是否禁用了录音权限