LOCAL_MODULE_TAGS有什么用?

Bha*_*kla 27 android frameworks package android-build android-source

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

怎么LOCAL_MODULE_TAGS办?

小智 33




更正:
不再推荐使用用户标记.
代替,

Add "LOCAL_MODULE_TAGS := optional"
Then add "LOCAL_MODULE" value to PRODUCT_PACKAGES section of product makefile.
Run Code Online (Sandbox Code Playgroud)

原帖:

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

你可以在这里找到完整的文件

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. 
Run Code Online (Sandbox Code Playgroud)

  • ETA:如果您根本不想构建*模块*,只需完全删除LOCAL_MODULE_TAGS即可. (2认同)