Cuttlefish Virtual Android Devices

What Is Cuttlefish?

Cuttlefish is a configurable virtual Android device that can run both remotely (using third-party cloud offerings such as Google Cloud Engine) and locally (on Linux x86 machines).

Cuttlefish goals

  • Free the platform and application developer from being dependent on physical hardware to develop and validate code changes.
  • Replicate the framework-based behaviour of a real device with a focus on high fidelity by maintaining close alignment with the core framework.
  • Support all API levels after 28.
  • Provide a consistent level of functionality across API levels, aligned with the behaviour on physical hardware.
  • Enable scale:

    • Provide the ability to run multiple devices in parallel.
    • Enable concurrent test execution with high fidelity at a lower cost of entry.
  • Provide a configurable device with the ability to adjust form factor, RAM, CPUs, etc.

Comparing Cuttlefish to other devices

Cuttlefish and Android Emulator

There are many similarities with the Android Emulator, but Cuttlefish guarantees full fidelity with Android framework (whether this is pure AOSP or a custom implementation in your own tree). In real-world application, this means that you should expect Cuttlefish to respond to your interactions at the OS level just like a physical phone target built with the same customized or pure Android OS source.

The Android Emulator has been built around the use case of making application development easy, and it contains many functional hooks to appeal to the use cases of the Android application developer. This may present challenges if you want to build an emulator with your customized Android framework. If you need a virtual device that will be representative of your custom platform/framework code or tip-of-tree Android, then Cuttlefish is an ideal virtual option. It is the canonical device for representing the current state of AOSP development.

Cuttlefish and physical device

The primary differences between a Cuttlefish virtual device and your physical device are at the hardware abstraction layer (HAL) level, as well as any software that interacts with any custom hardware. Except for hardware-specific implementations, you should expect functionally equivalent behavior between Cuttlefish and a physical device.

How can Cuttlefish help?

You can interact with Cuttlefish just like you would with any other Android device that you might use for debugging. It will register itself as a normal device via adb and you can interact with it like a physical device via remote desktop. The use cases are broad and can span application testing, custom system build testing and more.

Because Cuttlefish strives for full framework fidelity, it can be used for functional testing of your framework and/or applications where there are no physical hardware dependencies that are impossible to emulate.

How is Cuttlefish commonly used for testing today?

Some common applications of Cuttlefish for testing include:

  • CTS
  • Framework compliance
  • Continuous integration testing
  • Custom test suites

Can I host cuttlefish in the cloud?

Yes, Cuttlefish natively supports Google Cloud and support for other cloud platforms is planned.

Getting started

See the Getting Started guide for guidance on creating a Cuttlefish instance based on AOSP.