Category Archives: linux

Control linux desktop volume with Android device

BrunoVol – An Android application that allows the user to control the volume on their linux desktop/laptop, just for fun but also very useful for myself! Its still very draft and simple, feel free to use it and do as you please with it.

Android App

code: https://github.com/BrunoX/BrunoVol

apk: http://carlc.uk/brunovol.apk

The app places a persistent notification in the status bar that has 4 buttons: Volume Down, Volume Up, Mute, Settings.

The settings screen simply allows the user to enter the IP address of their linux computer. It also allows the user to deactivate the persistent notification.

Java app

code: https://github.com/BrunoX/BrunoVolServer

jar: http://carlc.uk/brunovol.jar

The java app listens on a socket waiting for instructions from the Android app. It using Runtime exec to run ‘amixer’, passing volume parameters.

Both the android app and the java app are hard-coded to use port 1025, but you can change that very easily if you compile it yourself. Its sending udp packets over the socket connection. Don’t run the java app on windows it wont work.

Here’s how to use it…

  1. download the jar file onto your linux computer (tested on mint/debien) and run it from the command line with:  java -jar /path/to/brunovol.jar
  2. download the apk file and install onto your android device (android api >16 device only)
  3. launch the android app and enter the IP address of the linux computer, click save*
  4. toggle the enabled button
  5. drag down the status bar and try the buttons, it should adjust the system volume of the linux computer.

* if you don’t enter the IP before toggling ‘enable’, and then were to click on the volume controls in the status bar, it might bug out as I didn’t handle every edge case for the time being.

I’m keen to know where it does/doesn’t function correctly so post a comment on this article telling me if it worked for you and what gear you are testing the whole thing on such as: linux distro, android version, device model and any errors or such that you may be worth mentioning. It should work on any linux computer that uses amixer (from alsa)