USER 版本與ENG 版本差異

來源:互聯網
上載者:User
[Description]
Android USER 版本與ENG 版本的差異
 
[Keyword]
USER ENG user eng 使用者版本 工程版本 差異
 
[Solution]
Google 官方描述: USER/USERDEBUG/ENG 版本的差異, 參考alps/build/core/build-system.html 的詳細說明
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.
*       Setupwizard is optional
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.
*       Enable dex pre-optimization for all TARGET projects in default to speed up device first boot-up
userdebug make userdebug
The same as user, except:
*       Also installs modules tagged with debug.
*       ro.debuggable=1
*       adb is enabled by default.   MTK 補充說明差異:
(1) Debug/LOG 方面,原則上user 版本只能抓到有限的資訊,eng 可以抓到更多的資訊,Debug 能力更強,推崇使用eng 版本開發測試
*       因user/eng 版本設定ro.secure不同,導致user 版本adb 只擁有shell 許可權,而eng 版本具有root 許可權
*       MTK System LOG 在ICS 以後,在user 版本預設關閉全部LOG, 在eng 版本中預設開啟,以便抓到完整的資訊
*       在eng 版本上,LOG 量 >= user 版本的log 量,一些地方會直接check eng/user 版本來確認是否列印LOG
*       user 版本預設關閉uart, eng 版本預設開啟uart
*       在eng 版本上,開啟ANR 的predump, 會抓取ftrace,可以得到更多ANR的資訊
*       在eng 版本上,可用rtt 抓取backtrace,可開啟kdb 進行kernel debug, 可用ftrace 抓取cpu 執行情境
*       MTK aee 在ENG 版本抓取更多的異常資訊,比如native exception 會抓取core dump 資訊 (2) 效能方面,原則上進行效能測試請使用user 版本測試
*       user 版本為提高第一次開機速度,使用了DVM 的預最佳化,將dex 檔案分解成可直接load 啟動並執行odex 檔案,ENG 版本不會開啟這項最佳化
*       更少的LOG 列印,uart 的關閉,原則上user 版本的效能要優於eng 版本 (3) 如何確認user/eng 版本
*       Java 層,check android.os.Build 類中的TYPE 值
*       native 層,property_get("ro.build.type", char* value, "eng"); 然後check value 值
*       Debug 時, adb shell getprop ro.build.type 傳回值如果是user 即user 版本,eng 即eng 版本
*       Log 確認,  mobile log/Aplog_xxxxx/versions 中查看ro.build.type 屬性 (4) 如何編譯user/eng 版本
*       預設編譯是eng 版本,如果需要編譯user 版本,請加入參數 -o=TARGET_BUILD_VARIANT=user 如:
        ./mk -o=TARGET_BUILD_VARIANT=user mt6577_phone new

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.