How to run Android app on NixOS?

I recently obtained an eero wifi router, and the only way to administer it is through the “eero wifi system” app. Unfortunately, my iphone is too old to install their app, so I’m looking into how I might run the Android version of the app on NixOS.

I’ve read about a few options so far, and since none of them sound entirely straightforward, I thought I’d ask here before diving down any rabbit holes.

The first option is to use Waydroid, but since I’m currently running X11 rather than Wayland, I’d need to either set up a Wayland session (new to me) or figure out how to use something like cage to run a nested Wayland session (even more new to me).

Another option is to use Anbox, but it sounds like that’s no longer maintained, not trivial to set up, and may not even work at this point.

The third option is to run a full emulator using Android Studio. I found myself out of my depth last time I attempted that, though it was a few years ago and things may have changed since then.

If none of these are feasible, I may look to purchase a cheap Android device just for administering the eero router, but I’d prefer to figure out something on NixOS if possible.

I mean, if you just need to open the app to do a bit of administration once in a while, it is trivial to enable a GNOME or KDE desktop session where you can get an easy-to-use batteries included Wayland environment. From there, Waydroid is not difficult to set up.

For reference, I’m on Hyprland (a Wayland compositor), and I set up Waydroid in an afternoon to run a few android apps with no issues.

If it’s going to be a regular thing then you may want to look into setting up some sort of nested wayland compositor (like cage, as you mentioned). I have no experience with these so I have no idea if they would work with Waydroid. But if you don’t mind the additional storage cost I don’t think there’s much downside to just keeping a Wayland session around.

I had a kwin nested session in the past before I switched to wayland, it worked.

Which WM are you using?

it is trivial to enable a GNOME or KDE desktop session

That’s a really good point, and yeah, I don’t imagine I’ll need to administer the eero very frequently.

Which WM are you using?

I’m using xmonad.

Oh okay, was just curious in case there was an easy-to-migrate-to wayland equivalent.
Since there’s not one for xmonad, the best option would be enable a greeter and gnome/kde (or even something like sway for a more lightweight experience which pulls in far less dependencies).

… the best option would be enable a greeter and gnome/kde (or even something like sway for a more lightweight experience which pulls in far less dependencies).

Yeah, that makes sense. I’ve actually been curious to try Hyprland as well.

I spent a bunch of time learning about display-managers, sessions, and PAM configuration, in order to replace lightdm with greetd and have the option to log into either a Wayland session or an X11 session.

(I realize there are easier ways I could have gone about spinning up a Wayland session. I guess I wanted to learn this stuff anyway.)

Finally, I got Waydroid up and running, then logged into the Google Play Store, only to discover that eero app doesn’t support installation on an emulator. Oh well, it was worth the learning experience.

I ended up buying a refurbished Android phone off ebay, and that’s worked fine for my simple use-case.

1 Like