您的位置:首页 > 移动开发 > Android开发

android 4.1.1源码下载 -编译方法

2013-07-19 11:11 344 查看

android 4.1源码下载方法

                                    转载http://www.oschina.net/question/565065_65773

1、安装repo ,执行命令如下:

 

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

$ chmod +x ~/bin/repo


 

2、初始化 repo ,执行命令如下:

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


3、下载源代码,命令如下:

$ repo sync
4.编译源代码初始化脚本
$ source build/envsetup.sh
$ lunch full-eng
第二个命令的参数可以参考官网,说明很详细,你想生成什么样的文件,就设定什么样的参数http://source.android.com/source/building.html

编译代码:
$ make -jN
其中N参数代表你计算机的线程参数,数字越大,编译速度越快,但是要看你计算机支持到什么地步

5.运行emulator:编译成功后,运行模拟器
$ emulator

如果找不到命令,那么重新输入:
$ source build/envsetup.sh

$ lunch full-eng
再运行
$ emulator
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息