Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> Android源碼編譯選項eng、user、userdebug的區別

Android源碼編譯選項eng、user、userdebug的區別

編輯:關於Android編程

Android源碼編譯選項eng、user、userdebug的區別


1、各選項簡要說明

eng:debug版本

user:release版本

userDebug版本:部分debug版本

2、詳細介紹

Android源碼編譯選項eng、user、userdebug是由Android.mk文件中的LOCAL_MODULE_TAGS配置項來決定的。其一般形式如下:

LOCAL_MODULE_TAGS := user eng optional test
各項具體說明如下:

1、user:只有在user版本時該模塊才被編譯進去;

2、eng:只有在eng版本時該模塊才被編譯進去;

3、test:只有在tests版本時該模塊才被編譯進去;

4、optional:在所有版本中都編譯該模塊進去。

其中的值可設置為1個或多個,分別對應編譯選項的同一個或多個。

eng、user、userdebug的區別如下:

1、當make eng時,也即相當於make。此時BuildType為eng,那麼其編譯進去的內容包括:

·Intended for platform-level debugging

·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 taggedAPKs

·Sets ro.secure=1

·Sets ro.debuggable=0

·Sets ro.kernel.android.checkjni=1

·adbd is enabled by default

2、當make user時,此時BuildType為user,那麼其編譯進去的內容包括:

·Intended to be the final release

·Installs modules tagged as user

·Installs non-APK modules that have no tags specified

·Installs APKs according to the product definition files (tags are ignored forAPK modules)

·Sets ro.secure=1

·Sets ro.debuggable=0

·adbd is disabled by default

3、當make userdebug時,此時BuildType為userdebug,那麼其編譯進去的內容包括:

thesame as user, except:

·Intended for limited debugging

·Installs modules tagged with debug

·Sets ro.debuggable=1

·adbd is enabled by default


3、表格:

eng

This is the default flavor. A plain "make " is the same as "make eng ". droid is an alias foreng .

· 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.






  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved