Android源码和内核源码的下载,编译和执行
Posted zhchoutai
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android源码和内核源码的下载,编译和执行相关的知识,希望对你有一定的参考价值。
mkdir ~/bin
PATH=~/bin:$PATH
2)下载repo(官方的repo下载不了。其它的repo大多比較旧。这个时比較新的)
git clone git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/
或者git clone git:
//git
.omapzoom.org
/git-repo
.git
3)克隆下来后将git-repo中的repo文件复制到bin文件夹
cp git-repo/repo ~/bin/
4)改动repo文件,设置REPO_URL例如以下:
REPO_URL = \'git://aosp.tuna.tsinghua.edu.cn/android/git-repo\'
2.初始化 repo
1)创建Android文件夹,并进入
mkdir Android
cd Android
2)初始化repo
repo init -u git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest -b android-2.3.1_r1
ps:在初始化时,若提示须要email验证,使用例如以下命令后。再又一次上面命令:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
3)同步repo
repo sync
等待一段时间后(时间较长),Android源码便下载成功了。
此时Android文件夹中文件列表例如以下:
三,编译Android源码
运行make命令。
。。。但这远远不够。会遇到各种问题和报错。。此时借助度娘就可以。
笔者将一些常见的错误截图和解决方式罗列例如以下。希望能够对大家有一些帮助
1.
解决的方法:sudo apt-get install libc6-dev-i386
2.
![](https://image.cha138.com/20210527/add465334be8481e8ada3c5ba7a69a80.jpg)
![](https://image.cha138.com/20210527/6d93dad27e24446d962f0f737b1a4154.jpg)
![](https://image.cha138.com/20210527/dd502c9b5f5a41029886488cef1f0d14.jpg)
![](https://image.cha138.com/20210527/82faea1b3293438994b4a76fc1c32ebb.jpg)
![](https://image.cha138.com/20210527/c94de35157c84ac0a9d870e547f7fa56.jpg)
![](https://image.cha138.com/20210527/3497cd6b48b34eefaa4addd4fa30b52a.jpg)
![](https://image.cha138.com/20210527/c04c3e0163d1415a91fd72e2679ac894.jpg)
![](https://image.cha138.com/20210527/04158f9a4ac54a6488c984a9fb49ae50.jpg)
![](https://image.cha138.com/20210527/c35fea4c9e2843779f6757a1679d389a.jpg)
![](https://image.cha138.com/20210527/d3ce8bc502774bf48369ee0914566646.jpg)
![](https://image.cha138.com/20210527/61dc370daf204f0a9d8f86fb8f3f69ac.jpg)
![](https://image.cha138.com/20210527/9a15952518f34fdf9e15af9a95cc03f5.jpg)
![](https://image.cha138.com/20210527/03de263cb6e541d7835bd0f0124f3207.jpg)
![](https://image.cha138.com/20210527/a1c9b38b748e499fa90ddc58cfc9f5cc.jpg)
![](https://image.cha138.com/20210527/6b58c60d3bc44763814d67c6de9b93f0.jpg)
五.android内核源码的下载
![](https://image.cha138.com/20210527/ffd17360ece942bbbd61ef6f3f92840f.jpg)
![](https://image.cha138.com/20210527/0bb4e4acc47240c2b53a19509c3bb301.jpg)
六.编译android内核源码
以上是关于Android源码和内核源码的下载,编译和执行的主要内容,如果未能解决你的问题,请参考以下文章