从网上看的别人的:

在android的顶层目录里,运行下面的命令:

source build/envsetup.sh

运行命令后,就添加了很多命令到sh解释器,具体命令如下:

-croot:   Changes directory to the top ofthe tree.

-m:       Makes from the top of the tree.

-mm:      Builds all of the modules in thecurrent directory.

-mmm:     Builds all of the modules in thesupplied 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 afile.

其中命令croot是改变到顶层目录;m是编译源码树;mm是编译当前目录下所有模块;

mmm是编译所有满足条件编译的模块;cgrep是查找本地所有C/C++文件;jgrep是查找本地所有java文件;resgrep是查找本地所有资源文件res/*.xml;godir是跳到包括这个文件的目录。


可以用mm部分编译

到你该动代码的那个目录下面mm即可。这样就是部分编译。。。

可以用godir找到这个文件所在的位置:
例如:
知道文件的名字为PhoneWindowManager.java
   开始 :

1、去根目录

srx@srx-desktop:~$ cd master/

2、
srx@srx-desktop:~/master$ source build/envsetup.sh
srx@srx-desktop:~/master$ choosecombo 1 1 4 3

3、

srx@srx-desktop:~/master$ godir PhoneWindow.java
srx@srx-desktop:~/master/frameworks/policies/base/phone/com/android/internal/policy/impl$

用ls就可以查看到了。。。。

posted on 2010-09-10 17:01  snowdrop  阅读(1860)  评论(0编辑  收藏  举报