LOCAL_MODULE_TAGS有什么用?

时间:2012-02-29 09:11:41

标签: android frameworks package android-source android-build

我想在包中更新我的Android.mk文件以构建新包,但我不明白LOCAL_MODULE_TAGS的目的是什么。

LOCAL_MODULE_TAGS做了什么?

1 个答案:

答案 0 :(得分:33)




更正:
不再推荐使用用户标记。
相反,

Add "LOCAL_MODULE_TAGS := optional"
Then add "LOCAL_MODULE" value to PRODUCT_PACKAGES section of product makefile.

原帖:

LOCAL_MODULE_TAGS定义了应该安装此模块的构建风格。
如果您希望在所有(user,userdebug,eng)中安装模块,只需提供“user”标签

您可以找到完整的文档here

eng     This is the default flavor. A plain make is the same as make eng.

* Installs modules tagged with: eng, debug, user, and/or development.
* Installs non-APK modules that have no tags specified.
* Installs APKs according to the product definition files, in addition to tagged APKs.
* ro.secure=0
* ro.debuggable=1
* ro.kernel.android.checkjni=1
* adb is enabled by default. 

user    make user

This is the flavor intended to be the final release bits.

* Installs modules tagged with user.
* Installs non-APK modules that have no tags specified.
* Installs APKs according to the product definition files; tags are ignored for APK modules.
* ro.secure=1
* ro.debuggable=0
* adb is disabled by default.

userdebug   make userdebug

The same as user, except:

* Also installs modules tagged with debug.
* ro.debuggable=1
* adb is enabled by default.