SNAPPASTE
Rust and Kotlin
Personal Project

चित्रa pictureNepali
Written in Ranjana, the calligraphic script of the Newars of the Kathmandu Valley.
SnapPaste puts a screenshot taken on an Android phone straight onto a Windows clipboard. Take it, press Ctrl+V on the PC, and it is there in about a tenth of a second, down the USB cable, with no cloud in between.
See the code on GitHub- Role
- Design and build, alone
- Kind
- Personal tool
- Desktop
- Rust, windows-rs, tray-icon
- Android
- Kotlin, coroutines
- Transport
- Raw TCP over USB
- Begun
- July 2026
The idea in twenty seconds
A short film of the whole tool: take the screenshot, press two keys, and see what happens in between.
Now you try
Take a screenshot on the phone, then press Ctrl+V on your own keyboard.

Nothing to paste yet.
Take a screenshot on the phone, then press Ctrl+V.
Twenty bytes first
Every packet opens with the same header, drawn here to scale. Select a field to see what it is for.
Magic
Bytes 0 to 3 of 20, little-endian
The same four bytes open every packet. Anything else that wanders onto the port is turned away at once.
How it is built
Thirteen decisions, from the phone to the wire to the PC, tipped out of the box.
Android, 1 of 13
MediaStore observer
A ContentObserver on the phone's MediaStore hears of a new screenshot within milliseconds, on a handler thread of its own. Nothing polls.
Touch a label to read it.
Budgets, and what it spends
Each limit was written down before the code was. The right-hand column is what it measured in real use.
| What | Budget | Measured |
|---|---|---|
| Screenshot to clipboard | under 150 ms | 60 to 110 ms |
| Clipboard update | under 20 ms | 8 to 14 ms |
| Cold start | under 300 ms | 45 ms |
| Memory when idle | under 15 MB | 8.8 MB |
| Processor when idle | under 1% | 0% |
| Back after a dropped cable | under 2 s | 1.1 s |