WayDroid on SFOS?

I have currently the same problem and no way to solve it. Maybe if we could get rid of the HALIUM 12, and chose another version:

1 Like

Edit
/usr/lib/waydroid/tools/actions/initializer.py

Change 19 to 20 to get Android 11 instead of 12.

4 Likes

Thanks, that did the trick to perform waydroid init successfully.

And again, I am now stuck at the usual problem, which combination in anbox-mainline.conf is correct. I only get

[FullUI] [20:21:35] Failed to get service waydroidplatform, trying again…

And although I have this on my PT2 in the beginnig, at some point waydroid starts up and works.

1 Like

Update here, with the trick from Ahtisilli (WayDroid on SFOS? - #264 by Ahtisilli) it worked to load Waydroid with Android 11 image and I was able to continue. So now
> waydroid init
is working fine and it seems a session to be started. dnsmasq disabling is also successfull. anbox-mainline.conf was already containing aidl3, so no changes there. Afterwards I performed a reboot.

Waydroid can be initialised via terminal, but the Application installed from SailfishOS:chum is still being closed after 5 sec. Also I cannot access the installed apk packages. Is this the same issue Contra gets? I do not get any errormessage.

The problem is that android 12 (current base of the port) and waydroid with a halium 11 image are not compatible. There is a solution, I will check in the next days, if its possible.

Just a note, I got waydroid Halium 12 running on my rephone with SFOS 5. And aurora store including some apps … will test and provide a how-to :slight_smile:

4 Likes

@contra This is awesome news! Looking forward to your details and testing them myself.

Btw one update from my side looking at the logs from waydroid I got the same outcome:

...
[23:28:56] Failed to add service waydroidhardware: -2147483647
[23:28:56] Failed to add service waydroidhardware: -2147483647
[23:28:57] Failed to get service waydroidplatform, trying again...
[23:28:58] Failed to get service waydroidplatform, trying again...
[23:29:33] Already initialized
...

Ok, try the following:

  1. Uninstall waydroid-gbinder-config-mainline, neither hybris nor mainline is need
  2. If not yet done, perform (I know, you did it, but for the others)

devel-su waydroid init

to get the directory structure. The images will most likely not work
4. Test

waydroid show-full-ui

in the console, maybe twice. I had done this after I updated the images, so I can not test, what happens with old images.

  1. Get the Halium 12 images
images_url=https://sourceforge.net/projects/aleasto-lineageos/files/LineageOS%2020/waydroid_arm64
wget $images_url/system.img/download -O /home/waydroid/images/system.img
wget $images_url/vendor.img/download -O /home/waydroid/images/vendor.img
  1. Perform

devel-su waydroid init

It might stop and restart the container or return nothing. Both happend, took a couple of minutes.
8. Run

waydroid show-full-ui

Maybe even twice. And wait a bit. Lineage should boot up.
Even with the newer images, waydroid-runner doesn’t work, so no chance to start it from UI right now. However, waydroid might get started in the background, without access to the UI …

If there is a waydroid session running, e.g. after using waydroid-runner you can try

devel-su waydroid session stop

or use settings > waydroid and toggle the start button, this stops the session :slight_smile:

after that

waydroid show-full-ui

should work again.

Good Luck

Sources: Setup (and usage) is non-trivial under Halium 12+ (#24) · Issues · UBports / Development / Core / Packaging / waydroid · GitLab
and Sailfish OS Porter channel on telegram, thanks to deathmist

What is working:
Banking with DKB and Diba for example :slight_smile:

What is still not working:
GPS after waydroid was started once …

3 Likes

Hey @contra thanks a lot for that how-to!

Today I had some time to test it, even though I was not fully successful yet. Why? So the first time

waydroid show-full-ui

gave this output and finished after like 5min

[21:51:07] Starting waydroid session
[21:51:08] Skipping clipboard manager service because of missing pyclip package

After exchanging the image.img and the vendor.img I ran it a second time like in step 7 and it didnt finish even after 30min. The other day I will have a look at the log.

By the way, what did you mean with

However, waydroid might get started in the background, without access to the UI …

How is it possible to use then the Banking apps for example?

One additional annotation: For step 6 I used curl with -L -0 option instead of wget (in case someone else tries it).

Ok this is the log from my unsuccessful try:
`
[defaultuser@Phone22 ~]$ waydroid log
(004337) [21:51:08] % chmod 777 -R /dev/fb0
(004337) [21:51:08] % chmod 777 -R /dev/video1
(004337) [21:51:08] % chmod 777 -R /dev/video0
[waydroid-sensors-daemon] Got new plugin for orientationsensor with pid 40633 and session 46
[waydroid-sensors-daemon] Got plugin_string orientationsensor
[waydroid-sensors-daemon] Got plugin_interface local.OrientationSensor
[waydroid-sensors-daemon] Got plugin_path /SensorManager/orientationsensor
(004337) [21:51:08] % mv /var/lib/waydroid/config_session /var/lib/waydroid/lxc/waydroid
[waydroid-sensors-daemon] Got new plugin for pressuresensor with pid 40633 and session 47
[waydroid-sensors-daemon] Got plugin_string pressuresensor
[waydroid-sensors-daemon] Got plugin_interface local.PressureSensor
[waydroid-sensors-daemon] Got plugin_path /SensorManager/pressuresensor
(004337) [21:51:08] % mount -o ro /var/lib/waydroid/images/system.img /var/lib/waydroid/rootfs
[waydroid-sensors-daemon] Got new plugin for proximitysensor with pid 40633 and session 48
[waydroid-sensors-daemon] Got plugin_string proximitysensor
[waydroid-sensors-daemon] Got plugin_interface local.ProximitySensor
[waydroid-sensors-daemon] Got plugin_path /SensorManager/proximitysensor
[waydroid-sensors-daemon] Failed to create SensorfwStepcounterSensor: Could not create sensorfw backend
[waydroid-sensors-daemon] Failed to create SensorfwTemperatureSensor: Could not create sensorfw backend
(004337) [21:51:08] % mount -t overlay -o ro,lowerdir=/var/lib/waydroid/overlay:/var/lib/waydroid/rootfs,upperdir=/var/lib/waydroid/overlay_rw/system,workdir=/var/lib/waydroid/overlay_work/system,xino=off overlay /var/lib/waydroid/rootfs
(004337) [21:51:08] % mount -o ro /var/lib/waydroid/images/vendor.img /var/lib/waydroid/rootfs/vendor
(004337) [21:51:08] % mount -t overlay -o ro,lowerdir=/var/lib/waydroid/overlay/vendor:/var/lib/waydroid/rootfs/vendor,upperdir=/var/lib/waydroid/overlay_rw/vendor,workdir=/var/lib/waydroid/overlay_work/vendor,xino=off overlay /var/lib/waydroid/rootfs/vendor
(004337) [21:51:08] % mount -o bind /vendor/lib/egl /var/lib/waydroid/rootfs/vendor/lib/egl
(004337) [21:51:08] % mount -o bind /vendor/lib64/egl /var/lib/waydroid/rootfs/vendor/lib64/egl
(004337) [21:51:08] % mount -o bind /vendor/odm /var/lib/waydroid/rootfs/odm_extra
(004337) [21:51:08] % mount -o bind /var/lib/waydroid/waydroid.prop /var/lib/waydroid/rootfs/vendor/waydroid.prop
(004337) [21:51:08] Save config: /var/lib/waydroid/waydroid.cfg
(004337) [21:51:08] % lxc-start -P /var/lib/waydroid/lxc -F -n waydroid – /init
(004337) [21:51:08] New background process: pid=40674, output=background
(004337) [21:51:08] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
lxc-start: waydroid: …/src/lxc/utils.c: open_without_symlink: 1084 Too many levels of symbolic links - vibrator in /usr/lib64/lxc/rootfs/sys/class/leds/vibrator was a symbolic link!
RUNNING
(040599) [21:51:08] Skipping clipboard manager service because of missing pyclip package
(004337) [21:51:09] Failed to add service waydroidhardware: -2147483647
(004337) [21:51:49] Failed to add service waydroidhardware: -2147483647
(040599) [22:26:37] UserMonitor service is not even started

`
See the timesteps, this is where I stopped waydroid with

devel-su waydroid session stop

After some experimenting yesterday, I am still not successful with the Waydroid installation on the Vollaphone 22+ with SFOS 5.0.0.62, but I noticed something strange on the storage.

The phone comes with 64GB and after a fresh SFOS installation system data ends up with 3,7GB used and 3,9GB free. After installation of Waydroid + Waydroid runner from Sailfish:Chum that ratio turned to 6,7GB used and 916MB free. After replacement of system.img and vendor.img its 7,6GB used and 0MB free.

Might this be the issue, why Waydroid ist not booting properly? Also why is a fresh SFOS installation more than double the size of the situation I am seeing on my old still running Sony Xperia XA2 (after upgading to SFOS 5.0.0.62 yesterday I see that Sailfishdata is only 1,4GB and listest Android App support is only 0,4MB)? How can the storage handled better? Do I have to increase it? Or handle the download/installation differently?

Thanks for your comments and guiding! And also happy easter wishes!

Your /home partition isn’t set up properly. Most common reason is not encrypting home during first boot of Sailfish. Without encryption home is created in the 8 GB root partition. This applies to all Vollas and Gigasets.

Edit: if that doesn’t work: before flashing Sailfish boot to Recovery and wipe/reset. This frees up the space needed to create the home partition.

Mmh that is strange. During first boot I chose home encryption with plain text password, also during reboot its asked to provide it. Also I do see in the storage overview besides the System Data also User Data (~673MB used and 56,7 GB free). Is that both set up properly @Ahtisilli ? I understood apps and also waydroid installation come under the System Data. But is it correct, that already SFOS is taking so much space? And then Waydroid too?

This should be solved after factory reset and data deletion and reflashing. It is in the VP22 thread and this thread sometimes mentioned.

I have a GS5 (the same as Volla 22). I have 4.6 GB free on System, 50 GB free on User.

Yes, the apps are installed on System but Waydroid and Containers store the images and user data in /home.

Another small update, factory reset was successful! After reflashing there is now only 2,4 GB used on system data (still its 1GB more than on XA2). But now I am wondering, why is waydroid init using space on System Data but not on User Data and also the exchange of the Images? I do see the path above starting from /home... in

, but after performing both steps only space on System data gets occupied. Did I do something else wrong?

That is strange. The waydroid images are located at /home/waydroid but linked to somewhere on root. So you are downloading them directly to /home/waydroid but still root gets occupied?

I must admit, I somehow felt lucky, that the root partition did get filled up again the last time I tried to install waydroid. And I don’t understand why this filling of root really happens, but it took several attempts to not get root filled … But telling, to try again is also not a nice answer …

It took me a while to find more time and follow your suggestions, please excuse. However, now I made a complete rerun, factory reset and fresh installation of SFOS. After this I can confirm the mistake was on my side: The replacement of vendor.img and system.img is not occupying additional space. Mine was just already reduced upfront and I didnt notice. Now its having 5,1GB free in system data.

I performed complete steps and replaced the vendor.img and system.img successfully. Continuing now is giving me for steps

  1. Perform devel-su waydroid init

[23:14:22] Already initialized

  1. Run waydroid show-full-ui

[23:15:00] Starting waydroid session
[23:15:00] RuntimeError: Command failed: % /usr/lib/waydroid/data/scripts/waydroid-net.sh start

I was searching around the web, but could not find a solution to that runtime error. For Desktop Linux I found, that maybe some iptables are missing. Or is it connected to the dnsmasq. But how can it be solved?

1 Like

IIRC by searching this forum: I believe to have read about Waydroid issues with dnsmasq on SailfishOS a while ago.

1 Like

GitHub - sailfishos-open/waydroid: Waydroid packaging for Sailfish OS may help (troubleshooting section). Even if that error does not occur the solution provided may help (it did help me)

3 Likes