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

单独编译Android源代码中的模块

2016-05-31 16:15 465 查看
  $ . ./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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: