How to enjoy Audirvana Studio with a GUI on Arch Linux

How to enjoy Audirvana Studio with a GUI on Arch Linux

This tutorial will guide you through setting up Waydroid on Arch Linux to run Audirvana Studio with a graphical user interface, courtesy of Audirvana Remote for Android! The test environment for this tutorial is Endeavour OS (updated) with a 1440p monitor and Firewalld disabled. I recommend you use an alternate Google account to test this, even though Waydroid may be reputable, it is best to not use a Google account that you depend upon. More about Waydroid here: https://waydro.id/

Disclaimer: As you embark on the journey of following the instructions in this wiki article, it’s important to keep in mind that some steps may prove to be challenging and the path to a working setup differs based on a constellation of potential variables. However, don’t let this discourage you! Instead, approach the process with a patient and curious mindset.

I have done my best to retrace my steps to a successful setup below. However, I’m human and miss things, so supplement my instructions with your favorite search engine, or even better your favorite large language model.

Assumptions

  • It is assumed that you have already figured out how to install Audirvana 2.8.1.3+ and have successully started it.
  • Basic Android experience
  • Basic Arch Linux administration skills
  • Basic firewalld, ufw, or iptables experience if you choose to run a local firewall (I did not for this test).
  • Basic proficiency with the Linux command line.
  • Experience with the Audirvana Remote application.

Prerequisites

  • A Linux Kernel with the bind module
  • Setting up an AUR enabled package manager (yay is one of many options) if you do not prefer manual installation of packages from the AUR.

Installing linux-zen and linux-zen-headers on Arch Linux

Waydroid, an Android container solution for Linux, requires the bind module to function properly. The bind module allows Waydroid to create bind mounts, which are essential for sharing directories between the host system and the Android container, enabling seamless integration and data access. Not to mention, Waydroid will fail to start without this module!

We need to add the bind module in Arch Linux, a simple and quick way is to install the linux-zen and linux-zen-headers packages. Here’s how to do it:

  1. Open a terminal and run the following command to install the packages:
sudo pacman -S linux-zen linux-zen-headers
  • Once the installation is complete, reboot your system to start using the new kernel:
sudo reboot

That’s it! After rebooting, your Arch Linux system, choose Linux-Zen (or similar) from your bootloader. Then you will be running the linux-zen kernel, which includes the bind module. This process is straightforward and saves you time compared to manually compiling the kernel with the module (which would be more fun actually).

Setting up the yay package manager

To install packages from the Arch User Repository (AUR), we’ll use the yay package manager. Here’s how to set it up:

bash

sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
pacman -U <resulting-yay-package>

Installing and Configuring WayDroid

Installing Waydroid

With yay installed, run the following command to install Waydroid:

yay -S waydroid --noconfirm

Initializing Waydroid with GAPPS

To initialize the GAPPS version of Waydroid’s Lineage OS, run:

sudo waydroid init -f GAPPS

Then start Waydroid:

waydroid show-full-ui

Fixing internet connectivity issues

If you experience loss of internet inside of the Waydroid container (e.g., you opened the browser and can’t navigate to google.com), apply the fix from Issues · waydroid/waydroid · GitHub

sudo sed -i~ -E 's/=.\$\(command -v (nft|ip6?tables-legacy).*/=/g' \
     /usr/lib/waydroid/data/scripts/waydroid-net.sh
sudo systemctl restart waydroid-container.service
waydroid show-full-ui

Registering your device with Google

Google is going to give you a hard time about having an uncertified device, but you can certify it with your existing Google account (or, better yet, a burner Google account.)

  1. Open Waydroid from your app menu. Once Waydroid is running, you will get an error from Google stating your device isn’t certified.
  2. Make sure Waydroid is running with GAPPS installed. Run sudo waydroid shell to enter the Waydroid shell.
  3. Inside the Waydroid shell, run this command to get the Android ID:
ANDROID_RUNTIME_ROOT=/apex/com.android.runtime ANDROID_DATA=/data ANDROID_TZDATA_ROOT=/apex/com.android.tzdata ANDROID_I18N_ROOT=/apex/com.android.i18n sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"
  • Copy the string of numbers printed by the command. This is your device’s Android ID.
  1. Go to https://www.google.com/android/uncertified in a web browser and paste in your Android ID to register the device on your Google account.
  2. Wait around 10 minutes for the Google services to reflect the change. You may need to restart Waydroid after this waiting period.
  3. The device should now show as Play Protect certified when you check in the Google Play Store app. You can now sign in and use Google apps normally.

Enabling Wi-Fi access for Audirvana Remote

After logging in with your Google account (preferably a burner account), you’ll need to make Audirvana Remote think it has Wi-Fi access. Run the following command while the Android environment is open (don’t use sudo):

waydroid prop set persist.waydroid.fake_wifi "com.audirvana.aremote"
sudo systemctl restart waydroid-container.service

Resizing Waydroid to fit your display

To resize Waydroid to better fit your display, run:

waydroid prop set persist.waydroid.width 576
waydroid prop set persist.waydroid.height 1024
sudo systemctl restart waydroid-container.service

Finally, open Waydroid again from the menu or via the command line with waydroid show-full-ui.

