Skip to content
Project-GraphitePublic

About

Your Android phone's audio, screen, notifications and files on your Windows PC

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Duet

Duet puts your Android phone on your Windows PC: its audio, its screen, its notifications and its files. It is two small apps, Duet for Windows (a tray app) and Duet for Android, that find each other by name on your Wi-Fi, so the phone needs no static IP.

Feature What it does
Phone audio Plays the phone's sound on the PC, uncompressed, while the phone itself stays silent
Screen mirroring Shows the phone in a window you control with mouse and keyboard, with sound
Found by name The PC finds the phone on the network and shows its name, model and battery, and the two reconnect by themselves after a one-time pairing
Disconnect anytime Disconnect from the PC or the phone; Duet stays off until you press Connect on either side
Notifications Phone notifications appear as Windows notifications and in the Duet window
Files Share files from the phone to the PC (Downloads\Duet), or drop files on the Duet window to send them to the phone (Downloads/Duet)
Clipboard Send text from the phone's share sheet or the app to the PC clipboard, and the PC clipboard to the phone
Ring phone Rings the phone at alarm volume until you stop it on either side
Phone-side control Start or stop PC audio from the app, a quick-settings tile or the streaming notification
Auto stop Streaming stops when the PC locks or sleeps (optional) and when the phone leaves the network

Requirements

  • Windows 10 or 11, 64-bit. .NET Framework 4.8 is built in.
  • Android 8 or later. Streaming audio and screen needs Android 11 or later with Developer options.
  • Both on the same Wi-Fi network.

Install

Windows: download Duet-Setup-x.y.z.exe from the latest release and run it. It installs for your account into %LOCALAPPDATA%\Programs\Duet, adds a Start menu entry, and can start Duet when you sign in. The setup is not code-signed, so SmartScreen may ask you to confirm.

Android: open the same release on the phone, download Duet-x.y.z.apk and install it (allow installs from your browser when asked). Open Duet and work through its checklist:

  1. Allow notifications, so Duet can keep its connection alive in the background.
  2. Set battery use to unrestricted. On Samsung this is Settings › Apps › Duet › Battery › Unrestricted.
  3. Allow notification access if you want phone notifications on the PC.

Duet is not on Google Play yet. Because it uses notification access, Google Play Protect blocks installing it from a browser in some regions.

First connection

  1. Open Duet on the PC and on the phone. The PC lists the phone under Phones on this network.
  2. Choose Pair. Both screens show the same six-digit code; tap Pair on the phone.
  3. Choose Set up streaming on the PC. Duet streams through Android's wireless debugging for the lowest delay and full quality, and the setup view ticks off each step as you do it on the phone: turn on Developer options (Samsung: Settings › About phone › Software information, tap Build number seven times), turn on Developer options › Wireless debugging, tap Pair device with pairing code, and type the six-digit code into Duet.

Setup is needed once per PC. Duet then gives its phone app permission to switch wireless debugging back on by itself, so streaming starts with one click from then on. If the phone already accepts adb on port 5555 (adb tcpip 5555), Duet uses that and setup takes one click.

During setup, Windows may ask whether adb.exe may use the network. Allow it on private networks.

Using it

  • PC window: opens from the tray icon. Shows the phone, its battery, Disconnect or Connect, the Audio and Screen buttons, Ring, Send clipboard, Send files, and the last 30 notifications. Drop files on it to send them to the phone.
  • Tray menu: the same actions without opening the window. The icon gets a green dot while streaming.
  • Phone app: connection status, Play audio, Mirror screen, Stop streaming, Send clipboard to PC, and Disconnect or Connect. The Duet notification has Disconnect or Connect too.
  • Quick-settings tile: add PC audio to the phone's quick settings to start and stop audio in one tap.
  • Share sheet: choose Send to PC from any app to send files or text.

Settings (PC)

Setting Default
Start Duet when I sign in Chosen at install
Stop streaming when this PC locks or sleeps On
Show phone notifications On
Screen quality 16 Mbps (8, 16, 24)
Frame rate 60 (30, 60, 120)
Resolution Full (full, 1920, 1280)
Turn the phone screen off while mirroring On
Audio-only buffer 200 ms (100, 200, 300)

How it works

  • The PC broadcasts a discovery request on UDP port 47820; the phone answers with its name and the port of its TLS server (47821).
  • Pairing shows a code derived from the phone's certificate on both screens, so nobody else on the network can step in. The phone then gives the PC a token, and the PC pins the phone's certificate.
  • Audio and screen are streamed by a bundled scrcpy 5.0.1 through wireless debugging, with uncompressed audio.
  • docs/protocol.md describes every message.

Privacy

Everything stays on your local network; neither app talks to any server. Sessions and file transfers are encrypted with TLS.

Place Contents
%LOCALAPPDATA%\Programs\Duet Duet.exe and engine\ (scrcpy and adb)
%LOCALAPPDATA%\Duet settings.json, trust.json (the paired phone and its token, encrypted with Windows DPAPI), logs\
Downloads\Duet Files received from the phone
Startup folder, Duet.lnk Only while Start Duet when I sign in is on
Phone app storage The paired PCs (token hashes only), settings and the TLS key in Android Keystore

Build

  • Windows: windows\build.ps1 builds windows\bin (Duet.exe and the pinned scrcpy release in engine\). It needs Visual Studio Build Tools with the MSBuild component. -Setup also builds dist\Duet-Setup-X.Y.Z.exe with Inno Setup 6.
  • Android: android\gradlew.bat assembleDebug, with JDK 17 or later and the Android SDK.
  • Pushing a vX.Y.Z tag builds both and publishes a release with Duet-Setup-X.Y.Z.exe and Duet-X.Y.Z.apk.

Uninstall

  • Windows: Settings › Apps › Installed apps › Duet › Uninstall. Your pairing and settings stay in %LOCALAPPDATA%\Duet; delete that folder to remove them.
  • Android: uninstall Duet like any app.

Licence

MIT. Duet for Windows ships scrcpy and its components under their own licences; see NOTICE.

About

Your Android phone's audio, screen, notifications and files on your Windows PC

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages