Waydroid template

You don’t need to start sway manually.
You need to configure Waydroid-Sway.desktop file like this:

And if you set default-menu-items using qvm-features as described here:

Then Waydroid qube should have Waydroid-Sway app present in menu and you need to start it to start Waydroid.
Or you can start it from the terminal using this command:

sway-waydroid.sh

bash: sway-waydroid.sh: command not found
on d12m-waydroid and appVM based on it

stell missing app after doing that

Check this.

1 Like

I think you’ve missed some steps in the guide.
Follow the guide again and rerun all the commands.

cat: /etc/profile.d/opt-bin.sh: No such file or directory /usr/local/bin:/usr/bin:/usr/local/games:/usr/games:/opt/venv/pyclip/bin

Try this.

thanks I going to rerun all commands again on guide

Thank you for this guide. I configured a debian 12 minimal template for waydroid as you explained here. Then I started an AppVM based on the template, opened a terminal an prompted:

waydroid show-full-ui

An this is the result:

[15:30:23] Starting waydroid session
[15:30:23] WAYLAND_DISPLAY is not set, defaulting to "wayland-0"
[15:30:23] Wayland socket '/run/user/1000/wayland-0' doesn't exist; are you running a Wayland compositor?

What is to be done additionally before I can use wayland on debian?

Run the Waydroid using Waydroid-Sway app in the qube menu.
Or you can run it by running sway-waydroid.sh command from the terminal.

Okay, that works. I also tried to register the device at google using this guide: Google Play Certification | Waydroid
I registered the ID, but waydroid still says: device not certified. Is there a solution?

I guess you just need to wait some more time:

From privacy perspective it is a bit concerning, that an Android system with Google Play Services and Internet access system can collect CPU and kernel information.
(Especially Play Services being a system app with root access, if you need them.)

I would agree with Spoofing the CPU name :

Thanks for the hint to configure a generic kernel! Still I think this hardware information (in combination with other identifiers like IP) have high fingerprinting potential, especially if you are one of the biggest data collectors in this world. The hypervisor seems to be the only component that effectively can spoof CPUID, hence it is a bit unfortunate Xen does not provide possibility for users to decide them selves.

Hello everyone,

Thanks for the guide :+1:

It seems like there are some things missing in the debian12-minimal template.
Personally I have just used the debian-12-xfce template which worked out of the box and thats ok for my use :ok_hand:

I don’t have time (or skill? :upside_down_face:) to fix the minimal template but here is what happened when I followed the guide.
Maybe someone has a simple fix and the guide can be updated without to much hassle.

  1. There was no Xwayland binary for sway to use.
    I have simply installed the binary (apt install xwayland) and the binary was found.

  2. lxc is unable to start the waydroid container. Something seems to be missing.
    I know nothing about linux containers so here the wayroid log:

lxc-start: waydroid: ../src/lxc/utils.c: safe_mount: 1220 No such file or directory - Failed to mount "/run/user/1000/pulse/native" onto "/usr/lib/x86_64-linux-gnu/lxc/rootfs/run/xdg/pulse/native"
lxc-start: waydroid: ../src/lxc/conf.c: mount_entry: 2442 No such file or directory - Failed to mount "/run/user/1000/pulse/native" on "/usr/lib/x86_64-linux-gnu/lxc/rootfs/run/xdg/pulse/native"
lxc-start: waydroid: ../src/lxc/conf.c: lxc_setup: 4415 Failed to setup mount entries
lxc-start: waydroid: ../src/lxc/start.c: do_start: 1272 Failed to setup container "waydroid"
lxc-start: waydroid: ../src/lxc/sync.c: sync_wait: 34 An error occurred in another process (expected sequence number 3)
lxc-start: waydroid: ../src/lxc/start.c: __lxc_start: 2107 Failed to spawn container "waydroid"
STOPPED
(000435) [14:10:24] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
lxc-start: waydroid: ../src/lxc/conf.c: run_buffer: 322 Script exited with status 126
lxc-start: waydroid: ../src/lxc/start.c: lxc_end: 985 Failed to run lxc.hook.post-stop for container "waydroid"
lxc-start: waydroid: ../src/lxc/tools/lxc_start.c: main: 306 The container failed to start
lxc-start: waydroid: ../src/lxc/tools/lxc_start.c: main: 311 Additional information can be obtained by setting the --logfile and --logpriority options
STOPPED
(000435) [14:10:24] waiting 10 seconds for container to start...
(000435) [14:10:25] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000435) [14:10:25] waiting 9 seconds for container to start...
(000435) [14:10:26] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000435) [14:10:26] waiting 8 seconds for container to start...
(000435) [14:10:27] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000435) [14:10:27] waiting 7 seconds for container to start...
(000435) [14:10:28] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000435) [14:10:28] waiting 6 seconds for container to start...
(000435) [14:10:29] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000435) [14:10:29] waiting 5 seconds for container to start...
(000435) [14:10:30] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000435) [14:10:30] waiting 4 seconds for container to start...
(000435) [14:10:31] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000435) [14:10:31] waiting 3 seconds for container to start...
(000435) [14:10:32] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000435) [14:10:32] waiting 2 seconds for container to start...
(000435) [14:10:33] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000435) [14:10:33] waiting 1 seconds for container to start...
(001645) [14:10:34] org.freedesktop.DBus.Python.OSError: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/service.py", line 712, in _message_cb
    retval = candidate_method(self, *args, **keywords)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/waydroid/tools/actions/container_manager.py", line 34, in Start
    do_start(self.args, session)
  File "/usr/lib/waydroid/tools/actions/container_manager.py", line 189, in do_start
    helpers.lxc.start(args)
  File "/usr/lib/waydroid/tools/helpers/lxc.py", line 400, in start
    wait_for_running(args)
  File "/usr/lib/waydroid/tools/helpers/lxc.py", line 394, in wait_for_running
    raise OSError("container failed to start")
