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