Android apps running on the uConsole CM4 via Waydroid

I was asking @Rex on Discord about his projects porting different operating systems to the uConsole, and was curious if LineageOS or Waydroid would be possible. Next thing I knew, he shared a video of Angry Birds running on his DevTerm.

Turns out, Waydroid already works with the kernel in his recent build of Debian Bookworm if you add psi=1 to the end of cmdline.txt. Of course I had to try it out for myself.

All you need to do is:

  1. Add psi=1 to cmdline.txt and reboot.
  2. Install prereqs: sudo apt install curl ca-certificates -y
  3. Add the repo: curl https://repo.waydro.id | sudo bash
  4. Install Waydroid: sudo apt install waydroid -y
  5. Install the LineageOS image with Google Services: sudo waydroid init -s GAPPS
  6. Certify the virtualized Android device with Google.
  7. Adjust the view port for the uConsole screen. waydroid prop set persist.waydroid.width 1280 and waydroid prop set persist.waydroid.height 720
  8. Run Waydroid.

Edit: If you would like to have uConsole’s full gamepad detected by Waydroid:

  1. With Waydroid running, have the container look for hardware events by entering the following commands in the host system’s terminal: waydroid prop set persist.waydroid.uevent true and waydroid prop set persist.waydroid.udev true
  2. Find the event tag associated with a device called “ClockworkPi uConsole” using the command cat /proc/bus/input/devices. On my device it is event7.
  3. Simulate plugging the device in by triggering that event: sudo sh -c 'echo add > /sys/class/input/event7/uevent'
  4. The face buttons along with Start and Select should now be detected by Waydroid.

You can repeat step 3 to detect the face buttons as needed or create a script to trigger the event.

8 Likes

Haven’t thoroughly tested everything but performance seems good! Discord runs well, and I was curious if gentle 3D games like Crossy Road would struggle on the hardware but it seems to play decently. Needless to say this opens up a lot of new possibilities on the uConsole.

Haven’t tried running apps in a window yet instead of running a virtual Android interface but it should work.

5 Likes

Given the similar hardware, I’m guessing this might work on a CM4 DevTerm as well? Won’t have time for a while to check it out, but I was already excited to try Rex’s builds. This just makes me even more impatient and wanting of free time to do it. :slight_smile:

Hopefully the weird resolution of the DevTerm won’t be an issue, though I guess it would work best with an external monitor.

Yep. Rex shared screenshots of it working on his DevTerm.

turn your sound down or off I forgot to disable the audio and had everything plugged up to my amp for a rf stream.

1 Like

Is this a polybar? Would you mind sharing the configuration file of the bar?

It’s Waybar and I’ll get around to sharing the dotfiles at some point.

1 Like

Reporting from an Arch setup: Envy caught up with me, and I managed to shoehorn Waydroid into my uConsole as well. For some reason I’m afraid I can’t use my Bluetooth now, so I’ll have to figure out what’s wrong.

UPDATE: It’s nothing to do with fudging around with Waydroid. I overloaded my uConsole with connected peripherals, and somehow that borked my Bluetooth. Nothing a simple reboot can’t fix.


Has anyone encountered the same problem? Running mode droid always keeps a black screen…

waydroid prop set persist.waydroid.multi_windows true

add that then restart waydriod.

1 Like

Wow, thank you very much, it can start normally.

Has anybody tested streaming services over Waydroid? I’m thinking of loading Spotify, Netflix, and the like.

And really, no other Arch user wants to know how I pulled it off? Regardless, as a service to the community, I’ll soon share how I managed to install and run Waydroid.

I can confirm that YouTube works. I’ll give Netflix and Apple Music (which surprisingly has an Android app) a try.

Oh yeah. I forgot to mention you’re right about that. I tested YouTube for myself as well, through a privacy-friendly alternative. Video plays wonderfully, where all Linux native apps struggle to. Perhaps it’s just my install.

If you set your CPU governor to performance and use the H264ify extension, it should help. The CM4 doesn’t have the beefiest CPU for software video codecs, so it’s going to be happier if it can use its hardware decoding.

1 Like

Have tried Waydroid on my uConsole as well after upgraded to kernel 6.6.30 from @Rex and switched to Wayland session. It works at most, the only thing that I currently see is that Waydroid window is not full screen, it is kind of moved up or has incorrect size, even though I set 1280x720 size in properties. I see the part of Linux taskbar. How to fix that…

In Sway, I run the window in full screen with Super + F. Does your DE have a method to fullscreen content?

Oh, you are using Sway, now it is clear. In my case I am in LXDE-pi Wayfire session.

Does F11 work? 20 characters.

When I press F11 I see that window slightly moves and that’s it, so it does not open full-screen.
I am thinking about changing screen size for Waydroid. For sure it will not be full-screen, but at least in the middle of the desktop or something.