安卓源码下载

  • 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数据库查询删除创建企业基本知识

数据查询语言(DQL)从表中获取数据select where (位置) order by(排序) group by haveby查询用户&#xff1a;select user,host,password from mysql.user;select user,host,password from mysql.usser order by(排序) 参数 (如user)asc(升序)select user,host&#xff0…

mysql 端口time_wait_linux上大量tcp端口处于TIME_WAIT的问题

最近发现在连接监控数据库的时候偶尔会连不上&#xff0c;报错&#xff1a;Couldnt connect to host:3306/tcp: IO::Socket::INET: connect: Cannot assign requested address查看了一下发现系统中存在大量处于TIME_WAIT状态的tcp端口$netstat -n | awk /^tcp/ {S[$NF]} END {f…

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

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

SDN第二次作业

1、为什么需要SDN&#xff1f;SDN特点&#xff1f; 需要SDN的原因主要是&#xff1a;随着网络规模的不断扩大,封闭的网络设备内置了过多的复杂协议,增加了运营商定制优化网络的难度,科研人员无法在真实环境中规模部署新协议.同时,互联网流量的快速增长(预计到2018年,全球流量将…

mysql数据库sysdate_MySql数据库知识点复习

文章目录1. MySql数据类型1.1 数值类型1.2 字符串类型1.3 日期类型2.表记录的操作2.1 字段约束2.2 drop、delete、truncate之间的区别&#xff1f;3. MySql常见的函数4. 外键和表关系4.1 外键介绍4.2 添加外键4.3 表关系4.4 关联查询、外连接查询1. MySql数据类型1.1 数值类型M…

python函数-基础知识

一、含义函数是程序内的“小程序”二、示例 #!/usr/bin/env python #coding:utf-8 def hello():print(Hello world!)print(Hello people!) hello() 以上内容&#xff0c;定义了一个叫 hello() 的函数&#xff0c;执行该函数。第一行是 def 语句&#xff0c;它定义了一个名为 he…

python task done_python queue task_done()问题

我对python多线程队列有问题。我有一个脚本&#xff0c;其中producer从输入队列获取元素&#xff0c;生成一些元素并将它们放入输出队列&#xff0c;consumer从输出队列获取元素并打印它们&#xff1a;import threadingimport Queueclass Producer(threading.Thread):def __ini…

dobbo 简单框架

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

python实现多人聊天udp_python—多任务版udp聊天机器人

将多任务(多线程)引入到udp聊天机器人&#xff0c;可以实现同时发送消息和接收消息1 import socket2 import threading345 def udp_send(udp_socket,ip,port):6 while true:7 try:8 # 获取发送的信息9 data input(请输入要发送的信息&#xff1a;)10 udp_socket.sendto(data.e…

kafka 集群的部署安装

这里我们罗列一下我们的环境 10.19.18.88 zk1 10.19.16.84 zk2 10.19.11.44 zk3这里公司需要接入kafka用于zipkin来定位调用链 kafka 的地址是http://kafka.apache.org/ zipkin 的地址是https://github.com/openzipkin/zipkin/tree/master/zipkin-server#environment-variables…

Ubuntu 16.04 设置MySQL远程访问权限

第一步&#xff1a;修改配置文件的端口绑定 打开的目录可能会根据MySQL的版本稍有不同&#xff0c;可以先尝试打开/etc/mysql/my.cnf这个配置文件&#xff0c;若该文件不存在或文件内容为空&#xff0c;则尝试下面的文件路径。 sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf 在下…

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…

Android 平台电容式触摸屏的驱动基本原理

Android 平台电容式触摸屏的驱动基本原理 Android 平台电容式触摸屏硬件基本原理 Linux 与 Android 的多点触摸协议 Linux输入子系统&#xff1a;事件的编码 转载于:https://www.cnblogs.com/LittleTiger/p/7992840.html

微信小程序怎么取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. 创建存储过…

java 中jtable_java中使用JTable控件

JTable是java桌面软件设计的一个很有用的UI控件&#xff0c;是一个表格控件&#xff0c;完整位置是&#xff1a;javax.swing.JTable。以下是我的一些使用经验&#xff1a;添加行&#xff1a;不能直接向JTable插入行&#xff0c;需要借助JTable的tableModel&#xff0c;代码如下…

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平台编译调通的功能&…

java 精灵线程_Java线程的状态分析

/*** 线程的状态分析*authoraa**/public classThreadState {public static void main(String[] args) throwsException {/*** 新建线程&#xff0c;线程为新建状态* jdk&#xff1a;至今尚未启动的线程的状态。* 如果不给线程设置名称&#xff0c;线程的名称将会是&#xff1a;…

【02】koala编译中文出错(已放弃不用)

http://koala-app.com/index-zh.html koala 下载地址。sass。中文编译出错&#xff1a;打开 Koala文件夹位置->rubygems->gems->sass->lib->sass->engine.rb。添加这句话。在所有的request XXXX 之后即可。复制添加Encoding.default_external Encoding.find…

java jlabel里面加button_在Java Swing中通过JLabel覆盖JButton?

是否可以在Swing中将Button叠加在Label上&#xff1f;例如,如果有一个带有图像的JLabel而没有文本,我想在我的JLabel上覆盖我的按钮.标签定义如下&#xff1a;myLabel new javax.swing.JLabel(new ImageIcon( myPicture ));如果没有,那么任何想法我怎么能意识到这一点,谢谢.编…