Mock Device Kit

Updated: 14 Mei 2026

Overview

Mock Device Kit is a component of the Device Access Toolkit that helps you build and test integrations for Meta glasses, without the need to access the actual hardware.
This kit provides a simulated device that mirrors the capabilities and behavior of Meta glasses, including camera streaming, photo capture, permissions, and device state changes. You can use it to test your app integrations in a virtual environment. This is useful for rapid iteration, automated testing, and development workflows where physical devices may not be available or practical to use.
When Mock Device Kit is enabled, it simulates the entire SDK stack -- including app connection (registration) and permission requests. Your app code works the same way regardless of whether it’s talking to a real device or a mock device.
Note: This page covers the debug UI in the CameraAccess sample app. For writing automated tests, see Android testing with Mock Device Kit or iOS testing with Mock Device Kit.

Using Mock Device Kit in the CameraAccess sample

The CameraAccess sample app includes a built-in debug UI for controlling Mock Device Kit, available in debug builds only.

Enabling Mock Device Kit

  1. Launch the CameraAccess sample app. You’ll see the home screen prompting you to connect your glasses.
  2. Tap the debug icon (ladybug) on the right side of the screen to open the Mock Device Kit sheet.
  3. Tap Enable MockDeviceKit. This activates the mock device system, which simulates app connection and permission requests. The CameraAccess sample is configured to automatically complete registration when Mock Device Kit is enabled, so the app passes the connection step.
  4. Close the sheet to see the main screen with a “Start streaming” button.
    Image showing the Mock Device Kit debug menu
You can tap Disable MockDeviceKit at any time to return to the real SDK stack.

Pairing a mock device

  1. Open the debug menu and tap Pair RayBan Meta to create a simulated device. A mock device card appears in the sheet.
  2. Use the toggles on the device card to set the device state:
    • Power -- Simulates powering on the glasses.
    • Don -- Simulates wearing the glasses. This automatically unfolds the device as well.
    • Unfold -- Simulates unfolding the glasses.
The device must be powered on and worn (donned) before streaming can start. You can pair up to three mock devices at a time. To remove a device, open the sheet and tap Unpair on the device card.
Image showing mock device controls

Simulating media streaming

Once your mock device is powered on and worn, close the Mock Device Kit sheet. The app detects the active device and enables the Start streaming button.
Before starting a stream, you can configure Mock Device Kit with either a live phone camera feed or a video file to simulate streaming from the glasses.

Using phone camera as a mock feed

You can use your phone’s own camera as a live mock camera feed. This is useful for real-time testing and demos without needing pre-recorded video files.
  1. Open the Mock Device Kit sheet and expand your paired device card.
  2. Tap the camera source picker and select Front Camera or Back Camera.
  3. If prompted, grant camera permission to the app.
  4. Close the sheet and tap Start streaming. The phone’s camera feed appears as if it were streaming from the glasses.
When using a phone camera as the mock feed, photo capture takes a live still from the active camera session.

Using a video file

  1. Open the Mock Device Kit sheet and expand your paired device card.
  2. Tap the camera source picker and select Video File.
  3. Tap Select video and choose a video from your photo library. This video is used as the mock streaming feed.
    Note: Mock Device Kit requires video files in h265 format. The iOS CameraAccess sample app converts video automatically, but the Android sample does not. To transcode a video to h265 manually, you can use FFmpeg. For example:
     ffmpeg -hwaccel videotoolbox -i input_video.mp4 -c:v hevc_videotoolbox -c:a aac_at -tag:v hvc1 -vf "scale=540:960" output_video.mov
    

Image capture

To set a specific image as the mock capture result, tap Select image and choose a photo from your photo library. This image is returned when you trigger a photo capture during streaming.
If you are using a phone camera as the mock feed, you don’t need to set a separate captured image -- capture takes a live photo from the active camera instead.

Simulating touch gestures

The mock device card includes buttons for simulating capacitive touch gestures on the glasses temple:
  • Tap -- Simulates a single capacitive touch. During an active stream, this toggles between pause and resume.
  • Tap and Hold -- Simulates a tap-and-hold gesture. During an active stream, this stops the session.
These gestures let you test how your app responds to user interactions on the glasses without needing physical hardware.