Tomacco

Docs Operation reference runtime operations

runtime operations#

8 operations. Generated from assets/operations.json; all areas.

On this page (8)

runtime.start#

Connect native runtime

Start or reuse the single native display session for this device. Repeated calls return its existing session ID. Supports Android, physical iPhone from Linux, and Apple Simulator on an optional SSH Mac.

Annotations: writes, idempotent, open world.

ArgumentTypeRequiredDefaultDetails
platformstringyesone of android, ios
devicestringyesnon-empty, up to 200 characters
remotestringOptional configured Mac workspace for an Apple Simulator; omit for a physical iPhone on Linux.
serverstringOptional scrcpy 4.1 server JAR override.
fpsinteger601 to 60
bit_rateinteger12000000100000 to 50000000
runner_bundle_idstring""Installed WebDriverAgent runner identifier for a physical iPhone.
runner_modestring"xctest"one of xctest, external; xctest: start the signed WDA runner through go-ios; external: WDA is already running on the selected USB device.
audiobooleantrueForward Android output audio to this computer using a session-owned scrcpy playback job. Does not capture a microphone. Unsupported audio leaves video connected and reports audio failure.
tomaccoctl call runtime.start '{"platform":"android","device":"<device>"}'

runtime.list#

Native sessions

List native display sessions and connection status.

Annotations: read-only, idempotent, open world.

Takes no arguments.

tomaccoctl call runtime.list

runtime.audio#

Stream device audio

Start, stop or inspect Android output audio playback on this computer without restarting the app or display session. Repeated starts reuse one playback job. Stops restore the device audio route; they do not mute the device itself. Requires Android 11+ and scrcpy.

Annotations: writes, idempotent, open world.

ArgumentTypeRequiredDefaultDetails
sessionstringyesConnected Android runtime session ID.
actionstring"status"one of start, stop, status
tomaccoctl call runtime.audio '{"session":"<session>"}'

runtime.state#

Runtime status

Read actual runtime dimensions, video counters and transport errors.

Annotations: read-only, idempotent, open world.

ArgumentTypeRequiredDefaultDetails
sessionstringyesmatching ^[a-f0-9]{32}$; ID returned by runtime.start; separate from desktop preview sessions.
tomaccoctl call runtime.state '{"session":"<session>"}'

runtime.stop#

Disconnect runtime

Stop this display session and its private transport. The device and application remain running.

Annotations: writes, idempotent, open world.

ArgumentTypeRequiredDefaultDetails
sessionstringyesmatching ^[a-f0-9]{32}$; ID returned by runtime.start; separate from desktop preview sessions.
tomaccoctl call runtime.stop '{"session":"<session>"}'

runtime.input#

Native input

Deliver native input using normalized 0..1 coordinates. Android supports touch/tap/swipe/key/text/rotate; text pastes UTF-8. Physical iPhone uses WDA for Unicode text/fill, tap/swipe/rotate and gestures committed on touch-up; pinch/shake/hinge are unsupported there. Apple Simulator supports ASCII HID text and Unicode accessible fill; extra gestures depend on the companion. Pass decoded width/height after Simulator rotation.

Annotations: writes, not idempotent, open world.

ArgumentTypeRequiredDefaultDetails
sessionstringyesmatching ^[a-f0-9]{32}$; ID returned by runtime.start; separate from desktop preview sessions.
actionstringyesone of touch, tap, swipe, key, text, fill, rotate, shake, pinch, hinge
phasestringone of down, move, up, cancel
xnumber0 to 1
ynumber0 to 1
x2number0 to 1
y2number0 to 1
durationnumber0.30.01 to 5
keystringone of home, back, escape, enter, backspace, delete, tab, up, down, left, right, power, volume_up, volume_down, apps
textstringup to 16000 characters
orientationstringone of portrait, portrait_upside_down, landscape_left, landscape_right
scalenumber0.05 to 20
anglenumber0 to 180
widthinteger1 to 16384
heightinteger1 to 16384
tomaccoctl call runtime.input '{"session":"<session>","action":"touch"}'

runtime.capture#

Native capture

Capture a full-resolution PNG from the actual runtime to a local path.

Annotations: writes, not idempotent, open world.

ArgumentTypeRequiredDefaultDetails
sessionstringyesmatching ^[a-f0-9]{32}$; ID returned by runtime.start; separate from desktop preview sessions.
pathstringyesnon-empty
tomaccoctl call runtime.capture '{"session":"<session>","path":"<path>"}'

runtime.hierarchy#

Native accessibility tree

Read Android UI XML, the physical iPhone WDA XML hierarchy or the iOS Simulator accessibility tree for agent inspection.

Annotations: read-only, idempotent, open world.

ArgumentTypeRequiredDefaultDetails
sessionstringyesmatching ^[a-f0-9]{32}$; ID returned by runtime.start; separate from desktop preview sessions.
tomaccoctl call runtime.hierarchy '{"session":"<session>"}'

View this page as Markdown on GitHub