Skip to content

Configuration

Divit Mittal edited this page Jun 22, 2026 · 1 revision

Configuration

By default, android-kvm reads:

${XDG_CONFIG_HOME:-~/.config}/android-kvm/config.toml

Example

android-edge = "right"
activation-pixels = 24
release-pixels = 4
poll-interval-ms = 16
pointer-scale = 1.0
audio-always-on = true
keep-awake-while-connected = true
power-on-on-connect = false
adb-binary = "adb"
android-width = 1080
android-height = 2400
control-port = 0

[scrcpy]
binary = "scrcpy"
serial = "DEVICE_SERIAL"
audio-enabled = true
audio-buffer-ms = 200
extra-args = []

Options

Option Purpose
android-edge Host edge used to enter Android focus: left, right, top, or bottom.
activation-pixels Outward swipe distance required after reaching the host edge. Increase this if capture activates too easily.
release-pixels Distance from the Android return edge that releases capture back to the host.
poll-interval-ms Capture/runtime poll interval.
pointer-scale Multiplier for relative pointer motion before forwarding to Android.
audio-always-on Keep the audio-only scrcpy process alive even while host focus is active.
keep-awake-while-connected Temporarily set Android's stay_on_while_plugged_in global setting to keep the device awake while USB-connected, then restore the previous value on release/exit.
power-on-on-connect Ask the scrcpy server to wake the device screen when Android focus starts. This does not unlock an already locked device.
adb-binary adb executable path or name.
android-width, android-height Android virtual display bounds for return-edge tracking. If omitted, android-kvm queries adb shell wm size and falls back to 1080x2400 with a warning.
control-port Local TCP port for the scrcpy control tunnel. Keep 0 to let the OS allocate a free port.
scrcpy.binary scrcpy executable path or name.
scrcpy.serial Optional Android device serial for multi-device setups.
scrcpy.audio-enabled Start an audio-only scrcpy companion process.
scrcpy.audio-buffer-ms Audio buffer passed to scrcpy.
scrcpy.extra-args Extra arguments for the audio-only scrcpy process.

Clone this wiki locally