Guide for Android Emulation with arm64 translation

Kept up-to-date at Github.

Waydroid Guide

This guide takes you through the process of installing waydroid, and getting arm translation on Linux.

System details:


OS: Zorin OS 16 x86_64
Kernel: 5.11.0-41-generic
DE: GNOME
WM: Mutter
Terminal: gnome-terminal
CPU: Intel i3-7020U (4) @ 2.300GHz
GPU: Intel HD Graphics 620
Memory: 3812MiB

Pre-requisites:

  1. Follow the pre-requisites section: Ubuntu/Debian Based Install Instructions - Waydroid

  2. Download lineageOS system images archive from Google Drive: https://drive.google.com/file/d/1sXxng8ALWEK3Yjg4BVvU_Xy1NJcUdFV1/view?usp=drivesdk

  3. Create the system images directory:

sudo mkdir -p /usr/share/waydroid-extra/images
  1. Extract the contents of the archive to ~/temp_folder (Where ~ denotes the user home directory)

  2. Move the contents of the temp_folder to system images directory:

sudo mv temp_folder/* /usr/share/waydroid-extra/images
rmdir temp_folder
  1. Get the latest libgbinder updates:
sudo apt install git libglib2.0-dev libglibutil-dev
git clone --depth=1 https://github.com/mer-hybris/libgbinder
cd libgbinder
make
make install
  1. Copy the new libgbinder.so.1, libgbinder.so.1.1 and libgbinder.so.1.1.14 files added to /usr/lib to wherever your system has the current libgbinder installed. Use dpkg -L libgbinder to find out.

Install Waydroid

  1. Follow the install waydroid section : Ubuntu/Debian Based Install Instructions - Waydroid

  2. Edit sudo nano /etc/gbinder.d/anbox.conf to read like:

[Protocol]
/dev/anbox-binder = aidl3
/dev/anbox-vndbinder = aidl3
/dev/anbox-hwbinder = hidl

[ServiceManager]
/dev/anbox-binder = aidl3
/dev/anbox-vndbinder = aidl3
/dev/anbox-hwbinder = hidl

[General]
ApiLevel = 30
  1. Restart waydroid:
sudo systemctl restart waydroid-container.service
waydroid show-full-ui

Arm Translation

  1. Install lzip:
sudo apt install lzip
  1. Install Waydroid Extras Script:
git clone --depth=1 https://github.com/casualsnek/waydroid_script
cd waydroid_script
sudo python3 -m pip install -r requirements.txt
sudo python3 waydroid_extras.py -h
  1. Install Libhoudini arm Translation:
cd waydroid_script
sudo python3 waydroid_extras.py -l

You may need to umount /dev/loop12`` and waydroid session stop``` for Libhoudini to install.

  1. Restart Waydroid Container:
sudo systemctl start waydroid-container.service
  1. Launch Waydroid:
waydroid show-full-ui
3 Likes

I've tried installing libglibutil-dev, but it tells me no such file exists. But then I can't make the libgbinder without it. I've tried doing an 'apt search' for libglibutil and libglib, but found nothing with regards to libglibutil. Any suggestions?

synaptic package manager

sudo apt install synaptic

Aman9das, that is lot of commands, I have not tried it (yet). But I was wondering why should one go through such a trouble, when I can just fire up the Android X86_64 iso in Virtualbox. It gives me the almost same use of Android, with a usb attached I can also add apk files.

By the way I can also extract the iso file and with grub settings lead them to start up the Android X86_64 straight from the SSD.

By integrating it into your Linux build you can access just about any Android version without VM. This allows you to seemless access data in an android app from your desktop without hardware emulation eating resources. This would make transferring some information easier, if the app saves state to a server across devices... but usually this is done to play android games on the desktop.

If Android version is the main difference then I perhaps would use it because Android X86 is momentarily release with Android 8. But that doesn't mean that the games or apks won't run. An other alternative perhaps can be this guide for using Android on Linux;

It is a Dev build, the good people over at Waydroid are working on improving this even more.

I like this because many arm only games are playable now.

My issue with virtualization is that my computer isn't powerful enough.. This method is way more efficient, because it is using the host kernel and stuff.

Anyway, I made the guide just because this info was a bit difficult to come by, I wanted to make the procedure easy for others.

I do not have any experience with other methods and how good they are is not something I can comment on.

I am maintaining a compatibility table similar to protondb, so that people can decide themselves if the procedure is worth their effort :slight_smile:

3 Likes

Yes, 337harvey already explained why. But because of what microsoft is doing, I mean urging the user to buy new computers because of W11, this will only mean that in the future the pc(s) will be powerfull enough to run both live systems and VM or Vbox (just like my example above). But of course not every Windows user will feel the need to run Linux after purchasing W11.

I have a tried the other Android X86 OS's (almost all of them are until Android 8.0) listed on Fosshub; PhoenixOS, PrimeOS, RemixOS and Android X86 they run on my other mini pc. (a 7th gen nuc) Indeed this is because of the lower specs. My 8th gen gen. nuc is not able to run these because the drivers are not present (yet). And I run them straight form the SSD after extracting the iso.

Because only one OS can run per boot there is no stress for the hardware. And the method is same as runing a live iso from the SSD/HDD after adjusting the 40_custom file in grub.d.

I have downloaded the waydroid iso and extracted the files but can not boot it directly, because the bootfiles (vmlinuz and initrd) aren't present. So if I want to run Android 10, I will try your method.

Hey everyone, so I originally asked the question about libglibutil-dev. I saw a response about Synaptic (not sure if that was supposed to be a reply to my question or not) and I tried it, but still can't find the necessary package. Any ideas? I'd really love to try this out.

If you search waydroid on synaptic it will automatically include all dependencies.

Hello, the Google Drive link for the lineageos images isn't found. Could i use the default image instead?

I tried that, too, and nothing is showing up for the search results. I've tried searching 'waydroid' and 'Waydroid' (didn't know if it's case sensitive).

I was under the impression that it was in an apt repository. If it's in github you won't find it in synaptic. You could try searching the library in synaptic. Otherwise i would ask the devs on github to include the dependencies in a package.

Yeah the link is down, this is being maintained on github primarily.

The default image is android 10, so only x86 apps will run..

apt search libglibutil isn't showing a single package?

Try this https://computingforgeeks.com/run-android-operating-system-on-linux-using-waydroid/

Thanks, the guides work. Now i just need to test the arm64 translation.

Glad to hear! Try to run Hill Climb Racing 1, that is arm64 only..

Nope. I just ran the search again to double check. Is it in the main repository? Is it possible I'm missing a repository? (I've left everything pretty much stock)

sudo apt install waydroid

after that sudo apt update
after that apt search libglibutil