AIGenerated
EN · IT · ES

Meta brings Android's Cuttlefish emulator to Macs with Apple Silicon

It means Android software can now be tested on real-looking virtual phones running directly on Apple computers.

cachyOS Linux installation screen.
File picture · Photo: Mallikarjunasj, CC BY-SA 4.0, via Wikimedia Commons (licence)

What you could do with it

  • A Meta Reality Labs engineer could test software for AI-powered smart glasses on virtual devices that closely reproduce real phone behavior directly from a Mac 1.
  • An Android developer could build and test apps on the same high-fidelity Cuttlefish virtual devices used in CI pipelines, eliminating reliance on scarce physical hardware 1.
  • An external third-party developer could validate their Android application against the identical virtual device platform Meta uses to develop and validate the OS itself 1.

Why Meta needed this

Meta's Reality Labs division builds things like AI-powered smart glasses. To test software for those kinds of non-phone Android devices, engineers need virtual phones that behave like real ones 1.

For a long time, Cuttlefish could only run on Linux computers. But most of Meta's app and library developers use Macs with Apple Silicon chips. That forced the team to run two separate emulator platforms at once: Goldfish, which runs everywhere but gives lower-quality results, and Cuttlefish, which needs Linux 1.

Having to maintain both platforms was heavy work. It drained computing resources, confused developers who had to pick which emulator to use, slowed down the emulator team, and meant every tool needed to be built for two different systems 1. It also mirrored a split already present in the Android Open Source Project itself — Goldfish targets regular app developers while Cuttlefish serves deeper Android platform developers 2.

What Meta changed

Cuttlefish is the orchestration layer — the part that manages everything — while a component called a virtual machine monitor does the actual running of the phone's operating system inside the computer. On Linux, Cuttlefish uses a tool called crosvm; it previously also supported QEMU as an alternative 1.

To get Cuttlefish working on macOS, Meta revived the older QEMU support, which had gone unused over time 1. They then fixed three major problems.

First, parts of Cuttlefish's virtual hardware system called vhost-user were written assuming they would only ever run on Linux. Meta relaxed those restrictions so the same device hardware can connect to QEMU on a Mac just as it does on Linux 1.

Second, on Apple Silicon, QEMU uses a feature called HVF (Hypervisor.framework), which is Apple's version of virtualization acceleration, instead of KVM used on Linux. QEMU's HVF backend wasn't keeping track of enough memory regions for larger Cuttlefish setups, so Meta increased the tracking capacity 1.

Third, developers need to see and interact with the virtual phone directly. Meta switched to QEMU's native Cocoa display system, adding support for the correct pixel format to avoid visual glitches, translating mouse clicks into touch input for touchscreen devices, and enabling extra display configuration options 1.

The team also handled the usual macOS packaging requirements: building for the arm64 chip, adding the required just-in-time execution entitlement, and supporting code signing and notarization — Apple's approval process 1.

What this unlocks

With a single unified platform, Meta cut maintenance work, reduced infrastructure needs, eliminated duplicate tools, and improved the quality of virtual device testing 1. All developers now run the exact same Cuttlefish virtual devices that are used across the company's automated testing pipelines .

The shared stack also makes it easier to support features that real Android devices have: Bluetooth pairing, Wi-Fi, cellular connections, 3D graphics rendering, over-the-air update testing, Fastboot mode, and snapshots that let engineers save and restore a device's state instantly 1.

Key facts

  • Cuttlefish was previously limited to Linux and could not run natively on macOS
  • Meta revived Cuttlefish's QEMU backend and added macOS-specific vhost-user support
  • Apple Silicon requires HVF (Hypervisor.framework) instead of Linux's KVM for virtualization
  • A unified platform now supports Bluetooth, Wi-Fi, cellular, 3D graphics, OTA updates, Fastboot and snapshots
  • Meta's shift affects all Reality Labs engineers working on Android-based devices like AI glasses

Sources

  1. Cuttlefish on Mac: Running Android’s Virtual Device Framework Natively on Apple Silicon — engineering.fb.com
  2. Cuttlefish virtual Android devices | Android Devices | Android Open Source Project — source.android.com

If this story concerns you or your company, or uses something that belongs to you, ask for a correction or for it to be taken down. How requests work

Keep reading