天天看點

Android編譯選項eng、user、userdebug的差別 .

eng:debug 版本

user: release 版本

userDebug版本:部分debug版本

      要了解Android編譯選項eng、user和userdebug的差別,需先了解下LOCAL_MODULE_TAGS這一Android.mk檔案裡的配置項,一般配置形式為 LOCAL_MODULE_TAGS := user eng optional test這個樣子。       那麼 LOCAL_MODULE_TAGS設定為不同值有何作用呢?下面是對應不同值編譯的結果:     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 tagged APKs          · 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 for APK modules)          · Sets ro.secure=1          · Sets ro.debuggable=0          · adbd is disabled by default     3、當make userdebug時, 此時BuildType為userdebug, 那麼其編譯進去的内容包括:        the same as user, except:          · Intended for limited debugging          · Installs modules tagged with debug          · Sets ro.debuggable=1          · adbd is enabled by default        參考網址:http://hi.baidu.com/aokikyon/item/194b9bd9a6188ef593a9740e                       http://www.rosoo.net/a/201108/14878.html                       http://www.cnblogs.com/mr-raptor/archive/2012/06/07/2540359.html

繼續閱讀