---
title: "pbl emulator"
canonical_url: https://developer.repebble.com/pebbleos/docs/pbl/emulator/
last_updated: 2026-10-27
sdk_version: 4.33.1
---
# pbl emulator

Source: https://developer.repebble.com/pebbleos/docs/pbl/emulator/

Interact with the emulator [pbl run](https://developer.repebble.com/pebbleos/docs/pbl/run.md) is running: QEMU on a `qemu_*` board, or the [native simulator](https://developer.repebble.com/pebbleos/docs/development/emulation/native_simulator.md) on a `native_*` one. Each action is a subcommand.

On QEMU, screenshots go through the socket monitor and touches through the QMP socket, on the emulated touch controller’s input path. The native simulator has neither: both go over its Pebble protocol port, to the firmware’s screenshot and remote input endpoints. That port serves one client at a time, so they fail there while a feed holds it.

## Screenshots

```
pbl emulator screenshot# build/screenshot.pngpbl emulator screenshot --output /tmp/foo.png
```

```
pbl emulator screenshot [-h] [-b DIR] [--dry-run] [-o OUTPUT]
```

`-o, --output OUTPUT`

Where to write the PNG (default: screenshot.png in the build)

## Touch

On touch-capable boards, tap or swipe the screen. Coordinates are screen pixels. A tap is a finger down then up; a swipe moves the finger from the first point to the second through intermediate steps, so drag gestures are seen as continuous.

```
pbl emulator touch 130 130pbl emulator swipe 130 220 130 40# swipe uppbl emulator swipe 130 220 130 40 --duration 0.4
```

```
pbl emulator touch [-h] [-b DIR] [--dry-run] [--duration DURATION] x y
```

`x`

x coordinate in screen pixels

`y`

y coordinate in screen pixels

`--duration DURATION`

how long the finger stays down, in seconds (default: 0.05)

```
pbl emulator swipe [-h] [-b DIR] [--dry-run] [--duration DURATION] x1 y1 x2 y2
```

`x1`

start x in screen pixels

`y1`

start y in screen pixels

`x2`

end x in screen pixels

`y2`

end y in screen pixels

`--duration DURATION`

total duration in seconds (default: 0.25)

## Phone data

Write into the running emulator what the phone app would, over the Pebble protocol port, so features that depend on the phone can be exercised without one. Each kind of data is a subcommand:

```
pbl emulator feed weather# a forecast for a few built-in citiespbl emulator feed weather Tokyo Sydney --seed 3# a subset; the first is the current locationpbl emulator feed weather --clear# remove every locationpbl emulator feed music# a player and playlist; keeps serving until Ctrl-Cpbl emulator feed music --title "Demo" --paused# a single track of your ownpbl emulator feed calendar# a day of events around nowpbl emulator feed calendar --title "Dentist" --start 15 --location "Downtown"pbl emulator feed calendar --clear# remove every pinpbl emulator feed notifications# a few messages from two senderspbl emulator feed notifications --sender Anna --body "Lunch?" --app WhatsApp
pbl emulator feed notifications --clear# remove every notification
```

`pbl emulator feed <feed> --help` lists a feed’s own options. A feed that writes a database, like weather, exits once the data is stored. One that stands in for the phone, like music, keeps running: it acts on the watch’s controls, advances playback and draws album art when asked (album art is off by default, under Settings \> Music). The emulator’s port serves one host client at a time, so run one such feed at once.

The feeds live in `tools/libs/pbl-cli/pbl/feeds/`, one module per kind of data; [Extending pbl](https://developer.repebble.com/pebbleos/docs/pbl/extending.md) shows how to add one.

```
pbl emulator feed [-h] [-b DIR] [--dry-run] [--host HOST] FEED ...
```

`calendar`

A day of calendar events

`music`

A music player and its playlist

`notifications`

A day of messages from a few senders

`weather`

A forecast for a few cities

`--host HOST`

host:port of the emulator’s Pebble protocol serial port (default: 127.0.0.1:12344)

Generated from PebbleOS [105df6122](https://github.com/coredevices/pebbleos/commit/105df6122f58fbfd5ab979eecbd4ae6504b0433d). This page is maintained in the pebbleos repository: [docs/pbl/emulator.md](https://github.com/coredevices/pebbleos/blob/105df6122f58fbfd5ab979eecbd4ae6504b0433d/docs/pbl/emulator.md).
