由于AOSP 项目太大,我只修改了一个模块,比如设置。
那么只需要单独编译设置这个模块就可以了。
首先执行Source:
source 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命令,也就是可以用它来编译指定目录的所有模块,通常这个目录只包含一个模块。
修改设置apk
设置apk 的项目在aosp/packages/apps/Settings下,我们在里面加上一个toast.
修改之后,lunch 一下
lunch
然后指定自己编译的模块
接着,使用mmm命令来编译指定的模块,例如系统的设置应用程序&#x