Waydroid is an Android container for Linux that allows you to run Android apps natively on your Linux system. In this blog post, I will explain how to install Waydroid on Manjaro Linux.

The reason I’m writing this is because I wanted to play Azur Lane on Linux. And just so you know, I’m using Manjaro with the KDE Plasma environment.

Installation

First, we need to install Waydroid via Pacman. Open a terminal and run the following command:

sudo pacman -Su waydroid

Setup

Next, follow the installation procedure and boot Android. Then, open settings and enable ADB. Get the IP address from the container.

If you use conda or virtualenv, deactivate it so that the gbinder error does not appear. Then, run the following command to extract the database from Waydroid:

sudo waydroid shell << EOF | cat > gservices.db
cat /data/data/com.google.android.gsf/databases/gservices.db
EOF

To obtain the android ID, run this command:

sqlite3 gservices.db "select * from main where name = \"android_id\";"

Take this ID and register it on https://www.google.com/android/uncertified/.

Alternatively you can use the waydroid_script to get the a GSF ID, skipping the previous two steps.

To emulate ARM architecture, install libhoudini with waydroid_script.

If we were to launch e.g. Azur Lane with this setup it would just show the first company logos and then stop at a black screen. This is a issue with the file permissions. So, fix the permissions with the following commands:

chmod 777 -R /sdcard/Android
chmod 777 -R /data/media/0/Android 
chmod 777 -R /sdcard/Android/data
chmod 777 -R /data/media/0/Android/obb 
chmod 777 -R /mnt/*/*/*/*/Android/data
chmod 777 -R /mnt/*/*/*/*/Android/obb

And that’s it! You should now have Waydroid up and running on Manjaro. If there are questions you can contact me anytime.

Have fun playing Azur Lane or any other game for that matter.

Steps Summary

  1. Install Waydroid via pacman
  2. Follow installation procedure
  3. Boot Android
  4. Enable ADB
  5. Get IP from container
  6. optional Deactivate conda / virtualenv so the gbinder error doesn’t appear
  7. Get Google Services Framework ID (two ways)
    1. run sudo waydroid shell << EOF | cat > gservices.db cat /data/data/com.google.android.gsf/databases/gservices.db EOF to extract database from waydroid
    2. run sqlite3 gservices.db \ "select * from main where name = \"android_id\";"
    • Or use (waydroid_script)[https://github.com/casualsnek/waydroid_script] for gsf id
  8. Take this id and register on https://www.google.com/android/uncertified/
  9. Use libhoudini to emulate arm (install with wydroid_script)
  10. Fix permissions:
chmod 777 -R /sdcard/Android
chmod 777 -R /data/media/0/Android 
chmod 777 -R /sdcard/Android/data
chmod 777 -R /data/media/0/Android/obb 
chmod 777 -R /mnt/*/*/*/*/Android/data
chmod 777 -R /mnt/*/*/*/*/Android/obb