Android快速编译命令及相关make指令

来源:互联网 发布:python实现模拟退火 编辑:程序博客网 时间:2024/05/19 20:23

注意: 有关指令需要在android源码根目录下运行;有些命令需要在源码根目录下运行$source /build/envsetup.sh脚本后才能用

 

一 m,mm,mmm指令

 

通过查看android源码目录下的build/envsetup.sh文件,可知:
- 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.
 
例子:
$. build/envsetup.sh
$mmm external/jpeg/
 
Android比较重要的三个img文件
  • make systemimage - system.img
  • make userdataimage - userdata.img
  • make ramdisk - ramdisk.img
  • make snod - 快速打包system.img (with this command, it will build a new system.img very quickly. well, you cannot use “make snod” for all the situations. it would not check the dependences. if you change some code in the framework which will effect other applications)

    注意:make snod 不检查依赖关系,需要在源码根目录下执行

 
三 其他make命令
1、make Settings
生成Settings.apk的文件

3、make
映像编译成功后会在目录 ~/android/src/out/target/product/generic 下产生一些image文件
ramdisk.img system.img userdata.img
4、make sdk
注意:如果需要build SDK,根据google的要求安装sun-java5-jdk, 或sun-java6-jdk以上版本

sdk编译成功后会在~/android/src /out/host/linux-x86/sdk/ 生成sdk的文件目录和压缩包:

android-sdk_eng.justin_linux-x86

android-sdk_eng.justin_linux-x86.zip

并在~/android/src /out/target/product/generic(generic是默认的产品名)下打包所有的映像文件:

generic-img-eng.justin.zip
原创粉丝点击