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

5 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 or over Bluetooth, so the phone needs no static IP and no cable.

Connected over Wi-Fi Playing audio over Bluetooth Pairing a phone
Duet for Windows connected to a phone over Wi-Fi, showing the stream buttons, phone actions and mirrored notifications Duet for Windows connected over Bluetooth and playing the phone's audio Duet for Windows listing one phone found on Wi-Fi and one over Bluetooth, each with a Pair button
Feature What it does
Phone audio Plays the phone's sound on the PC while the phone itself stays silent: uncompressed over Wi-Fi or USB, or as ordinary Bluetooth audio with nothing to set up
Screen mirroring Shows the phone in a window you control with mouse and keyboard, with sound, over Wi-Fi or a USB cable
Found by name The PC finds the phone and shows its name, model and battery, and the two reconnect by themselves after a one-time pairing
Wi-Fi or Bluetooth Uses Wi-Fi when both are on the same network and falls back to Bluetooth when they are not, or sticks to the one you choose
Disconnect anytime Disconnect from the PC or the phone; Duet stays disconnected 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 goes out of reach

Wi-Fi or Bluetooth

Over Wi-Fi Over Bluetooth
Needs Both on the same network The phone paired with the PC in Windows Bluetooth settings
Notifications, clipboard, ring, battery Yes Yes
Files Fast Slow; fine for photos and documents
Audio Uncompressed, after a one-time setup with Developer options Bluetooth audio, no setup, compressed
Screen mirroring Yes, after the same one-time setup No; plug in a USB cable to mirror

A phone you paired over one works over the other; there is nothing to pair twice in Duet.

Requirements

  • Windows 10 or 11, 64-bit. .NET Framework 4.8 is built in. Bluetooth audio needs Windows 10 version 2004 or later.
  • Android 8 or later. Audio and screen over Wi-Fi need Android 11 or later with Developer options.
  • Either both on the same Wi-Fi network, or Bluetooth on both and the phone paired with the PC.

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 Nearby devices, so your PC can find the phone on Wi-Fi and connect over Bluetooth.
  2. Allow notifications. Duet uses them for its connection status, pairing requests and received files.
  3. Set battery use to unrestricted, so Duet stays reachable while the screen is off. On Samsung this is Settings › Apps › Duet › Battery › Unrestricted.
  4. 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 nearby. Phones on the same Wi-Fi appear by themselves; a phone you paired with this PC in Windows Bluetooth settings appears over Bluetooth.
  2. Choose Pair. Both screens show the same six-digit code; tap Pair on the phone.

That is all Bluetooth needs: audio plays as Bluetooth audio straight away.

For uncompressed audio and screen mirroring over Wi-Fi, choose Set up streaming on the PC once. Duet streams through Android's wireless debugging, 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. With a USB cable and USB debugging allowed, Duet streams through the cable and needs no setup at all.

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, how it is connected, 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.

While audio plays over Bluetooth, the PC is the phone's Bluetooth speaker: the phone's media volume controls it, and it takes the sound from earbuds connected to the phone.

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
Connect over Auto (Auto, Wi-Fi, Bluetooth)
Screen quality 16 Mbps (8, 16, 24)
Frame rate Phone max (60, 120, Phone max)
Resolution Full (Full, 1920, 1280)
Turn the phone screen off while mirroring On
Play audio over Wi-Fi or USB (Wi-Fi or USB, Bluetooth)
Audio delay 100 ms (50, 100, 200), for audio over Wi-Fi or USB

How it works

  • On Wi-Fi the PC broadcasts a discovery request on UDP port 47820; the phone answers with its name and the port of its TLS server (47821). Over Bluetooth the PC asks the phones Windows has paired the same question on Duet's Bluetooth service.
  • Pairing shows a code derived from the phone's certificate and from random numbers both sides commit to in advance, so nobody else in range can step in. The phone then gives the PC a token, and the PC pins the phone's certificate. Both transports carry the same TLS session.
  • Audio and screen over Wi-Fi or USB are streamed by a bundled scrcpy 5.0.1 through adb, with uncompressed audio.
  • Audio over Bluetooth uses the Bluetooth audio built into Windows and Android: the PC acts as a speaker for the phone.
  • docs/protocol.md describes every message.

Privacy

Everything stays between your phone and your PC; neither app talks to any server. Sessions and file transfers are encrypted with TLS on both Wi-Fi and Bluetooth.

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 and a Windows 10 or 11 SDK. -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