自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
Cuttlefish 虛擬 Android 裝置
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Cuttlefish 是可設定的虛擬 Android 裝置,可在遠端 (使用 Google Cloud Engine 等第三方雲端服務) 和本機 (在 Linux x86 和 ARM64 機器上) 執行。
Cuttlefish 目標
比較 Cuttlefish 與其他裝置
Cuttlefish 和 Android Emulator
與 Android Emulator 有很多相似之處,但 Cuttlefish 可保證與 Android 架構完全相符 (無論是純粹的 Android 開放原始碼計畫,還是您自有樹狀結構中的自訂實作)。在實際應用中,這表示您應預期 Cuttlefish 會在 OS 層級回應互動,就像使用相同自訂或純 Android OS 來源建構的實體手機目標一樣。
Android Emulator 的設計宗旨是讓應用程式開發作業變得簡單,因此內含許多功能掛鉤,可滿足 Android 應用程式開發人員的需求。如果您想使用自訂的 Android 架構建構模擬器,這可能會帶來挑戰。如果您需要代表自訂平台/架構程式碼或樹狀結構頂端 Android 的虛擬裝置,Cuttlefish 就是理想的虛擬選項。這是代表 AOSP 開發目前狀態的標準裝置。
Cuttlefish 和實體裝置
Cuttlefish 虛擬裝置與實體裝置的主要差異在於硬體抽象層 (HAL) 層級,以及與任何自訂硬體互動的任何軟體。除了硬體專屬的實作項目外,Cuttlefish 和實體裝置之間的行為應是功能等同的。
Cuttlefish 能提供哪些協助?
您可以與 Cuttlefish 互動,就像與任何其他用於偵錯的 Android 裝置互動一樣。它會透過 ADB 將自己註冊為一般裝置,您可以透過遠端桌面與其互動,就像使用實體裝置一樣。用途廣泛,涵蓋應用程式測試、自訂系統版本測試等。
由於 Cuttlefish 致力於提供完整的架構相容性,因此可用於架構或應用程式的功能測試,前提是這些架構或應用程式沒有無法模擬的實體硬體相依性。
目前 Cuttlefish 在測試時的常見用途為何?
以下是 Cuttlefish 在測試中常見的應用方式:
我可以在雲端託管 Cuttlefish 嗎?
是的,Cuttlefish 原生支援 Google Cloud,並且預計支援其他雲端平台。
開始使用
如需建立以 AOSP 為基礎的 Cuttlefish 執行個體的操作說明,請參閱「使用 Cuttlefish」。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。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,["# Cuttlefish virtual Android devices\n\n*Cuttlefish* is a configurable virtual Android device that can run both remotely\n(using third-party cloud offerings such as Google Cloud Engine) and locally (on\nLinux x86 and ARM64 machines).\n\nCuttlefish goals\n----------------\n\n- Free the platform and app developer from being dependent on physical hardware to develop and validate code changes.\n- Replicate the framework-based behavior of a real device with a focus on **high fidelity** by maintaining close alignment with the core framework.\n- Support all API levels after 28.\n- Provide a **consistent** level of functionality across API levels, aligned with the behavior on physical hardware.\n- Enable scale:\n\n - Provide the ability to run multiple devices in parallel.\n - Enable concurrent test execution with high fidelity at a lower cost of entry.\n- Provide a configurable device with the ability to adjust form factor, RAM,\n CPUs, etc.\n\nCompare Cuttlefish to other devices\n-----------------------------------\n\n### Cuttlefish and Android Emulator\n\nThere are many similarities with the [Android Emulator](/docs/setup/test/avd),\nbut Cuttlefish guarantees full fidelity with Android framework (whether this is\npure AOSP or a custom implementation in your own tree). In real-world\napplication, this means that you should expect Cuttlefish to respond to your\ninteractions at the OS level just like a physical phone target built with the\nsame customized or pure Android OS source.\n\nThe Android Emulator has been built around the use case of making app\ndevelopment easy, and it contains many functional hooks to appeal to the use\ncases of the Android app developer. This may present challenges if you want\nto build an emulator with your customized Android framework. If you need a\nvirtual device that will be representative of your custom platform/framework\ncode or tip-of-tree Android, then Cuttlefish is an ideal virtual option. It is\nthe canonical device for representing the current state of AOSP development.\n\n### Cuttlefish and physical device\n\nThe primary differences between a Cuttlefish virtual device and your physical\ndevice are at the hardware abstraction layer (HAL) level, as well as any\nsoftware that interacts with any custom hardware. Except for hardware-specific\nimplementations, you should expect functionally equivalent behavior between\nCuttlefish and a physical device.\n\nHow can Cuttlefish help?\n------------------------\n\nYou can interact with Cuttlefish just like you would with any other Android\ndevice that you might use for debugging. It will register itself as a normal\ndevice via adb and you can interact with it like a physical device via remote\ndesktop. The use cases are broad and can span app testing, custom system\nbuild testing and more.\n\nBecause Cuttlefish strives for full framework fidelity, it can be used for\nfunctional testing of your framework or apps where there are no\nphysical hardware dependencies that are impossible to emulate.\n\n### How is Cuttlefish commonly used for testing today?\n\nSome common applications of Cuttlefish for testing include:\n\n- CTS\n- Framework compliance\n- Continuous integration testing\n- Custom test suites\n\nCan I host Cuttlefish in the cloud?\n-----------------------------------\n\nYes, Cuttlefish natively supports Google Cloud and support for other cloud\nplatforms is planned.\n\nGet started\n-----------\n\nFor guidance on creating a Cuttlefish instance based on AOSP, see\n[Use Cuttlefish](/docs/devices/cuttlefish/get-started)."]]