android 模块编译
来源:互联网 发布:复杂网络建模仿真工具 编辑:程序博客网 时间:2024/06/05 09:45
android模块编译,mm命令, 模块编译 .转
from http://jinguo.javaeye.com/blog/691507
如果你只修改某一个模块的内容,却每次都要执行make, 最后等待很长时间。
使用模块编译,只需要在你所在的模块的目录或者其子目录,执行mm,便可以编译出一个单独的apk,这样岂不快哉!
具体步骤:
1)打开~/.baserc文件,加入source ~/I850/build/envsetup.sh. 加入你自己该文件所在的路径,这样就免去了每次启动新的终端执行mm命令之前,需要引用此文件。
2)完成步骤1之后,就可以在你的模块里面随意执行mm了,要想使用其他快速命令,可以查看envsetup.sh文件,比如 cgrep,jgrep,resgrep在不同类型的文件里面进行相应的查询。还有m,mmm等等
3)还可以使用adb push 将你的apk push到模拟器或者手机终端,也可以在工程根目录通过make -snod生成新的system.img
from http://mcuos.com/redirect.php?tid=4553&goto=lastpost
编译模块
Android中的一个应用程序可以单独编译,编译后需要重新生成system.img。
在Android目录下运行
$ . build/envsetup.sh 或者
$ source 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的配置情况.
可以使用 --help查看用法。
如:在修改了某一个模块以后,可以使用 $ mmm <目录> 来重新编译所有在<目录>中的所有模块,使用 $ mm 编译当前目录中的所有模块。
编完之后,即修改了Android系统以后,可以使用 $ make snod 重新生成system.img
vim system/extra/wpa_supplicant/Android.mk
这里边有module名字,
...
LOCAL_MODULE := wpa_cli
...
LOCAL_MODULE := wpa_supplicant
...
所以配置完编译环境
<1>. envsetup
<2>tapas
之后,就可以直接使用make wpa_cli wpa_supplicant来只编译这2个module了,这样不用完全编译,所以很快就编译完成了,
但是在Makefile中加入
@echo '$(LDO) $(LDFLAGS) -o wpa_cli $(OBJS_c) $(LIBS_c)'
@echo '$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)'
总是不能打印出添加的log,不知道为什么[luther.gliethttp]
20080911后来发现device根目录下envsetup.sh脚本中,已经有了专门的2个命令来生成单独的module
- 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.
先执行. envsetup和tapas,然后
所以可以到自己想编译的目录,直接执行mm即可,
或者使用mmm dircetroy指定目录.
- android模块编译,mm命令, 模块编译
- android模块编译,mm命令, 模块编译
- android模块编译,mm命令, 模块编译
- android模块编译,mm命令, 模块编译
- android模块编译,mm命令, 模块编译
- android源码编译,模块编译
- Android 单个模块编译
- android 编译部分模块
- Android单个模块编译
- Android单个模块编译
- android 编译单个模块
- Android编译模块
- ANDROID模块编译
- 编译android部分模块
- android 单个模块编译
- Android 模块编译技巧
- Android单个模块编译
- 编译模块 android
- 【C Prime Plus】学习笔记,Chapter 10,数组和指针之四
- pl/sql 查询数据量大时, 怎么提高输出缓存大小?
- WinDbg安装与使用
- oracle中对象表,ref及deref 对象表的使用
- ubuntu下Bugzilla的安装与配置
- android 模块编译
- PHP json_encode中文乱码解决方法
- Oracle的REF的读写方法
- delphi fastreport 预览出错
- 笔记:非法tcp报文以及防火墙过滤
- Oracle 加在表上的锁类型
- 拉格朗日算子的直观解释
- DHCP协议
- 设计模式学习(一) —— 总述