安卓源码下载

  • Setup
  • Security
  • Porting
  • Tuning
  • Compatibility
  • Reference
  • Setup
  • Getting Started
  • Downloading and Building
    • Requirements
    • Establishing a Build Environment
    • Downloading the Source
    • Preparing to Build
    • Compiling with Jack
    • Using Reference Boards
    • Running Builds
    • Building Kernels
    • Known Issues
  • Developing
  • Contributing
  • Community
  • 目录
  • Installing Repo
  • Initializing a Repo client
  • Downloading the Android Source Tree
  • Using Authentication
  • Troubleshooting network issues
  • Using a local mirror
  • Verifying Git Tags

Downloading the Source

The Android source tree is located in a Git repository hosted by Google. The Git repository includes metadata for the Android source, including those related to changes to the source and the date they were made. This document describes how to download the source tree for a specific Android code-line.

To instead start with a factory image for a specific device, see Selecting a device build.

Installing Repo

Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see the Developing section.

To install Repo:

  1. Make sure you have a bin/ directory in your home directory and that it is included in your path:

    mkdir ~/bin
    PATH=~/bin:$PATH
    
  2. Download the Repo tool and ensure that it is executable:

    curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    chmod a+x ~/bin/repo
    

For version 1.21, the SHA-1 checksum for repo is b8bd1804f432ecf1bab730949c82b93b0fc5fede

For version 1.22, the SHA-1 checksum for repo is da0514e484f74648a890c0467d61ca415379f791

For version 1.23, the SHA-256 checksum for repo is e147f0392686c40cfd7d5e6f332c6ee74c4eab4d24e2694b3b0a0c037bf51dc5

Initializing a Repo client

After installing Repo, set up your client to access the Android source repository:

  1. Create an empty directory to hold your working files. If you're using MacOS, this has to be on a case-sensitive filesystem. Give it any name you like:

    mkdir WORKING_DIRECTORY
    cd WORKING_DIRECTORY
    
  2. Configure git with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.

    git config --global user.name "Your Name"
    git config --global user.email "you@example.com"
    
  3. Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest, which specifies where the various repositories included in the Android source will be placed within your working directory.

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

    To check out a branch other than "master", specify it with -b. For a list of branches, see Source Code Tags and Builds.

    repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
    

A successful initialization will end with a message stating that Repo is initialized in your working directory. Your client directory should now contain a .repo directory where files such as the manifest will be kept.

Downloading the Android Source Tree

To pull down the Android source tree to your working directory from the repositories as specified in the default manifest, run

repo sync

The Android source files will be located in your working directory under their project names. The initial sync operation will take an hour or more to complete. For more about repo sync and other Repo commands, see the Developing section.

Using Authentication

By default, access to the Android source code is anonymous. To protect the servers against excessive usage, each IP address is associated with a quota.

When sharing an IP address with other users (e.g. when accessing the source repositories from beyond a NAT firewall), the quotas can trigger even for regular usage patterns (e.g. if many users sync new clients from the same IP address within a short period).

In that case, it is possible to use authenticated access, which then uses a separate quota for each user, regardless of the IP address.

The first step is to create a password with the password generator and follow the instructions on the password generator page.

The second step is to force authenticated access, by using the following manifest URI:https://android.googlesource.com/a/platform/manifest. Notice how the /a/ directory prefix triggers mandatory authentication. You can convert an existing client to use mandatory authentication with the following command:

repo init -u https://android.googlesource.com/a/platform/manifest

Troubleshooting network issues

When downloading from behind a proxy (which is common in some corporate environments), it might be necessary to explicitly specify the proxy that is then used by repo:

export HTTP_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>
export HTTPS_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>

More rarely, Linux clients experience connectivity issues, getting stuck in the middle of downloads (typically during "Receiving objects"). It has been reported that tweaking the settings of the TCP/IP stack and using non-parallel commands can improve the situation. You need root access to modify the TCP setting:

sudo sysctl -w net.ipv4.tcp_window_scaling=0
repo sync -j1

Using a local mirror

When using several clients, especially in situations where bandwidth is scarce, it is better to create a local mirror of the entire server content, and to sync clients from that mirror (which requires no network access). The download for a full mirror is smaller than the download of two clients, while containing more information.

These instructions assume that the mirror is created in /usr/local/aosp/mirror. The first step is to create and sync the mirror itself. Notice the --mirror flag, which can be specified only when creating a new client:

