$ . ./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.
這里我們只關注mmm命令,也就是可以用它來編譯指定目錄的所有模塊,通常這個目錄只包含一個模塊。
$ mmm packages/apps/Email/
編譯完成之后,就可以在out/target/product/generic/system/app目錄下看到Email.apk文件了。Android系統自帶的App都放在這個目錄下。
Android系統的一些可執行文件,例如C編譯的可執行文件,放在out/target/product/generic/system/bin目錄下,
動態鏈接庫文件放在 out/target/product/generic/system/lib目錄下,
硬件抽象層(HAL)接口文件放在 out/target/product/generic/system/lib/hw目錄下。
編譯好模塊后,還要重新打包一下system.img文件
$ make snod