Puente. Your Android, on your PC.

See it and control it from Linux or Windows over the local network: no cable, no ADB and no developer mode.

Download 0.3.2
Other versions
See the repository

Two tools, one single app

KDE Connect brings the notifications and scrcpy brings the screen, each with its own install and its own way of connecting. Puente does both with a single Rust codebase and a single pairing, and without ADB, because it uses Android’s own screen capture and Accessibility.

Nine Puente cards on a near-black background, drawn in white dots: link with a bridge of dots, battery ring at 78, audio waveform, code 482 917 and music controls
The puente --gallery window: every piece of the interface, with sample data so it can be reviewed without a phone.

The phone at the center

The window is a test bench. The phone sits in the middle and small cards around it measure what happens to it. Every number comes from the connection or from the phone; with no data, a dash. The ones here are the gallery’s sample values.

You see the screen and drive it

MediaCodec compresses what the phone shows into H.264 and openh264 decodes it on the PC. Mouse and keyboard travel back as Accessibility gestures; right click is back and middle click is home, as in scrcpy. In Auto mode the quality adapts to what the network handles, without cutting the picture. F2 hides the cards and leaves only the phone.

01 Link
ms
24
fps
58
mbps
7.4

What needs attention gets through

Notifications, calls and battery show up on the PC. A notification can be answered or dismissed from there without touching the phone, or all of them cleared at once. The ring only turns red below 15% and not charging.

02 Battery

What plays, plays here

AudioPlaybackCapture takes the sound of the phone’s apps and cpal plays it on the PC; while streaming, the phone can stay silent. Music is controlled from its own card: play, pause, previous and next.

03 Audio
Playing on the PC

Files cross in both directions

You drag them onto the window or send them with puente --send from the terminal, and the clipboard is shared. The sender finds out when the other side has saved the whole file, not when the last byte left. A hostile file name cannot escape the downloads folder: there is a test for that.

04 Files
Drop here
sample-photo.jpg62 %

If you cannot find it, it rings

A button on the PC makes the phone ring. That command does not depend on the screen being shared: the two only need to be connected.

05 Phone

Six digits that cannot be rigged

A six-digit code is short: someone on your network could generate certificates until one matches. That is why the PC commits to its random value before seeing the phone’s, and neither side can steer the result.

Try it. This really runs in your browser: the same SHA-256, the same fields and the same order as short_code in pairing.rs. Only the certificate fingerprints are test values.

01 Link
Looking for your phone
PC
Phone
  1. PairCommitThe PC sends the SHA-256 of its random value.
  2. PairNonceThe phone replies with its own.
  3. PairRevealThe PC reveals its value and the phone recomputes the hash.

One connection, four lanes

Control, audio, video and files share a single TLS socket. Each message is 4 bytes of length, 1 of type and the payload. The send queue is biased on purpose: pending video must not delay a command.

ControlAudioVideoFiles

Android

A minimal Kotlin layer for the classes Android requires: MediaCodec, AccessibilityService and the notification service. Everything else is the same Rust.

Mutual TLS 1.3

Self-issued certificates, pinned at pairing. Before authentication no message may exceed 1 MiB; after it, 8 MiB, because a key frame takes several megabytes.

Linux

egui draws the same interface on both sides. A ping every 2 seconds measures the real latency, and if nothing arrives in 15 the connection is considered dead. Closing the window keeps Puente connected in the tray, and it can start when you log in.

Counted, not estimated

From the repository, the day this page was published.

lines of Rust

lines of Kotlin, the ones Android requires

tests, all passing

crates in a single workspace

Three of the tests

  • an_impersonator_of_a_paired_peer_still_gets_the_code_prompt
  • a_file_with_a_hostile_name_lands_inside_the_downloads_folder
  • oversized_frames_are_refused_before_allocating

No ADB has a price

Android imposes these restrictions. The app explains them instead of hiding them.

  • You have to confirm every time screen sharing starts.
  • Protected apps, such as banking apps, show up black.
  • The clipboard from phone to PC is not automatic: Android blocks reading it in the background. It is sent when you open Puente or from the Share menu.
  • Typing from the PC uses Accessibility and can fail in games or apps with a custom interface.

I built it so I would not pick up the phone

The Puente mark on black, on white and on red: a solid arch, a red bar and hanging dots forming the lower arch

A single codebase

Rust and egui for desktop and Android. The protocol, the pairing and the interface are the same crates on each side, and they are tested with real TLS connections over loopback. The interface speaks Spanish, English and Portuguese.

What is missing

  • Tested on a Galaxy S23 Ultra and on Hyprland with XWayland, nothing else.
  • The Windows build compiles and passes the tests, but has not yet been tried with a real phone.
The code, on GitHub

Download it

Version 0.3.2, straight from GitHub. Install one on the PC and the APK on the phone; both must be on the same local network with port 1714 open.

SHA256SUMS to verify the files · release notes for 0.3.2

First steps

Android 10 or later on arm64, the same local network and port 1714 open.

  1. Open Puente on the PC and on the phone.
  2. Tap your PC and confirm the code matches on both.
  3. Tap Share screen: Android will ask every time.
  4. Turn on Control from the PC and Notifications on the PC.
# Or build it: the PC
git clone https://github.com/jorge07RD/puente
cd puente
./scripts/install-desktop.sh

# The phone, with the Android SDK and NDK r29
rustup target add aarch64-linux-android
cargo install cargo-ndk
./scripts/build-android.sh

A similar problem? Let’s talk

Or carry on to the other projects.