A pure-Rust core for headless companion-suite features against an Android phone — screen mirroring, control input (mouse / scroll / keyboard), two-way clipboard (text + images), SMS verify-code and notification relay, device info, and file browse / pull — reverse-engineered and reimplemented from scratch, with no vendor binaries, no OpenSSL, and no Python.
The core delivers raw HEVC frames + events and accepts input over USB, LAN, or
remote, leaving video decode and UI to a platform frontend. A SwiftUI macOS app
ships today via pcsuite-ffi; Windows/Linux and a Flutter/IPC layer are deferred.
| crate | role |
|---|---|
pcsuite-crypto |
AES-256-CBC "sign" + AES-256-GCM (12- and 16-byte nonce) — pure RustCrypto |
pcsuite-proto |
wire formats: 10191 PAY_LOAD_1, connect frames, 8904 ruying frame, screen/input/clipboard messages |
pcsuite-net |
SSDP, TLS (rustls/ring, accepts self-signed), hand-rolled RFC6455 WS client |
pcsuite-core |
sessions: ConnectFlow registration, screen data plane, control input, clipboard / image / verify-code / notification relay, device info, file browse, USB (adb) + LAN/remote paths |
pcsuite-cli |
headless pcsuite binary that drives the core |
pcsuite-ffi |
swift-bridge bindings (static lib + generated Swift) for a SwiftUI macOS app — see crates/pcsuite-ffi/SWIFT_INTEGRATION.md |
cargo build
cargo test # offline unit tests (crypto KATs, frame round-trips, …)Every subcommand takes a transport: --usb, or --phone <IP> (optionally
--remote, --reg-ip, --data-ip).
pcsuite screen --usb [--seconds N] [--out cap.h265] [--input-test]
pcsuite screen --phone <IP> [--remote] [--seconds N] [--out cap.h265]
pcsuite clipboard --phone <IP> [--seconds N] # text + images, two-way
pcsuite verify-code --phone <IP> # SMS verification-code relay
pcsuite notify --phone <IP> # phone notifications -> PC
pcsuite info --phone <IP> # model / OS / storage capacity
pcsuite ls --phone <IP> [--type recent|image|video|audio|file|doc|home]
pcsuite pull --phone <IP> --path <phone-path> [--out <file>]
pcsuite all --phone <IP> # clipboard+verify+notify on one connectionTransports:
- USB —
adb forward+am start+POST /versionhandshake. - LAN/remote — ConnectFlow on 10191 (
connectType=2with a stored seed, or--remote/connectType=1needing no pre-shared seed).
Runs headless over USB, LAN, and remote; 60 offline unit tests; exercised against a real device.
- ✅ Crypto / framing / transport — offline unit tests (CBC "sign" KAT, GCM KAT, frame round-trips). Real on-device conformance vectors are kept locally, not in-tree.
- ✅ Screen mirror — raw HEVC frames over LAN and USB.
- ✅ Control input — mouse / scroll / keyboard over
/mirror/control. - ✅ Clipboard — two-way text and images (images via vdfs, AES-GCM 12-byte nonce).
- ✅ SMS verify-code relay.
- ✅ Phone notification relay.
- ✅ Device info — model / OS / storage capacity.
- ✅ File browse —
ls(per-category listing) +pull(download) over the mdfs gateway. - ✅ SwiftUI macOS frontend via
pcsuite-ffi(see the PcsuiteMirror app). - ⏳ Deferred — non-macOS frontends (Windows/Linux), Flutter/IPC layer.
The pairing identity (account openId, PC MAC, device name) and the per-IP pairing seeds are not hardcoded — they load at runtime, with this precedence:
- environment variables —
PCSUITE_OPEN_ID,PCSUITE_PC_MAC,PCSUITE_ACCOUNT,PCSUITE_DEVICE_NAME,PCSUITE_SEED; - a JSON file —
$PCSUITE_CONFIG, else./pcsuite.json, else$HOME/.config/pcsuite/config.json(seepcsuite.example.json); - obviously-fake placeholder defaults that will not pair with a real phone.
Copy pcsuite.example.json to pcsuite.json (git-ignored) and fill in your own
values. Get the per-IP seed from the phone's historyPhone ext.seeds.
Copyright (C) 2026 xVanTuring
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this
program. If not, see https://www.gnu.org/licenses/. The full text is in
LICENSE.