AktifDesk has moved to a new repository:
Releases (Android APK + Windows exe): https://github.com/k516crypro/aktifdesk/releases/latest
This repository (clarksonjeremy909/flutter) is archived / inactive. GitHub Actions here are billing-locked and will not build. Please use the new repo for downloads, issues, and PRs.
Turn your Android phone or tablet into a low-latency game-streaming remote and controller for your Windows PC — powered by Sunshine / Moonlight.
AktifDesk is a single Flutter codebase with two roles:
| Platform | Role |
|---|---|
Windows (AktifDesk.exe) |
Host. Finds, starts and configures Sunshine, runs the AFK keep-awake engine, and connects to your phone after you type the phone's pairing code. |
Android (AktifDesk.apk) |
Client. Shows a 6-digit pairing code and waits for the PC on the LAN, pairs with Sunshine using the Moonlight/GameStream protocol, launches games, and monitors/controls AFK mode live. |
Status: v1.1.0 — early public release. The core (Sunshine management, GameStream pairing, control channel, AFK engine) is implemented and unit-tested. Some features below are on the roadmap and are clearly marked. Please read Limitations before relying on it.
- Code-only pairing — no IP addresses anywhere.
- The phone shows a 6-digit pairing code (Eşleştirme kodun). You type it on the PC (Eşleştirme kodunu gir → Eşleştir); the PC finds the phone on the LAN by itself (UDP discovery, no mDNS dependency) and connects.
- After the first pairing the PC remembers the phone (long-term random key) and reconnects automatically whenever both apps are open, even if the phone's IP changed.
- Moonlight/GameStream pairing is automatic: the phone generates the 4-digit PIN and forwards it to the PC, which submits it to Sunshine for you.
- Sunshine host management (Windows). Locates
sunshine.exe(custom path → Program Files → LocalAppData →PATH), detects theSunshineServiceservice, starts/stops it, sets Web UI credentials, and applies settings through Sunshine's REST API (or editssunshine.confsafely with a.bakbackup when the API isn't up). - Native Moonlight/GameStream client (pure Dart).
serverinfo, full PIN pairing handshake (AES-128, SHA-256, RSA-2048 signatures, MITM check), app list, launch / resume / quit. The server certificate is pinned after pairing. - Full-screen, hardware-decoded streaming via Moonlight. Once paired and launched, the video session is handed to the installed Moonlight app, which provides full-screen low-latency playback, physical keyboard + mouse passthrough (press
Won a Bluetooth/USB keyboard and your character moves), gamepad support and its own on-screen controls. - Robust AFK mode (Windows host).
- Holds
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED)so the PC and display don't sleep. - Every 2 minutes sends a harmless
SendInput(zero-distance relative mouse move and/or anF15key tap) to reset Windows/game idle timers. - Exponential back-off on errors, a "degraded" state if
SendInputis blocked (e.g. UIPI), sleep/clock-jump resilience, and a clean release on exit. - Live status (last ping, next ping, error count) on both the PC and the phone; optionally keeps the phone screen on while AFK is active.
- Holds
- Live LAN control channel with automatic reconnect and status push.
These are the target experience for AktifDesk's own in-app player. Until it ships, the equivalent functions are provided by the Moonlight app that AktifDesk hands the stream to.
- Floating side button → slide-out side menu during a session (AFK toggle, keyboard, settings, disconnect).
- FPS selector from 44 to 130 FPS in the AktifDesk UI (the protocol already sends a configurable
WxHxFPSmode; default 1080p60). - Custom, editable virtual controls — drag-and-resize layouts for WASD, a full on-screen keyboard, and mouse buttons/trackpad.
- WebRTC fallback engine — the engine abstraction and selector exist, but the media backend is a stub and is not bundled.
Windows PC Android phone / tablet
┌──────────────────────────────┐ UDP discovery :47101 ┌──────────────────────────────┐
│ AktifDesk.exe (host) │ ── query (HMAC of code) ►│ AktifDesk (client) │
│ • PcDiscovery / PhoneLink │ ◄── reply / beacon ───── │ • PhoneAdvertiser │
│ • PcControlAgent │ WebSocket → phone:47100 │ • PhoneControlServer │
│ │ ────────────────────────►│ (code / key auth) │
│ • AfkScheduler (FFI) │ │ • GameStreamClient (Dart) │
│ • SunshineHostManager ──┐ │ │ │ pair / applist / │
│ ▼ │ GameStream HTTP(S) │ │ launch │
│ Sunshine (REST :47990) ◄────┼──────────────────────────┼──────┘ │
│ │ │ │ │
│ └── RTSP/RTP video+audio, ENet input ───────────────┼─► Moonlight app (decode, │
│ │ │ full-screen, kbd/mouse) │
└──────────────────────────────┘ └──────────────────────────────┘
- Windows host manages Sunshine. AktifDesk finds and starts Sunshine, keeps its Web UI credentials, pins Sunshine's self-signed certificate on first use (loopback only), and pushes managed settings (
sunshine_name,port,upnp,encoder,origin_web_ui_allowed=pc). - Pairing & discovery (no IP entry).
- The phone hosts the control WebSocket on TCP 47100 (ephemeral port if busy), listens on UDP 47101, and broadcasts a small beacon every 2 s. It shows a one-time 6-digit code.
- When you type the code on the PC, the PC sends discovery queries to the LAN broadcast addresses (plus a unicast sweep of the local /24 as a fallback for routers that drop broadcasts), each carrying
HMAC-SHA256(code, nonce). Only the phone showing that code answers, with its port and an HMAC proof. The code itself never travels in discovery packets. - The PC then connects to
ws://<phone>:<port>/aktifdeskwith the code inX-AktifDesk-Tokenand a fresh random key inX-AktifDesk-Pair-Key. The phone verifies the code (constant-time), stores the key, and rotates the code (codes are one-time; 5 wrong attempts also rotate it). - Later the PC finds the phone by its device id and reconnects with the stored key — no code needed.
- Commands (phone → PC):
afk.set,afk.ping,status.get,sunshine.pin,sunshine.prepare; the PC pusheshello,afk.status/sunshine.statusupdates.
- Android speaks Moonlight/GameStream. The phone has its own RSA-2048 client identity and self-signed X.509 cert (stored in Android secure storage), performs the GameStream PIN pairing with Sunshine, and lists/launches apps.
- Video. The media plane (RTSP/ENet/RTP + hardware decode) is delegated to the installed Moonlight Android app via an intent (
ShortcutTrampolinewith the PC UUID and App ID). - Fallback. A
WebRtcHostEngine/WebRtcClientEnginepair is selected only if the primary engines are unavailable; in v1.1.0 the media backend is still a stub.
Code map:
| Path | What |
|---|---|
lib/core/afk/ |
AFK scheduler + Windows dart:ffi backend |
lib/core/sunshine/ |
Sunshine discovery, REST API, config file editing |
lib/core/gamestream/ |
Pure-Dart GameStream client, pairing crypto, DER/X.509 |
lib/core/control/ |
UDP discovery, pairing codes, control protocol (phone-hosted WebSocket, PC agent/links) |
lib/core/streaming/ |
Streaming engine abstraction (Sunshine/Moonlight primary, WebRTC fallback) |
lib/app/ |
Host / client controllers, secret storage |
lib/ui/ |
Flutter UI |
Grab the latest build from GitHub Releases:
AktifDesk-android.apk— Android client (universal APK: arm64-v8a, armeabi-v7a, x86_64)AktifDesk-android-arm64-v8a.apk/-armeabi-v7a.apk/-x86_64.apk— smaller per-ABI APKs (most phones:arm64-v8a)AktifDesk-windows-x64.zip— not attached yet. GitHub-hosted Actions runners on this account fail to start (jobs complete in ~1–4 s with no runner assigned), so the Windows MSVC build cannot be produced from Linux CI. Build it locally on any Windows PC with Flutter — see Building the Windows exe below — then upload the zip to the release.
The APK is currently signed with a debug key. Android will ask you to allow installation from unknown sources.
-
Install Sunshine on your PC — https://github.com/LizardByte/Sunshine/releases (installer or portable).
-
Install Moonlight on your phone (Google Play) — used for video decoding.
-
Pair the phone and the PC (both on the same Wi-Fi/LAN — no addresses to type):
- Android: open AktifDesk → AktifDesk / Hoş geldin → tap Devam et (Continue). The phone shows a big 6-digit code under Eşleştirme kodun (“your pairing code”) with Bunu PC'deki cihazına gir (“enter this on your PC”) and waits.
- Windows: run
AktifDesk.exe. On the Aktif Desk screen, type the code into Eşleştirme kodunu gir (“enter the pairing code”) and click Eşleştir (Pair). The PC finds the phone on the network and connects. - Android confirms with Şu an izinleri aldık — Telefondan PC'yi yönetebilirsin (“We have the permissions — you can manage the PC from your phone”). Tap Devam et to open the AFK and streaming controls.
From then on the PC reconnects to the phone automatically whenever both apps are open. To add another PC, use Yeni PC eşleştir in the phone's menu; to add another phone, use Yeni telefon eşleştir on the PC.
-
On the phone tap Prepare Sunshine on PC (PC'de Sunshine'ı hazırla), then Pair (automatic PIN) (Eşleştir (otomatik PIN)). Pick a game or Desktop (Masaüstü) to start streaming.
-
Firewall (private network): the PC only makes outgoing connections to the phone, so the AktifDesk control channel needs no inbound rule on the PC. If Windows asks, allow AktifDesk on private networks so it can also hear the phone's discovery beacons (UDP 47101).
- Sunshine (default base port 47989): TCP 47984, 47989, 47990, 48010 and UDP 47998–48000, 48002, 48010
Pairing troubleshooting: the phone and PC must be on the same LAN segment. Guest Wi-Fi / “AP isolation” / client isolation blocks device-to-device traffic and discovery. Keep AktifDesk open in the foreground on the phone while pairing.
If your game runs as Administrator, Windows UIPI can block
SendInput. Run AktifDesk as Administrator too (the sleep block keeps working either way; AFK status will show degraded).
Requirements: Flutter (stable, Dart ≥ 3.13), Android SDK + JDK 17 for Android, Visual Studio 2022 with Desktop development with C++ (including the C++ ATL component) for Windows.
git clone https://github.com/clarksonjeremy909/flutter.git aktifdesk
cd aktifdesk
flutter pub get
flutter analyze
flutter test # 55 tests: AFK scheduler, GameStream pairing, Sunshine, discovery + control channel, UI
flutter build apk --release # Android -> build/app/outputs/flutter-apk/app-release.apk
flutter build apk --release --split-per-abi # per-ABI APKs (app-arm64-v8a-release.apk, …)You can run the host UI on a non-Windows desktop for development with --dart-define=AKTIFDESK_HOST=true (Windows-only calls are no-ops there).
Flutter's Windows target needs the MSVC toolchain (Visual Studio). It cannot be cross-compiled on Linux (Wine / MinGW are not supported). Use a real Windows machine:
- Install Flutter stable for Windows and add it to
PATH. - Install Visual Studio 2022 (Community is fine) with workload Desktop development with C++, plus component C++ ATL for latest v143 build tools (x86 & x64).
- Clone and build (one-liner script):
git clone https://github.com/clarksonjeremy909/flutter.git aktifdesk
cd aktifdesk
powershell -ExecutionPolicy Bypass -File .\scripts\build-windows.ps1Or the same steps by hand:
flutter config --enable-windows-desktop
flutter pub get
flutter build windows --release
# Binary folder:
# build\windows\x64\runner\Release\AktifDesk.exe
Compress-Archive -Path .\build\windows\x64\runner\Release\* `
-DestinationPath .\AktifDesk-windows-x64.zip -Force- Attach the zip to the release (replace the tag if you publish a newer one):
gh release upload v1.1.0 .\AktifDesk-windows-x64.zip --repo clarksonjeremy909/flutter --clobberscripts/build-windows.cmd is a double-click wrapper around the PowerShell script.
.github/workflows/build.yml is set up for Windows + Android + Release on push / workflow_dispatch / v* tags. On this GitHub account, hosted runners currently never start (jobs fail in ~1–4 s with runner_name empty and steps=0, billable ms = 0). Until that is fixed in GitHub account/Actions settings, produce the Windows zip locally as above.
Being honest about where v1.1.0 stands:
- Windows-only code paths have not been tested on real hardware yet. The
SetThreadExecutionState/SendInputFFI calls and Sunshine service control (sc,tasklist,taskkill) are covered by unit tests with fakes. A Windows release zip is not on GitHub Releases yet (hosted Actions runners do not start on this account); build it locally — see Building the Windows exe. - Anti-cheat may block virtual input. Some games/anti-cheat systems ignore or flag
SendInputevents and virtual devices. Use at your own risk and respect each game's terms of service. - AFK is not guaranteed. Games with their own server-side or input-pattern AFK detection may still kick you; the AFK engine only resets the OS/game idle timers that react to local input.
- Video decode is handed to the installed Moonlight app. AktifDesk does not yet render the stream itself, so the in-app player features (side menu, FPS selector, editable virtual controls) are on the roadmap.
- WebRTC fallback is a stub — no media backend is bundled.
- Secrets on Windows (phone pairing keys, Sunshine Web UI password) are stored in the user profile via SharedPreferences, not encrypted. Moving them to DPAPI is a TODO. On Android they use the Keystore-backed secure storage.
- The control channel is plain
ws://on the LAN. The first connection is authenticated by the 6-digit one-time code, later ones by a 256-bit random key, but traffic is not encrypted and a 6-digit code is brute-forceable by an attacker who can sniff the LAN during pairing. Pair on a trusted network and don't expose ports 47100/47101 to the internet. TLS / a PAKE-based pairing is a TODO. - Discovery uses UDP broadcast + a /24 sweep, not mDNS; networks that isolate clients (guest Wi-Fi, AP isolation) prevent pairing.
- The phone must have AktifDesk open for the PC to connect; there is no Android background service yet.
- Release APK is debug-signed; a proper release keystore is a TODO.
- The UI is currently in Turkish; English localisation is a TODO.
Contributions and bug reports are welcome via Issues.
MIT © 2026 Miraç Aytaç
AktifDesk is an independent project and is not affiliated with the Sunshine or Moonlight projects. Sunshine is licensed under GPL-3.0 and Moonlight under GPL-3.0; they are installed separately and are not bundled with AktifDesk.