Result

Since we on Linux do not have the luxury of a GUI yet, running the Android version of the Audirvana Remote gives us near feature parity with Windows & Mac users!

Note: I’m demoing this on KDE Plasma 6, so pressing the “Window” key (aka “Meta”) while clicking and dragging the window allows me to move the music player around my desktop.

4 Likes

I’ve stopped using yay on Arch and gone to Aura (aura-bin, the prebuilt binary, so as not to install a bunch of Haskell dependencies). This was because the last time I installed yay a couple of weeks ago, there was a dependency conflict with pacman, the official Arch package manager. Same with a couple of other popular yay alternatives (e.g., Paru). I use ArcoLinux, which tends to update more often than many other Arch based distros. Perhaps a similar conflict wouldn’t occur on a distro that releases updates in a more measured way.

Anyway, nice job! :+1:

1 Like

Hi @HertzDonut,

Thank you for this tutorial :slight_smile:

1 Like

Hello, a new user here, at least considering the option of adopting Audirvana.
I am very pleases to see a linux version, which I am running on docker, but the missing gui is problem.
On linux, I generally solve this issue with qtscrcpy and a connected tablet, I find this to be easier even if this requires an additional device, which some people might have avaialable.
But the biggest issue for me is that the Windows version cannot currently work as a “controller” for the core installed on linux. It is always behaving as a standalone version and it causes the core to stop working if you run it.
Is this “control mode” a feasable feature to implement?

I am going to ask another “stupid” question if I may, because I want to understand the motivation: if there is a Windows version that does everything you want, why would you want to use the Linux version, which is a Core and an app to control the core?

Not stupid… but one might want to keep the library on a NAS/Linux server and then run the gui app on the windows/macos laptop, similarly to what Roon users do.

1 Like

@GioF71 , are you the same fellow who does some work on upmpdcli among other things? Welcome (and thank you for your work)!

I don’t know if I am understanding correctly, so please tell me if this would not do what you want: So far as I’m aware, Audirvana running on Windows should be able to access a music library on a network share. Is this what you want to do? Have you tried it without success?

1 Like

Ah, ok. But the Windows version (and Mac version) can use the NAS as the library of files. The database (the index) will be on the Windows PC, but if that is the only computer you use, the way of working will remain the same.

Yes that is me, thank you!

About the suggestion: yes I might use samba shares, but

a) I don’t like the idea especially because this would result in two distinct libraries (albeit with the same contents), so double the time for the scanning/updates every time.

b) most importantly with one license, you cannot run the core on linux and the gui at the same time. I would assume that control mode gui instead should be usable on windows with a core running on linux.

Hi @jmtennapel

Couldn’t the Audirvana database be located on the NAS. Just a simple matter of pointing Studio/Origin to the correct location on the NAS?

Yes, but they cannot work at the same time. One must logout afaik. And this is slower and redundant, as there would be two libraries.

Isn’t that equivalent to a “control point” mode for the windows/macos gui?

It depends if you want to use another device as well, or other people in the household want to play music from that same Audirvana instance.

Hello, of course I am not questioning how people want to use Audirvana. The one you outline looks like a perfectly normal use case, but some want to separate the device which hosts library from the device that acts as a controller application and even from the device that hosts the player.
Creating a NAS/Linux version of Audirvana looks like a move towards this direction to me.
So unless I am wrong with this assumption, a “control point” application for Windows/MacOS would be highly desirable for the adopters of these variants.
Of course a linux version of such app would be the icing on the cake, but I understand that this is unlikely to happen.

And of course a web interface for the core would be even better.

If you are running Audirvana with GUi on Windows, why would you need to run the Linux core version also? No need for two Audirvana applications at once and two libraries.

But let’s say you prefer the Linux core version. An idea I have had is to try to use a VPN (I have Tailscale installed, but of course another can be used) to send the result of Audirvana’s processing to another computer, for example a remote laptop. But unfortunately that still leaves you with the remote app rather than the full Audirvana GUI you want.

So it seems as if, unless the Linux core version is developed into a desktop, if you want the desktop GUI you will have to do it on a Win or Mac machine.

The remote interface is somewhat equivalent to that, though admittedly a web interface might allow easier user modification.

Well maybe the Windows computer might be a laptop, with limited storage.

Also, considering that Audirvana can play to upnp devices already (so, to a computer other than the one that runs the application), the idea is to go a “little” further and allow the desktop app to cooperate with the linux/nas which would contain the files and execute all the heavy operations (like e.g. upsampling etc).

Hello, that is not needed. Most likely companies don’t even like to build gui apps on linux for reasons we can skip in this thread.
Let’s put it in other words. We have an Android app, but that is not the Audirvana app, it is just a “Remote”. I’m saying that a “Remote app” running on MacOS/Windows would be desirable. Even better if it’s the same desktop app running in different modes, exactly like Roon on Windows/Mac does. If there is a Roon Server running, the Roon Desktop app just connects to that server.

It does seem as if a reasonably configurable web interface might be the easiest way to get to where you want, rather than developing an entirely new application. Whether that is something Damien would be willing to entertain I don’t know.

1 Like