Skip to content

Repository files navigation

🎮 Virtual Gamepad

Turn your phone into a real wireless Xbox controller for your PC — free, open source, no accounts, no ads.

Latest Release License: MIT Made with Flutter Made with .NET GitHub Sponsors

Created by kaifcoding · © 2026 Atomprod. Free forever, MIT licensed — see Credits & License below.


What is this?

Virtual Gamepad is a two-part open source project:

📱 Android app (Flutter) On-screen dual analog sticks, D-pad, ABXY face buttons, shoulder buttons, and analog triggers. Auto-discovers your PC over WiFi.
🖥️ Windows host app (C#) Creates a genuine virtual Xbox 360 controller via ViGEmBus, so it works in any game or app that supports a normal controller — zero per-game setup.

No subscriptions, no in-app purchases, no telemetry, no accounts. Just download and play.

How it works

📱 Phone (Flutter app)  --UDP over WiFi-->  🖥️ PC (Windows host)  --ViGEmBus-->  🎮 Virtual Xbox 360 controller

The wire format is fully documented in PROTOCOL.md if you're curious how it works under the hood.

✨ Features

  • Dual analog sticks with full-range 16-bit precision
  • Analog L2/R2 triggers (pressure slider, not just on/off)
  • Full D-pad, ABXY, shoulder buttons, Start/Back
  • Auto-discovery of PCs on your WiFi network — tap and play
  • Manual IP entry fallback for tricky networks
  • Multiple phones can connect at once, each gets its own virtual controller
  • Keeps your phone screen locked to the right orientation while playing

⬇️ Download

Go to the Releases page →

Every release has both apps attached, ready to run — no build tools, no SDKs, no cloning anything:

File What it is
VirtualGamepad.apk The Android app. Copy to your phone and tap to install.
VirtualGamepadHost-Setup.exe The Windows installer — Start Menu + Desktop icons, uninstaller included.

📲 Install on your phone

Download VirtualGamepad.apk from the release page directly on your phone (or copy it over), then tap it to install. Android will ask permission to install from this source the first time — that's expected for any app outside the Play Store — allow it, then install.

🖥️ Set up your PC

  1. Install ViGEmBus once — this is the driver that makes Windows see your phone as a real controller. Reboot if prompted.
  2. Run VirtualGamepadHost-Setup.exe and follow the wizard (tick "Create a desktop icon" if you want one — it's on by default). No admin rights needed; it installs to your user profile.
  3. Windows SmartScreen will likely warn you the first time — "Windows protected your PC." This is expected for any free/unsigned app (code-signing certificates cost money this project doesn't spend). Click "More info" → "Run anyway."
  4. Launch Virtual Gamepad Host from the Start Menu or the desktop icon. The window shows your PC's IP address(es) — that's what you'll enter (or auto-discover) from the phone. Click "Show connection log" to see live connection activity.
  5. Allow the app through Windows Firewall when prompted (check all network types — Domain, Private, and Public). If the prompt never appears, run windows-app/open-firewall-port.ps1 as Administrator to open the port manually.

🔗 Connect

  1. Make sure your phone and PC are on the same WiFi network.
  2. Open the app — it searches automatically and lists your PC by name.
  3. Tap it to connect. If nothing shows up after a few seconds (see Troubleshooting), type the IP shown in the PC's window instead.

🩺 Troubleshooting

The Windows app seems to not open at all Almost always Windows SmartScreen silently blocking it (see step 3 above) — look for a blue "Windows protected your PC" dialog, possibly behind other windows, and click "More info → Run anyway." If you truly see nothing, try running it from a terminal (open PowerShell in the install folder and run .\VirtualGamepadHost.exe) so any startup error has a chance to print.

"Failed to create virtual controller" on the PC Install ViGEmBus, then restart the host app.

Auto-discovery doesn't find the PC This is the most common issue and it's almost always the network, not the apps:

  • Confirm phone and PC are on the exact same WiFi network (not phone hotspot + PC on ethernet from a different router, not a guest network for one and main for the other).
  • Many routers — especially mesh systems (eero, Google Nest WiFi), guest networks, and public/hotel WiFi — enable "AP isolation" / "client isolation," which blocks device-to-device traffic on purpose for security. This is a router setting, not something the apps can bypass. Check your router's admin settings, or connect both devices to a different network without isolation.
  • Confirm Windows Firewall allowed VirtualGamepadHost.exe on all profiles — rerun open-firewall-port.ps1 as Administrator to be sure.
  • Watch the PC app's log (click "Show connection log") while the phone searches — if you never see Discovery request from ... lines appear, the broadcast traffic isn't reaching the PC at all.
  • Manual IP entry always works even when auto-discovery can't — type the IP shown in the PC app into the phone app.

"No response" after entering an IP manually

  • Double check the IP — it changes if you reconnect to WiFi or restart the PC.
  • Confirm the Virtual Gamepad Host window is actually running.
  • Port 47998/UDP needs to be reachable — see the firewall steps above.

Input feels laggy This runs over UDP on WiFi, so it depends on your router and network congestion. A 5GHz network with fewer connected devices helps a lot.

🗺️ Roadmap

  • WiFi transport (UDP), full Xbox 360 button/axis mapping
  • Auto-discovery of PCs on the local network
  • Multiple phones connecting simultaneously
  • Windows host with a proper branded GUI window (not just a console)
  • Windows installer with Start Menu + Desktop shortcuts and uninstaller
  • Custom app icon (Android + Windows), custom app ID (in.atomprod.vgamepad)
  • Portrait-locked menus, landscape-locked gamepad screen
  • One-click downloads via GitHub Releases
  • Bluetooth transport (fallback when there's no shared WiFi network)
  • Customizable button layout / remapping in-app
  • Rumble/vibration feedback from PC back to phone
  • Windows tray icon (minimize-to-tray)
  • iOS build (Flutter already supports it; needs a paid Apple developer account for signing)

🧑‍💻 Building from source (optional, for contributors)

You don't need any of this to just use the apps — see Download above. This is only for people who want to modify the code.

Android app — needs the Flutter SDK:

cd android-app
flutter create --platforms=android --org in.atomprod .
cp manifest-overrides/AndroidManifest.xml android/app/src/main/AndroidManifest.xml
flutter pub get
dart run flutter_launcher_icons
flutter run              # with a device/emulator connected

Windows app — needs the .NET 8 SDK:

cd windows-app
dotnet run

Cutting a new release (maintainers): push a version tag and the Release GitHub Actions workflow builds both apps and attaches them to a new GitHub Release automatically:

git tag v1.0.1
git push origin v1.0.1

🤝 Contributing

Issues and pull requests welcome. It's all MIT licensed — use it, fork it, remix it, sell it, whatever helps you.

💜 Support this project

If Virtual Gamepad saved you the cost of a real controller, consider sponsoring the maintainer on GitHub Sponsors:

GitHub Sponsors

(Points at github.com/sponsors/kaifcoding — this only works once that account is enrolled in GitHub Sponsors; set that up first if it isn't already.) It's entirely optional and doesn't unlock anything — every feature stays free for everyone either way.

🙌 Credits

Created with ❤️ by kaifcoding · © 2026 Atomprod. See NOTICE for attribution terms if you fork or redistribute this project.

📄 License

MIT — free for anyone to use, modify, and redistribute, including commercially.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages