Controlle.rs lets you use your Android phone as a PlayStation 5 controller for your Linux desktop. The app sends input over WiFi via UDP, and a Rust server on your desktop creates a virtual gamepad.
- A Linux system with
uinputsupport (most distros have this by default). - Rust installed (use
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shif you don’t have it). - Access to
/dev/uinput(see below).
To allow the server to create a virtual controller, you need access to /dev/uinput:
# Add your user to the input group
sudo usermod -aG input $USER
# Apply the group change (log out and back in, or run this):
newgrp input# Build the server
cd controllers
cargo build --release
# Run the server
./target/release/controllersTo verify, check for the virtual controller:
cat /proc/bus/input/devices | grep -A 5 "PlayStation"The APK is located at:
android/app/build/outputs/apk/release/controllers-release.apk
# Install via ADB (requires USB debugging enabled on your phone)
adb install android/app/build/outputs/apk/release/controllers-release.apkOr transfer the APK to your phone manually and install it. You may need to enable "Install from unknown sources" in your phone settings.
- Find your desktop’s IP address:
ip addr show | grep 'inet ' | grep -v 127.0.0.1
- Open the app on your phone.
- Enter your desktop’s IP address and leave the port as
42069(unless you changed it). - Tap Connect. The status indicator will turn green when connected.
If you see "Permission denied," ensure you’ve added your user to the input group:
sudo usermod -aG input $USER
newgrp inputOr run the server with sudo (not recommended long-term):
sudo ./target/release/controllers- Ensure both devices are on the same WiFi network.
- Double-check the IP address and port.
- Check your firewall settings:
sudo ufw allow 42069/udp
- Use a 5GHz WiFi network.
- Reduce the distance between devices.
- Close bandwidth-heavy apps on your network.
If you need to rebuild the APK:
# Build the Rust JNI library for Android
cd controllers-core
cargo ndk -t arm64-v8a -o ../android/app/src/main/jniLibs build --release
# Build the APK
cd ../android
./gradlew assembleReleaseThe APK will be at:
android/app/build/outputs/apk/release/controllers-release.apk