我对 su-binary ( https://github.com/git-core/su-binary )做了一些小改动,添加了一个目标来设置 SUID。我使用的 Android.mk:http://pastebin.com/N0gMJT4u在 Android 源代码树的根目录下运行 make 时,一切正常:
$ make -j5
[...]
system/core/rootdir/Android.mk:42: warning: ignoring old commands for target `out/target/product/panda/root/init.rc'
echo "Setting SUID/GUID to su-binary"
Setting SUID/GUID to su-binary
Installing busybox
chmod ug+s out/target/product/panda/system/xbin/su
[...]
mm -B
在外部/su-binary 中运行时:http: //pastebin.com/8HmUJBA0
相同的行为mmm external/su-binary
根据https://groups.google.com/forum/#!msg/android-building/dtNZFj5pe1w/PRY2MXADXG4J
除了 Ying Wang 建议的“make name-of-module”之外,您还可以在目录中运行“mm”来构建(和安装)那里定义的所有模块。但是,这只会构建那些模块,不会构建任何依赖的模块。因此,它仅对跟踪依赖关系的现有树的增量构建有用。
试过了:
$ rm out/target/product/panda/system/xbin/su
$ make external/su-binary
[...]
make: Nothing to be done for `external/su-binary'.
$ rm out/target/product/panda/obj/EXECUTABLES/su_intermediates/su
$ make external/su-binary
[...]
make: Nothing to be done for `external/su-binary`.
模块依赖在 Android 中是如何工作的?