mkdir -p /usr/local/aosp/mirror
cd /usr/local/aosp/mirror
repo init -u https://android.googlesource.com/mirror/manifest --mirror
repo sync

Once the mirror is synced, new clients can be created from it. Note that it's important to specify an absolute path:

mkdir -p /usr/local/aosp/master
cd /usr/local/aosp/master
repo init -u /usr/local/aosp/mirror/platform/manifest.git
repo sync

Finally, to sync a client against the server, the mirror needs to be synced against the server, then the client against the mirror:

cd /usr/local/aosp/mirror
repo sync
cd /usr/local/aosp/master
repo sync

It's possible to store the mirror on a LAN server and to access it over NFS, SSH or Git. It's also possible to store it on a removable drive and to pass that drive around between users or between machines.

Verifying Git Tags

Load the following public key into your GnuPG key database. The key is used to sign annotated tags that represent releases.

gpg --import

Copy and paste the key below, then enter EOF (Ctrl-D) to end the input and process the keys.

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv
aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k
cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI
2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----

After importing the keys, you can verify any tag with

git tag -v TAG_NAME

If you haven't set up ccache yet, now would be a good time to do it.

转载于:https://www.cnblogs.com/zhen-android/p/7932320.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/428500.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

mysql常用命令英文词汇_MySQL中文全文索引插件 mysqlcft 1.0.0 安装使用文档

MySQL在高并发连接、数据库记录数较多的情况下&#xff0c;SELECT ... WHERE ... LIKE %...%的全文搜索方式不仅效率差&#xff0c;而且以通配符%和_开头作查询时&#xff0c;使用不到索引&#xff0c;需要全表扫描&#xff0c;对数据库的压力也很大。MySQL针对这一问题提供了一…

dobbo 简单框架

转载于:https://www.cnblogs.com/huangjianping/p/7986881.html

spring mysql整合_springboot mybatis mysql 整合

1、pom文件配置mysqlmysql-connector-javaruntimeorg.springframework.bootspring-boot-starter-testtestorg.mybatis.spring.bootmybatis-spring-boot-starter1.2.0org.springframework.bootspring-boot-starter-jdbc2、mybatis 数据库连接配置spring.datasource.driver-class…

微信小程序怎么取mysql_微信小程序如何加载数据库真实数据?

微信小程序要加载网站数据库里面的真实数据&#xff0c;有一个硬性的要求&#xff0c;就是你的网站域名必须是https协议才行&#xff0c;要不然你第一步服务器域名配置你都通过不了&#xff0c;小编我也是前不久申请的https://www.100txy.com&#xff0c;具体申请步骤大家自行去…

mysql定时任务

1. 查看是否开启定时策略 show variables like %event_sche%; 若出现如下图&#xff0c;则此时是关闭状态 开启定时策略(重启无效) set global event_scheduler 1; 则需要在配置文件my.ini的设置(重启有效) [mysqld] event_schedulerON //这一行加入mysqld标签下 2. 创建存储过…

02使用常规步骤编译NanoPiM1Plus的Android4.4.2

02使用常规步骤编译NanoPiM1Plus的Android4.4.2 大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 21504965 AT qq.com 完成时间&#xff1a;2017/12/5 17:51 版本&#xff1a;V1.0 开发板&#xff1a;NanoPi M1 Plus/zh SDK&#xff1a;Android4.4.2 按照全志A33平台编译调通的功能&…

验证 Swarm 数据持久性 - 每天5分钟玩转 Docker 容器技术(104)

上一节我们成功将 Rex-Ray Volume 挂载到了 Service。本节验证 Failover 时&#xff0c;数据不会丢失。 Scale Up 增加一个副本&#xff1a; docker service update --replicas 2 my_web 运行之前我们先推测一下&#xff0c;理想的结果应该是&#xff1a;swarm 在 swarm-worker…

java multimap 序列化_C++ JSON库的使用

1. 如何使用&#xff1f;2. 常用方法2.1 创建json对象2.1.1 使用cin,cout输入输出流2.1.2 提供根据键直接生成键值对的方法2.1.3 json::array json::object2.1.4 几个区别2.2 序列化2.2.1 标准输出自动序列化2.2.2 使用dump()函数2.3 反序列化2.3.1 从标准输入反序列化2.3.2 通…

【Excle数据透透视表】如何删除数据透视表

