zoukankan      html  css  js  c++  java
  • 简记Ubuntu下载 Android源码

    1.下载Ubuntu系统,推荐16.04以上版本;

    2. git : 使用repo工具的时候会用到git,要预先安装git,使用命令:sudo apt-get install git 

    3. 安装git后,对git进行配置,设置git电子邮件和用户名

      (1) git config --global user.email "你的电子邮件" 

      (2) git config --global user.name "你的名字"

    4. 安装curl (开源文件传输工具) , 使用命令: sudo apt-get install curl -y

    5. 重要环节 : 下载repo

    下载repo之后,将repo的路径设为环境变量,并且将权限改成可执行
    mkdir ~/bin
    PATH=~/bin:$PATH
    curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    chmod a+x ~/bin/repo

    6. 接下来新建一个目录,用于放置Android源码,并进入该目录如下:

       (1) mkdir android

       (2) cd android

    7. 使用repo初始化

    repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest

    如果提示无法连接到 gerrit.googlesource.com,可以编辑 ~/bin/repo,把 REPO_URL 一行替换成:

    REPO_URL = 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'

    如果你只想下载特定的android版本,可以使用如下命令:

    repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b  Android版本 (比如:android-7.1.1_r13)

    8. 下载代码,命令如下 (注:这个过程很耗时间)

    repo sync  

  • 相关阅读:
    Random类
    类型转换
    一个简单的Web登录程序
    第一个Servlet程序
    使用MyEclipse开发 服务器的部署方式(续)
    MyEclipse配置
    Tomact问题
    Tomact配置
    HTTP基础:URL格式、 HTTP请求、响应、消息
    关闭二维码
  • 原文地址:https://www.cnblogs.com/benchao/p/6653786.html
Copyright © 2011-2022 走看看