android“設定”裡的版本號碼

來源:互聯網
上載者:User

在檔案 packages/apps/Settings/src/com/android/settings/DeviceInfoSettings.java 中

setStringSummary("build_number", Build.DISPLAY);

指定了設定--關於裝置--版本號碼。

Build.DISPLAY即Build類中的 DISPLAY 變數,在檔案frameworks/base/core/java/android/os/Build.java 中:

public static final String DISPLAY = getString("ro.build.display.id");

 

ro.build.display.id在檔案build/tools/buildinfo.sh中:

echo "ro.build.display.id=$BUILD_DISPLAY_ID"

 

 而BUILD_DISPLAY_ID在檔案build/core/Makefile中: 

 BUILD_DISPLAY_ID := $(BUILD_ID).$(BUILD_NUMBER)

 

其中 BUILD_ID在build/core/build_id.mk中賦值

BUILD_ID := OPENMASTER

 

 BUILD_NUMBER 在 build/core/version_defaults.mk中賦值: 

BUILD_NUMBER := eng.$(USER).$(shell date +%Y%m%d.%H%M%S)

所以在版本號碼中會出現編譯時間的欄位。

ro.build.display.id編譯後保持在system下的build.prop檔案。

 

轉自:http://blog.sina.com.cn/s/blog_446cc66b0100vot2.html

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.