OSError: container failed to start

Hopefully it’s a simple fix and this nice guide can be updated :pray:

As I said, I will not be able to learn about linux containers right now but if someone has the knowledge and is fairly assured with a fix I can try it for them if they aren’t able to have a setup ready to test it.

I’ve created a new Waydroid template from a fresh debian-12-minimal template by following the guide and it worked for me without an issue.
I guess you’ve missed some steps when you tried to install it.
Also xwayland is not required.

Thanks for the answer :+1:

Just redownloaded/reinstalled debian-12-minimal and followed the guide again.
Same result…

Here is the log I got from the command you provided
sed "s|&>/dev/null||g" /opt/bin/sway-waydroid.sh | source /dev/stdin
(without xwininfo parts):

xwininfo: error: No window with name "wlroots - X11-1" exists!
00:00:00.001 [wlr] [types/wlr_drm_lease_v1.c:705] No DRM backend supplied, failed to create wlr_drm_lease_v1_manager
00:00:00.011 [wlr] [xwayland/server.c:443] Cannot find Xwayland binary "/usr/bin                                           /Xwayland"                                                                                                              
00:00:00.011 [sway/server.c:273] Failed to start Xwayland                                                                  
Environment variable $DISPLAY not set, ignoring.                                                                           
dbus-update-activation-environment: warning: error sending to systemd: org.freed                                           esktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited wit                                           h status 1                                                                                                              
2024-08-13 17:20:28 - [main.c:293] Found config * for output X11-1 ((null))                                                
[17:20:29] Starting waydroid session

....

[17:20:29] OSError: container failed to start

Same result as before for waydroid log

Are you trying to start Waydroid in the template?
Create app qube based on this template and start Waydroid in this app qube.

I am not trying to start anything from the template and did create an appVM based on the template.

Do you have Qubes OS 4.2 or Qubes OS 4.1?
For me the script output is this:

$ sed "s|&>/dev/null||g" /opt/bin/sway-waydroid.sh | source /dev/stdin
xwininfo: error: No window with name "wlroots - X11-1" exists!
00:00:00.009 [wlr] [types/wlr_drm_lease_v1.c:705] No DRM backend supplied, failed to create wlr_drm_lease_v1_manager
00:00:00.044 [wlr] [xwayland/server.c:443] Cannot find Xwayland binary "/usr/bin/Xwayland"
00:00:00.045 [sway/server.c:273] Failed to start Xwayland
Environment variable $DISPLAY not set, ignoring.
2024-08-13 16:11:12 - [main.c:293] Found config * for output X11-1 ((null))
[16:11:12] Starting waydroid session

xwininfo: Window id: 0xa00004 "wlroots - X11-1"

  Absolute upper-left X:  892
  Absolute upper-left Y:  55
  Relative upper-left X:  892
  Relative upper-left Y:  55
  Width: 1024
  Height: 768
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0xa00000 (not installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +892+55  -4+55  -4-377  +892-377
  -geometry 1024x768-4+55


xwininfo: Window id: 0xa00004 "wlroots - X11-1"

  Absolute upper-left X:  892
  Absolute upper-left Y:  55
  Relative upper-left X:  892
  Relative upper-left Y:  55
  Width: 1024
  Height: 768
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0xa00000 (not installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +892+55  -4+55  -4-377  +892-377
  -geometry 1024x768-4+55

[gbinder] Service manager /dev/binder has appeared

xwininfo: Window id: 0xa00004 "wlroots - X11-1"

  Absolute upper-left X:  892
...

And it opens a sway window.

What’s the output of this command in Waydroid app qube?

systemctl --user status dbus.service

My Qubes OS version is 4.2.2 (R4.2).

A sway windows opens up on my side too but nothing appears in it.

The output of systemctl --user status dbus.service is:
Unit dbus.service could not be found

Without the --user flag the dbus.service is shown as active (if that helps)