envsetup.sh与mm命令、mmm命令说明
2016-03-07 11:00
615 查看
在Android SDK源码工程下,如果编译整个工程可能需要两三个小时,即使二次编译也要二十多分钟。如果只想单独编译某个APK应用,那么可以这样做:
1)在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.
- printconfig: 当前build的配置情况
2)mm命令
用于当前目录下的工程
3)mmm命令
用于编译指定目录,如:
mmm Settings
表示编译Settings这个目录,之后会生成新的apk
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.
要想使用这些命令,首先需要在android源码根目录执行. build/envsetup.sh 脚本设置环境
m:编译所有的模块
mm:编译当前目录下的模块,当前目录下要有Android.mk文件
mmm:编译指定路径下的模块,指定路径下要有Android.mk文件
下面举个例子说明,假设我要编译android下的\hardware\libhardware_legacy\power模块,当前目录为源码根目录,方法如下:
1、. build/envsetup.sh
2、mmm hardware/libhardware_legacy/power/
或者 :
1、. build/envsetup.sh
2、cd hardware/libhardware_legacy/power/
3、mm
1)在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.
- printconfig: 当前build的配置情况
2)mm命令
用于当前目录下的工程
3)mmm命令
用于编译指定目录,如:
mmm Settings
表示编译Settings这个目录,之后会生成新的apk
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.
要想使用这些命令,首先需要在android源码根目录执行. build/envsetup.sh 脚本设置环境
m:编译所有的模块
mm:编译当前目录下的模块,当前目录下要有Android.mk文件
mmm:编译指定路径下的模块,指定路径下要有Android.mk文件
下面举个例子说明,假设我要编译android下的\hardware\libhardware_legacy\power模块,当前目录为源码根目录,方法如下:
1、. build/envsetup.sh
2、mmm hardware/libhardware_legacy/power/
或者 :
1、. build/envsetup.sh
2、cd hardware/libhardware_legacy/power/
3、mm
相关文章推荐
- haproxy ssl相关配置
- hiho 1269 优化延迟 二分 优先队列
- sql server 清除系统错误日志,消息队列产生大量日志
- 关于WeiPHP
- C语言指针学习(转载)
- haproxy ssl相关配置
- 注解开源库 butterknife的使用
- 文件的写入本地以及删除
- 23种设计模式
- U3D游戏开发—程序员转型篇(一)背景介绍
- java关键字
- git ubuntu系统下常用命令
- 用handler动态改变text文字,并循环显示
- Linux网络程序设计
- Linux学习之touch命令
- 用Chrome调试Android手机上的网页
- 【解决方法】【技术】22个iOS开发的小技巧
- C#多态的实现:虚方法、抽象类、接口
- 爬虫
- android日常开发总结的技术经验60条