Skip to content
/ gyromouse Public

Using Android's gyroscope as a mouse on Linux

Notifications You must be signed in to change notification settings

PkmX/gyromouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Using Android's gyroscope as a mouse on Linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published