Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.42 KB

README.md

File metadata and controls

32 lines (23 loc) · 1.42 KB

GyroMouse

GyroMouse is an open-source app that enables one to use an Android device as a mouse on Linux, intended for VR-like control such as Google Cardboard.

The implementation consists of two components:

  • An Android app that sends current gyroscope readings over the network via UDP.
  • A receiver on the Linux side that creates a virtual input device via uinput and translates the gyroscope data into mouse movement events.

Usage

  1. Build and install the Android app in sender/ directory: sbt install.
  2. Build the receiver in receiver/ directory: cabal build.
  3. Make sure you have read/write access to /dev/uinput, using udev rules:
    # cat > /etc/udev/rules.d/70-uinput.rules << EOF
    KERNEL=="uinput", OWNER="$your_username_here"
    EOF
    # udevadm control --reload-rules
    # modprobe uinput
  1. Run the receiver (specify the address and port to listen): cabal run $ip $port.
  2. Open the app on Android and enter the IP address and port the receiver is listening on.
  3. Tap "Enable" and rotating the device should also move the mouse on the receiver side.

Notes

There is no support for authentication and encryption of the transmitted data, so it is essentially allowing remote control and sniffing of movement data of your mouse. It's highly recommended you run this in a secure private network, via a ssh-tunnel, or via Android USB tethering.

License

GPLv3