mmx-编译脚本

脚本目录位置

/home/zhangshuli/git2/vanzo_team/xulei/Mmx.py

在~/bin目录下,链接Mmx.py

ln -sf ~/git2/vanzo_team/xulei/Mmx.py mmx

这样就可已直接使用mmx了。mmx结果如下

0 Contacts 
1 Settings 
2 Mms 
3 Dialer 
4 Phone 
5 Music 
6 Gallery2 
7 Launcher3 
8 Browser 
9 Email 
10 Keyguard 
11 DocumentsUI 
12 services 
13 android.policy 
14 SystemUI 
15 SettingsProvider 
16 framework 
17 framework-res 
18 DeskClock 

如果你想添加自己的模块到mmx,可以进行如下操作

1)进入 ~/git2/vanzo_team/xulei/Mmx.py

2) 在如下内容中添加你的模块

module_info =[
        ["Contacts","packages/apps/Contacts", "com.android.contacts"],
        ["Settings","packages/apps/Settings", "com.android.settings"],
        ["Mms","packages/apps/Mms", "com.android.mms"],
        ["Dialer","packages/apps/Dialer", "com.android.dailer"],
        ["Phone","packages/apps/Phone", "com.android.phone"],
        ["Music","packages/apps/Music", "com.android.music"],
        ["Gallery2","packages/apps/Gallery2", "com.android.gallery2"],
        ["Launcher3","vendor/tmobile/apps/Trebuchet", "com.android.launcher3"],
        ["Browser","packages/apps/Browser", "com.android.browser"],
        ["Email","packages/apps/Email", "com.android.email"],
        ["Keyguard","frameworks/base/packages/Keyguard", "com.android.systemui"],
        ["DocumentsUI","frameworks/base/packages/DocumentsUI"],
        ["services","frameworks/base/services", "zygote"],
        ["android.policy","frameworks/base/policy", "zygote"],
        ["SystemUI","frameworks/base/packages/SystemUI", "com.android.systemui"],
        ["SettingsProvider","frameworks/base/packages/SettingsProvider", "zygote"],
        ["framework","frameworks/base", "zygote"],
        ["framework-res","frameworks/base/core/res", "zygote"],
        ["DeskClock","vanzo/packages/DeskClock", "com.android.deskclock"],
]

添加三条属性分别为

1:模块编译以后的名称(可以在Android.mk中差中LOCAL_PACKAGE_NAME )

2:模块的路径

3:模块的进程名(可以使用adb shell;ps | grep 模块关键字查询)

mmx 的使用有两点需要注意

1.mmx使用的项目,项目目录层次必须是/home/zhangshuli/PROJIEC/PROJICT/35m的层次结构,也就是必须是5层

2.根目录下必须有project.config文件(这个文件是使用do_pj下拉代码自动生成的,你也可以进行手动添加)内容如下

n320a-kewei-35m-ophone

所以,根据上面两条,如果你想在自己已有的项目中使用mmx,可以把你当前的项目放到

/home/username/**/**/  这样的目录结构下,然后添加project.config文件在根目录下就可以了

 

补充
mmx添加了另外一种编译方式
mmx 0:是常规模式./am xx mmm package/apps/Contacts方式编译
mmx -d 0:是./am xx make Contacts
第二种编译会检查模块依赖,编译时间较久,及时代码没有编译,使用第二种方式也可以编译模块。
类似以前的 r dr Contacts
posted @ 2015-05-27 13:05  小白屋  阅读(267)  评论(0编辑  收藏  举报