选中区域A4:C17,在键盘上按DELETE键删除&#xff0c;结果提示&#xff1a;那么如何删除呢&#xff1f;解决方案选中整个数透视表&#xff0c;再删除具体操作&#xff1a;选中整个数据透视表→DELETE注意&#xff1a;删除之后&#xff0c;源数据不会受到影响转载于:https://www.…

java 启动redis服务器_docker启动redis并使用java连接

一、先查找镜像docker search redis二、拉取镜像docker pull redis三、等待拉取完毕四、查看拉去的镜像docker iamges五、运行redis连接1&#xff1a;https://blog.csdn.net/weixin_38956287/article/details/80423607连接2&#xff1a;http://www.runoob.com/docker/docker-in…

【算法学习】整体二分

我们开门见山&#xff0c;讲讲一道sb题&#xff1a; 给你一个数组&#xff0c;查这个数组的第x大元素。 排序&#xff1f;可以 二分&#xff1f;怎么做啊&#xff1f; 二分出一个mid&#xff0c;判断这个数组中有多少个数小于等于mid&#xff0c;如果个数大于等于x&#xff0c;…

mysql100个优化技巧_完整篇:100+个MySQL调试和优化技巧(2)

▼MySQL模式优化51.检查和经常优化表.52. 经常重写InnoDB表优化.53. 有时&#xff0c;当添加列时删除索引&#xff0c;然后在添加回来索引&#xff0c;这样就会更快.54. 针对不同的需求&#xff0c;使用不同的存储引擎.55. 使用归档存储引擎日志表或审计表-这是更有效地写道.56…

简单的SQL注入学习

引贴&#xff1a; http://blog.163.com/lucia_gagaga/blog/static/26476801920168184648754/ 首先需要编写一个php页面&#xff0c;讲php页面放入/opt/lampp/htdocs目录下&#xff1a; 解释一下这个页面&#xff1a; 1.通过if语句判断变量是否初始化 2.if语句中通过mysql_conne…

什么是网站监控?

网站监控是跟踪网站的可用性和性能&#xff0c;以最小化宕机时间&#xff0c;优化性能并确保顺畅的用户体验。维护网站正常运行对于任何企业来说都是至关重要的&#xff0c;因而对大多数业务来说&#xff0c;网站应用监控都是一个严峻的挑战。Applications Manager网站应用监控…

intellij idea 分屏设置 与快捷键

1、找到分屏功能 File -> setting -> keymap&#xff0c;搜索&#xff08;注意大小写&#xff09;&#xff1a;   Split Vertically 水平分屏   Split Horizontally 垂直分屏 2、设置快捷键&#xff0c; 编辑快捷键的地方在搜索框同一行&#xff1a;    在标签上直…

SSH整合方案二(不带hibernate.cfg.xml)

整体结构: 1.引入相关jar包 2.编写实体类和映射文件 package cn.zqr.domain;public class Customer {private Long cust_id;private String cust_name;private Long cust_user_id;private Long cust_create_id;private String cust_source;private String cust_industry;privat…

POJ 1742 Coins ( 经典多重部分和问题 DP || 多重背包 )

题意 : 有 n 种面额的硬币&#xff0c;给出各种面额硬币的数量和和面额数&#xff0c;求最多能搭配出几种不超过 m 的金额&#xff1f; 分析 : 这题可用多重背包来解&#xff0c;但这里不讨论这种做法。 如果之前有接触过背包DP的可以自然想到DP数组的定义 > dp[i][j] 表示…

css用hover制作下拉菜单

首先我们的需求就是 制作一个鼠标移动到某个区域就会有下拉菜单的弹出,这样会有更多的子类内容,示例代码如下: <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><title>Title</title><style>*{mar…

mysql 字典索引_【大白话mysql】你真的了解 mysql 索引吗?

本文来源于公众号&#xff1a; 跬步匠心什么是索引&#xff1f;当我们使用汉语字典查找某个字时&#xff0c;我们会先通过拼音目录查到那个字所在的页码&#xff0c;然后直接翻到字典的那一页&#xff0c;找到我们要查的字&#xff0c;通过拼音目录查找比我们拿起字典从头一页一…

mysql使用jtable_jtable 的简单使用

做后台管理管理系统时&#xff0c;基于ajax的数据操作和富有表现力的数据绑定插件jtable绝对是一个不错的选择&#xff0c;他接收来自服务器端的json格式的数据。而且他是一款开源的基于jquery和jquery ui的插件&#xff0c;您可以根据自己的需要修改其表现&#xff0c;如css&a…