Technology1 min read

Cuttlefish on Mac: Running Android’s Virtual Device Framework Natively on Apple Silicon

By · Published by Everything Blog

In short

Meta’s Reality Labs engineers ported the Cuttlefish virtual device framework to Apple silicon Macs to resolve operational friction in hardware development. Previously, dividing work between the Goldfish emulator on macOS and Cuttlefish on Linux obscured subtle bugs due to fidelity differences. The new port addresses Linux-specific virtualization assumptions by reviving QEMU as the virtual machine monitor and adapting it to Apple's Hypervisor.framework. Notably, the team increased the tracking-slot count for memory regions to accommodate the resource demands of larger system configurations.

Key points

  • Running Cuttlefish natively on Apple silicon eliminates the operational burden of maintai…: Running Cuttlefish natively on Apple silicon eliminates the operational burden of maintaining two separate virtualization environments.
  • Reviving QEMU and adapting vhost-user machinery allowed developers to bypass longstanding…: Reviving QEMU and adapting vhost-user machinery allowed developers to bypass longstanding Linux-only virtualization dependencies.
  • Native Cocoa display integration delivers mouse-click-as-touch translations and BGRA pixe…: Native Cocoa display integration delivers mouse-click-as-touch translations and BGRA pixel format support to improve local rendering.

Sources checked by our analysis pipeline: 1

Meta’s Reality Labs builds products such as AI glasses. Emulators provide us with a way to scale development and testing without relying on scarce physical hardware.

Testing software for non-phone Android devices depends on how closely a virtual device reproduces the software behavior of the physical product. While a lightweight emulator like Goldfish gets you part of the way, differences from the real device can hide bugs until later in development. This lack of fidelity also erodes trust in device emulation, increasing reliance on scarce physical hardware.

Cuttlefish is the Android Open Source Project’s (AOSP’s) virtual-device framework for testing Android software against virtual hardware. It boots the same system images as real hardware and runs a realistic software stack against virtual hardware. This enables Cuttlefish to more closely track a physical device’s behavior than a lightweight emulator does.

Unfortunately, Cuttlefish is only supported on Linux, and our application and library developers work on Macs with Apple silicon. This forced us to support Goldfish and Cuttlefish side by side.

We knew if we could consolidate onto a single Cuttlefish-based platform, we…

Technology