*ฅ^•ﻌ•^ฅ* ✨✨  HWisnu's blog  ✨✨ о ฅ^•ﻌ•^ฅ

Getting Minecraft Education working via Waydroid on X11 system [MX-Linux]

Introduction

This is a short post on how I setup Waydroid in order to be able to play Minecraft Education for my 7 yr old son. He has started his coding journey since he was 6, a full year earlier than his big sister (who is currently making a game using Godot).

Weston

Since I'm using X11, while Waydroid as it's name hinted, is meant to be run on Wayland compositor, I have to install Weston which enables me to use Wayland inside X11.

Install command: sudo apt install weston

Waydroid

Link to the docs. Install command:

curl -s https://repo.waydro.id | sudo bash
sudo apt install waydroid
sudo apt install kmod

And since the Linux distro I'm using [MX-Linux] is using sysVinit instead of the usual systemd, I had to create a symbolic link of modprobe. First check if you got modprobe using this command: ls -l /usr/bin/modprobe

If it returns something then you're good, but if it doesn't return anything / empty that means you need to make a symlink: sudo ln -s /sbin/modprobe /usr/bin/modprobe --> this command will create a symlink to /usr/bin/modprobe.

Next watch this tutorial video. Key point on minute 2:00 when he has finished installing Waydroid. Important note: some tutorial videos chose VANILLA as the Android Type, but in my first run it failed and I couldn't install anything. Hence in the second run I chose GAPPS. It will take a while to download the file.

This video also can be used as another reference.

Change Firewall rules

In order to have your Waydroid Android emulator to have internet connection, you need to change some firewall rules:

sudo ufw default allow FORWARD
sudo ufw allow 53
sudo ufw allow 67

Waydroid Script

Next we need waydroid_script to make Waydroid run ARM apps, primary tutorial for this can be found in this video with key points at minute 11:28.

Follow the instructions until you run the main.py script from waydroid_script:

Putting it all in action

  1. Run weston from your terminal, use this command:
export WAYLAND_DISPLAY=mysocket
weston --socket=$WAYLAND_DISPLAY --backend=x11-backend.so --width=1920 --height=1080

There should be a new Weston window opening up.

  1. Click the terminal icon in the Weston window and run the command: waydroid show-full-ui

LineageOS splash screen should appear in your screen..wait a while and there you go, your Android emulator working in an X11 system!

Setting up the Google account

As mentioned on this video at minute 3:20, first time you run the Android emulator there will be error message flashing "This device isn't Play Protected certified". Follow the instructions in the video to fix this error.

TLDW:

Last step: open Google Play Store and install Minecraft Education.

Note : when you're done using Waydroid, make sure to revert back the firewall rule: change sudo ufw default allow FORWARD to sudo ufw default deny FORWARD. This is to make sure you apply proper default safe firewall rule and once you put default deny your Waydroid will lose internet access.

Next time you need to use Waydroid set the sudo ufw default allow FORWARD in order to gain internet access. I know this feels like a hassle, but default secure is a requirement for me. You can also create a shell script to automate this.

Or just leave it as is if you think it's not important, I'm just putting it here so the readers can decide what they want to do.

Conclusion

Well well, it's not exactly a short post, but by following these instructions should get you to install and play Minecraft Education via Waydroid on X11 system.