kernel配置
make kernelconfig
make kernelgconfig
Android系统的编译命令集
Android编译命令
执行环境配置命令
$ . build/envsetup.sh (.后面有空格)
当前终端会多出一些命令:
- croot: Changes directory to the top of the tree.
- m: Makes from the top of the tree.
- mm: Builds all of the modules in the current directory.
- mmm: Builds all of the modules in the supplied directories.
- cgrep: Greps on all local C/C++ files.
- jgrep: Greps on all local Java files.
- resgrep: Greps on all local res/*.xml files.
- godir: Go to the directory containing a file.
—help查看帮助
编译模块
使用mmm来编译指定目录的模块,如编译Launcher:
$ mmm packages/apps/Launcher/
编完之后生成两个文件:
out/target/product/heaven/data/app/LauncherTests.apk
out/target/product/heaven/system/app/Launcher.apk
可以使用
$ make snod
重新生成system.img,再运行模拟器
选择product编译
按照如下图的方式,可以选择heaven这个Product
