单独编译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.
     
  这里我们只关注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
      
 
原文地址:https://www.cnblogs.com/7725657/p/5546249.html