1)编译指定Package
Android源码目录下的build/envsetup.sh文件,描述编译的命令
m: 编译所有的模块
mm: 编译当前目录下的模块,当前目录下要有Android.mk文件
mmm:编译指定路径下的模块,指定路径下要有Android.mk文件
下面举个例子说明,假设我要编译android下的packages/apps/Settings模块,当前目录为源码根目录,方法如下:
rzzhang@rzzhang-desktop:~/workspace$ source build/envsetup.sh
rzzhang@rzzhang-desktop:~/workspace$ mmm packages/apps/Settings/
...
Processing target/product/generic/obj/APPS/SettingsTests_intermediates/package.apk
Done!
Install: out/target/product/generic/data/app/SettingsTests.odex
Install: out/target/product/generic/data/app/SettingsTests.apk
make:离开目录“/home/rzzhang/workspace”
rzzhang@rzzhang-desktop:~/workspace$ source build/envsetup.sh
rzzhang@rzzhang-desktop:~/workspace$ cd packages/apps/Settings/
rzzhang@rzzhang-desktop:~/workspace/packages/apps/Settings$ mm
2)重新生成sysem.img
使用make snod,重新生成system.img
rzzhang@rzzhang-desktop:~/workspace$ make snod
make snod: ignoring dependencies
Target system fs image: out/target/product/generic/system.img