自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
與 Android CTS 整合
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Android CTS 版本套件 (可從 Android 相容性下載項目取得) 包含 Khronos 相容性測試,且需要通過其中一部分測試 (稱為 mustpass
清單)。如果裝置不支援目標 API 或擴充功能,系統會略過測試,並將測試結果回報為通過。
mustpass
清單涵蓋 OpenGL ES 2.0 至 OpenGL ES 3.2 和 Vulkan 1.1。mustpass
檔案位於 Khronos 相容性測試的 android/cts
目錄下。您可以使用下列指令,透過 cts-tradefed
公用程式執行這些測試:
cts-tradefed run cts --plan CTS-DEQP
重複執行作業 (不含 CTS)
如要複製 CTS 執行作業,請安裝 CTS 套件的 deqp APK,然後使用下列指令:
adb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity -e \
cmdLine "deqp --deqp-case=dEQP-GLES3.some_group.* --deqp-gl-config-name=rgba8888d24s8 --deqp-log-filename=/sdcard/dEQP-Log.qpa
重要的部分是 --deqp-gl-config-name=rgba8888d24s8
引數,它會要求在 RGBA 8888 畫面上層執行測試,並使用 24 位元深度緩衝區和 8 位元模板緩衝區。請記得使用 --deqp-case
引數設定所需的測試。
CTS 結果對應
在 Android CTS 中,測試案例可能會結束於下列三種狀態之一:通過、失敗或未執行 (deqp 有更多可用的結果碼)。CTS 會自動將 Khronos 相容性測試結果代碼對應至 CTS 結果:
- CTS 通行證可包含
Pass
、NotSupported
、QualityWarning
和 CompatibilityWarning
。
- CTS 失敗可能包括
Fail
、ResourceError
、Crash
、Timeout
和 InternalError
。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Integrate with Android CTS\n\nAndroid CTS release packages (available from\n[Android Compatibility\nDownloads](/docs/compatibility/cts/downloads)) include [Khronos Conformance Tests](https://github.com/khronosgroup/vk-gl-cts) and require a subset of these\ntests (known as the `mustpass` list), to pass. For devices that do\nnot support a target API or extension, tests are skipped and reported as\npassing.\n\nThe `mustpass` list includes coverage for OpenGL ES 2.0 through\nOpenGL ES 3.2 and Vulkan 1.1. `mustpass`\nfiles can be found under the `android/cts` directory in the Khronos\nConformance Tests. You can run these tests through the `cts-tradefed`\nutility with the following command: \n\n```\ncts-tradefed run cts --plan CTS-DEQP\n```\n\nDuplicate runs without CTS\n--------------------------\n\nTo replicate the CTS run, install the deqp APK of the CTS package and use the\nfollowing command: \n\n```\nadb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity -e \\\ncmdLine \"deqp --deqp-case=dEQP-GLES3.some_group.* --deqp-gl-config-name=rgba8888d24s8 --deqp-log-filename=/sdcard/dEQP-Log.qpa\n```\n\nThe important part is the `--deqp-gl-config-name=rgba8888d24s8`\nargument, which requests the tests be run on an RGBA 8888 on-screen surface\nwith a 24-bit depth buffer and an 8-bit stencil buffer. Remember to set\nthe desired tests using the `--deqp-case` argument.\n\nCTS results mapping\n-------------------\n\nIn the Android CTS, a test case can end up in one of three states: passed,\nfailed, or not executed (the deqp has more result codes available). CTS\nautomatically maps Khronos Conformance Test result codes to CTS results:\n\n- A CTS pass can include `Pass`, `NotSupported`, `QualityWarning`, and `CompatibilityWarning`.\n- A CTS failure can include `Fail`, `ResourceError`, `Crash`, `Timeout`, and `InternalError`."]]