Working with code
A USB device in the box: Android phones, boards and dongles
Connect a USB device on the machine to one session from its header menu, how the box follows re-enumeration, and where it works: Docker Engine on Linux, WSL2 with usbipd-win, not Docker Desktop.
Feature page: A USB device in the box — screenshots, things you can do with it and how other products compare.
Plug the device into the machine that runs Sessionboxer, then in the session's ▾ menu pick Connect USB device… and choose it from the list (hubs are not shown). The device's node, /dev/bus/usb/BBB/DDD, appears in that box — and only there: a device belongs to one session at a time, and connecting it to another session takes it away from the first (the list says which session has what; the sidebar shows a USB icon next to sessions that hold a device). The agent is told the path and that it is the only USB device it can reach. When the device re-enumerates — unplugged and plugged back, reset, an Android "Allow USB debugging" or USB-mode change — its number changes; the box follows within a couple of seconds and the agent is told the new path. Stop/Resume keeps the device; Delete releases it.
Nothing that talks to USB devices is preinstalled in the box: the agent installs what it needs (sudo apt-get install -y adb for an Android phone, then adb devices; the phone's authorisation prompt is answered once per box, since the adb key lives in the box).
Where it works:
- Linux, Docker Engine on the machine (native, or
docker composewith/var/run/docker.sock): out of the box. - Windows, Docker Engine inside WSL2 (Sessionboxer running in the same WSL2 distro): install usbipd-win on Windows (
winget install usbipd). The list then shows the Windows devices too, with their bus id; Connect attaches the device to WSL2 for you (usbipd attach --wsl) and keeps re-attaching it after resets. The first time a given device is used it has to be shared (usbipd bind), which needs an administrator: Sessionboxer asks Windows for the elevation prompt, or runusbipd bind --busid <id>once in an administrator terminal (it survives reboots). While attached, the device is invisible to Windows programs (adb.exeincluded); Disconnect gives it back. - Docker Desktop (macOS, Windows), OrbStack, Colima: not supported — those VMs have no USB passthrough. Use adb over Wi-Fi from the box instead (
adb pair/adb connect), or the Wi-Fi/network protocol of whatever the device speaks.
Sessions created before this version of Sessionboxer have no /dev/bus/usb in their box; Delete and recreate them (or fork from a snapshot) to use a device.
This chapter is generated from docs/GUIDE.md in the Sessionboxer repository. Found a mistake? Open an issue.