首页 > 编程知识 正文

免费安卓源码大全,安卓系统源码在线查看

时间:2023-05-05 14:09:27 阅读:247278 作者:1948

按照各种研究android书籍上介绍的方法去下载Android源码。会遇到一个严重的问题,那就是Google无法访问,据说是墙到了。在网上发现清华大学的镜像非常不错,于是整理一下用清华镜像作为源下载Android源码的方法。

编译环境

为了编译安卓源码,首先需要一个Linux,本次采用Ubuntu Kylin14.04,内核版本3.13。装在四核、4G内存、120G硬盘的虚拟机上(光源码60G,所以一定要多些硬盘)。虚拟机安装较为简单,不再整理。 
查看内核版本号:

<code class="language-bash hljs has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"><span class="hljs-variable" style="color: rgb(102, 0, 102); box-sizing: border-box;">$uname</span> -all</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul> 清华镜像地址

清华镜像站的速度还是比较快的,地址: 
git://aosp.tuna.tsinghua.edu.cn/android/

使用浏览器访问:

http://aosp.tuna.tsinghua.edu.cn/android/

下载

下载 repo 
$git clone git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/

修改repo 
$vi /git-repo.git/repo 
google的地址 
REPO_URL = ‘https://gerrit.googlesource.com/git-repo’ 
改为清华大学的地址 
REPO_URL = ‘git://aosp.tuna.tsinghua.edu.cn/android/git-repo’

下载 manifest 
google 的地址 
$ repo init -u https://android.googlesource.com/platform/manifest 
改为清华大学的地址 
$ repo init -u git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest 
如果需要设置版本,加入参数-b 安卓源码版本号即可。同步源码 
$repo sync [-j4] 
后面-j4表示4个线程进行下载,清华镜像允许最多4线程下载,不要超过4个。 
如果中间发现断掉了或者报错了,不要紧张,重新运行一下。源码大小
C#中的动态创建组件(属性及事件)的实现思路及方法单服务处理多数据源事务margin青浦)讲解vue parseHTML源码解析harsendcomment钩子函数勒索病毒加固方案win7中qq截图快捷键是什么

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。