Some additional info:
Aurora Store newer than version 4.2.5 crashes on Waydroid:
opened 08:13AM - 28 Jul 23 UTC
**Describe the bug**
I manged to run Waydroid without issues on Manjaro. I inst… alled Aurora shop from apk. It run with the setup steps, I logged in to Google and then it crashed. It looks like it opens the usual, main app screen but it doesn't load fully, because it crashes before any app or graphic shows up.
I also wanted to run Skyshowtime app (streaming TV) and it let me to log in and the main screen, but when clicking on any of the show or movie icons, it minimizes and on second try it crashes.
Apps installed via F-Droid work. There is some additional problem with F-Droid not updating repos on the next launch, but that is a different issue that we can ignore here.
During crashes, I get in log:
```
(015983) [09:51:03] % tail -n 60 -F /var/lib/waydroid/waydroid.log
(015983) [09:51:03] *** output passed to waydroid stdout, not to this log ***
```
The path above is the path to the general log, but it still doesn't have the details. So where is this output passed and how to access it? When I use `waydroid --details-to-stdout log` it just show the usual log entries, nothing more (see the log below).
**General information (please complete the following information):**
- Waydroid tools Version 1.4.1
arch = x86_64
vendor_type = MAINLINE
system_datetime = 1690085411
vendor_datetime = 1690089493
suspend_action = freeze
mount_overlays = True
images_path = /var/lib/waydroid/images
system_ota = https://ota.waydro.id/system/lineage/waydroid_x86_64/VANILLA.json
vendor_ota = https://ota.waydro.id/vendor/waydroid_x86_64/MAINLINE.json
binder = binder
vndbinder = vndbinder
hwbinder = hwbinder
binder_protocol = aidl3
service_manager_protocol = aidl3
**Desktop (please complete the following information):**
Operating System: Manjaro Linux
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Kernel Version: 6.4.6-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 530
Manufacturer: Alienware
Product Name: Alienware 17 R3
System Version: 1.13.1
**Additional context**
Add any other context about the problem here.
**Logs (please upload as file)**
```
michaldybczak alienware-PC ~ waydroid --details-to-stdout log
(016283) [09:55:16] % tail -n 60 -F /var/lib/waydroid/waydroid.log
(016283) [09:55:16] *** output passed to waydroid stdout, not to this log ***
bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
(002288) [08:36:13] % /usr/lib/waydroid/data/scripts/waydroid-net.sh start
vnic is waydroid0
(002288) [08:36:13] % systemctl is-active -q nfcd
(002288) [08:36:13] % chmod 777 -R /dev/dri
(002288) [08:36:13] % chmod 777 -R /dev/fb0
(002288) [08:36:13] % chmod 777 -R /dev/video1
(002288) [08:36:13] % chmod 777 -R /dev/video0
(002288) [08:36:13] % mv /var/lib/waydroid/config_session /var/lib/waydroid/lxc/waydroid
(002288) [08:36:13] % mount -o ro /var/lib/waydroid/images/system.img /var/lib/waydroid/rootfs
(002288) [08:36:13] % 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
(002288) [08:36:13] % mount -o ro /var/lib/waydroid/images/vendor.img /var/lib/waydroid/rootfs/vendor
(002288) [08:36:13] % 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
(002288) [08:36:13] % mount -o bind /var/lib/waydroid/waydroid.prop /var/lib/waydroid/rootfs/vendor/waydroid.prop
(002288) [08:36:13] Save config: /var/lib/waydroid/waydroid.cfg
(002288) [08:36:13] % lxc-start -P /var/lib/waydroid/lxc -F -n waydroid -- /init
(002288) [08:36:13] New background process: pid=5771, output=background
(002288) [08:36:13] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
RUNNING
(005723) [08:36:23] waydroidusermonitor: Received transaction: 1
(005723) [08:36:23] Android with user 0 is ready
(005723) [08:36:23] % adb start-server
(005723) [08:36:23] % adb connect 192.168.240.112
already connected to 192.168.240.112:5555
(005723) [08:36:23] Established ADB connection to Waydroid device at 192.168.240.112.
(002288) [08:36:39] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
RUNNING
(005723) [09:14:56] waydroidusermonitor: Received transaction: 2
(005723) [09:16:21] waydroidusermonitor: Received transaction: 2
(005723) [09:18:56] waydroidusermonitor: Received transaction: 2
(005723) [09:19:39] waydroidusermonitor: Received transaction: 2
(005723) [09:20:51] waydroidclipboard: Received transaction: 2
(005723) [09:20:51] Could not setup clipboard
(005723) [09:20:54] waydroidclipboard: Received transaction: 2
(005723) [09:20:54] Could not setup clipboard
(005723) [09:20:54] waydroidclipboard: Received transaction: 2
(005723) [09:20:54] Could not setup clipboard
(005723) [09:24:21] waydroidclipboard: Received transaction: 2
(005723) [09:24:21] Could not setup clipboard
(005723) [09:24:21] waydroidclipboard: Received transaction: 2
(005723) [09:24:21] Could not setup clipboard
(005723) [09:24:23] waydroidclipboard: Received transaction: 2
(005723) [09:24:23] Could not setup clipboard
(005723) [09:24:23] waydroidclipboard: Received transaction: 2
(005723) [09:24:23] Could not setup clipboard
(005723) [09:27:17] waydroidclipboard: Received transaction: 2
(005723) [09:27:17] Could not setup clipboard
(005723) [09:32:54] waydroidclipboard: Received transaction: 2
(005723) [09:32:54] Could not setup clipboard
(005723) [09:37:57] waydroidclipboard: Received transaction: 2
(005723) [09:37:57] Could not setup clipboard
(005723) [09:41:05] waydroidusermonitor: Received transaction: 2
(005723) [09:42:57] waydroidusermonitor: Received transaction: 2
(014768) [09:44:39] % tail -n 60 -F /var/lib/waydroid/waydroid.log
(014768) [09:44:39] *** output passed to waydroid stdout, not to this log ***
(015983) [09:51:03] % tail -n 60 -F /var/lib/waydroid/waydroid.log
(015983) [09:51:03] *** output passed to waydroid stdout, not to this log ***
```
Additional info:
```
michaldybczak alienware-PC ~ zgrep -i -e android -e memfd -e ashmem /proc/config.gz
CONFIG_X86_ANDROID_TABLETS=m
# Android
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
# CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set
# end of Android
CONFIG_MEMFD_CREATE=y
```
EDIT: I tried Disney+ from APK and it runs, but when I try to play the video, it informs me that it plays in full screen mode, I hear the sound (very quietly thou) but the screen is black, as if the output was to some other screen.
`
waydroidusermonitor: Received transaction: 2`
It looks like Manjaro kernel is compatible, but the issue lies elsewhere.
Work on Waydroid webcam support:
opened 03:43AM - 12 Sep 22 UTC
**Is your feature request related to a problem? Please describe.**
Waydroid cur… rently supports mainline Linux cameras by passing low-level V4L2 camera devices through to Android, which sets them up as extremely limited external webcams. This is not ideal, e.g. for Android apps that use the front-facing camera to capture QR codes.
**Describe the solution you'd like**
* Include libcamera as an optional dependency
* Install the compiled libcamera Android HAL in the container
* Set "ro.hardware.camera=\<libcamera-so-path\>" instead of "ro.hardware.camera=v4l2" on supported hardware
**Describe alternatives you've considered**
* One-off camera implementations per platform: Infeasible due to required effort, but support would be betteer
* Vanilla v4l2-- Generally unusable because lacks color calibration support, autofocus, etc. found in complex cameras (e.g., PinePhone Pro, Librem 5)
**Additional context**
* libcamera has basic support for [Librem 5](https://git.libcamera.org/libcamera/libcamera.git/commit/src/libcamera?id=502ab9a146e037cc10e3315ced91a0bdfa385472), with more thorough support [coming soon](https://puri.sm/posts/cameras-its-complicated/)
* libcamera fully supports [PinePhone Pro](https://git.libcamera.org/libcamera/libcamera.git/tree/src/libcamera/pipeline/rkisp1?id=83996258a9fc852552fc66726c313c9ed4e325b3)
* libcamera supports the vanilla [PinePhone](https://git.libcamera.org/libcamera/libcamera.git/tree/src/libcamera/pipeline/simple/simple.cpp?id=502ab9a146e037cc10e3315ced91a0bdfa385472)
2 Likes
Thank @apparatus for this very good guide! Below an update proposal.
Small fix for the clipnotify zip
curl https://codeload.github.com/cdown/clipnotify/zip/refs/heads/master -o clipnotify-master.zip
unzip -j clipnotify-master.zip -d clipnotify
→
apt install unzip -y
curl --proxy http://127.0.0.1:8082/ --tlsv1.2 --proto =https --max-time 180 https://codeload.github.com/cdown/clipnotify/zip/refs/heads/master>
unzip -j clipnotify-master.zip -d clipnotify
When the TemplateVM created
create an AppVM, in Settings / Applications, refresh Applications, add Waydroid-Sway
create a DispsableVM, in Settings / Applications, refresh Applications, add Waydroid-Sway
Troubleshootings
From Application menu, choose AppVM / Waydroid-Sway, BUT nothing displayed.
Solution : Application menu, choose AppVM / xterm, in the displayed xterm, manually launch waydroid : /opt/bin/sway-waydroid.sh
How to exit the AppVM ?
Solution : From dom0 Qubes Domain traybar, for the AppVM, choose Shutdown.
3 Likes
update proposal : add this command to a script file and put it in /etc/skel/
, something like :
cat << 'EOF' | tee /etc/skell/install-apk
WAYLAND_DISPLAY="wayland-1" XDG_SESSION_TYPE="wayland" DISPLAY=":1" waydroid app install $1
EOF
Install your first application
In an DisposableVM:
download an application apk (for example F-Droid from https://f-droid.org/ )
qvm-copy
it to your Waydroid AppVM or DisposableVM
In your Waydroid AppVM or DisposableVM:
Run install-apk
(see above) with the apk file (for example : ./install-apk QubesIncoming/disp1629/F-Droid.apk
)
1 Like
ludovic:
Small fix for the clipnotify zip
curl https://codeload.github.com/cdown/clipnotify/zip/refs/heads/master -o clipnotify-master.zip
unzip -j clipnotify-master.zip -d clipnotify
→
apt install unzip -y
curl --proxy http://127.0.0.1:8082/ --tlsv1.2 --proto =https --max-time 180 https://codeload.github.com/cdown/clipnotify/zip/refs/heads/master>
unzip -j clipnotify-master.zip -d clipnotify
I’ve thought about it as well but in the end I’ve decided that instead of installing unzip/git in the Waydroid template just to download the sources only once and then never use it again it’d be better to keep the template minimal and just download it in another qube instead.
I’ve added both options so users can choose what fits them best.
ludovic:
When the TemplateVM created
create an AppVM, in Settings / Applications, refresh Applications, add Waydroid-Sway
create a DispsableVM, in Settings / Applications, refresh Applications, add Waydroid-Sway
Troubleshootings
From Application menu, choose AppVM / Waydroid-Sway, BUT nothing displayed.
Solution : Application menu, choose AppVM / xterm, in the displayed xterm, manually launch waydroid : /opt/bin/sway-waydroid.sh
How to exit the AppVM ?
Solution : From dom0 Qubes Domain traybar, for the AppVM, choose Shutdown.
Thanks, I’ve added them as well.
Just with some correction to start the waydroid script manually with debug output by removing &>/dev/null
from the commands.
1 Like
Thanks, I’ve added this change as well.
With the correction that it’s better to place the script in /opt/bin
instead of /etc/skel/
because if you change the script later in your template then this change won’t be propagated to the existing AppVMs based on this template.
The /opt/bin
is already in the PATH
so you can call it without specifying the full path to the script.
1 Like
Proposal update for sound:
To get sound in the Waydroid AppVM or DisposableVM, in the TemplateVM you should install pipewire-qubes
(for Qubes-OS 4.2):
apt install pipewire-qubes -y
Note: to avoid a too big default template (and so a bigger attack surface ), I cloned d12m-waydroid
to d12m-waydroid-sound
and added the above package only in d12m-waydroid-sound
. So I choose for an AppVM if I want sound or not.
2 Likes
Thanks, it’s worth mentioning. I’ve added this info to the guide.
1 Like
Thanks for the great guide, have Waydroid all set up in a Template and AppVM.
EDIT: Below was due to being on Qubes 4.1, anyone on 4.2+ shouldn’t have this same problem. Thanks to @apparatus for the reminder.
I did have a problem with no internet connectivity in Waydroid itself. TemplateVM and AppVMs had connectivity just fine, and running ip addr show
in terminal showed all the interfaces and assigned IPs. But the Waydroid container itself wasn’t getting any network, and wasn’t showing any assigned IPV4 address.
Solution was found here , in the post by rustyx on April 25th 2023:
No worky in Ubuntu 22.04.
The script /usr/lib/waydroid/data/scripts/waydroid-net.sh
prefers nft
, iptables-legacy
, iptables
, in that order.
There are 2 problems with that logic:
nftables
doesn’t work in combination with iptables
rules (which I have on due to Docker)
iptables-legacy
doesn’t work at all
So the script has no chance of ever working.
With the following patch that disables nft
and iptables-legacy
I was able to get Internet working:
sudo sed -i~ -E 's/=.\$\(command -v (nft|ip6?tables-legacy).*/=/g' \
/usr/lib/waydroid/data/scripts/waydroid-net.sh
Now Waydroid is working pretty great!
Do you have Qubes OS 4.1?
It isn’t mentioned in the guide but it is for Qubes OS 4.2 and it’s using nftables because Qubes OS replaced iptables with nftables in Qubes OS 4.2.
2 Likes
Yes you’re right I’m still on 4.1! Completely forgot about the 4.2 switch to nftables. Will edit my post to add.
You can try to replace this:
ExecStart=/usr/bin/bash -c "if (nft create chain ip qubes waydroid-input) &>/dev/null; then nft add rule ip qubes custom-input jump waydroid-input; fi"
ExecStart=/usr/bin/bash -c "if (nft create chain ip qubes waydroid-forward) &>/dev/null; then nft add rule ip qubes custom-forward jump waydroid-forward; fi"
ExecStart=/usr/sbin/nft add rule ip qubes waydroid-input iifname "waydroid0" meta l4proto {tcp, udp} th dport { 53, 67 } accept
ExecStart=/usr/sbin/nft add rule ip qubes waydroid-forward iifname "waydroid0" oifgroup 1 accept
ExecStart=/usr/sbin/nft add rule ip qubes waydroid-forward oifname "waydroid0" iifgroup 1 accept
ExecStop=/usr/sbin/nft flush chain ip qubes waydroid-input
ExecStop=/usr/sbin/nft flush chain ip qubes waydroid-forward
with this:
ExecStart=/usr/sbin/iptables -I INPUT -i waydroid0 -p tcp -m multiport --dports 53,67 -j ACCEPT
ExecStart=/usr/sbin/iptables -I INPUT -i waydroid0 -p udp -m multiport --dports 53,67 -j ACCEPT
ExecStart=/usr/sbin/iptables -I FORWARD 2 -o eth0 -i waydroid0 -j ACCEPT
ExecStart=/usr/sbin/iptables -I FORWARD 2 -i eth0 -o waydroid0 -j ACCEPT
ExecStop=/usr/sbin/iptables -D INPUT -i waydroid0 -p tcp -m multiport --dports 53,67 -j ACCEPT
ExecStop=/usr/sbin/iptables -D INPUT -i waydroid0 -p udp -m multiport --dports 53,67 -j ACCEPT
ExecStop=/usr/sbin/iptables -D FORWARD -o eth0 -i waydroid0 -j ACCEPT
ExecStop=/usr/sbin/iptables -D FORWARD -i eth0 -o waydroid0 -j ACCEPT
untested
1 Like
Confirming that these iptables-version firewall rules work for Waydroid in Qubes 4.1!
Thank you for taking care of us poor souls who haven’t been able to make the jump to 4.2 yet
scales
January 16, 2024, 10:39am
14
Qubes os is still handle to Wayland, so I was thinking to use Wayland on Qubes OS, user shall make sys-gui and after separate between X11 and Wayland.
My solution is making two sys-gui, one is managing gui on X11 server of dom0 and normal templates, other one manage Wayland compositor.
But I understood to be able to use Wayland on Qubes os, this solution is greatest!
User can use safely Android apps without Google service, thank you!
Hey There,
‘create an AppVM, in Settings / Applications, refresh Applications, add Waydroid-Sway’
I have refreshed the apps but i cant find waydroid-sway. Only waydroid. Are they the same thing?
I went ahead and tried opening waydroid. It opened ‘initialize waydroid’ and I chose my android type and downloaded it.
when i try waydroid-install-apk /home/user/QubesIncoming/disp1629/F-Droid.apk
it says WayDroid session is stopped
What am i doing wrong here?
It seems that you’ve missed some of the guides steps or there was an error somewhere that you didn’t notice.
Try to create Waydroid template from the beginning.
It seems that you don’t have .desktop file that should’ve been created here:
This guide is for creating Waydroid template that can be used to create AppVMs based on it.
The Android image is installed in template and applications and their configuration will be installed in AppVMs.
This guide is for setting up minimal Waydroid template. You may want to install additional packages like GUI terminal, file manager, passwordless root etc.
Create Waydroid template qube
Install debian-12-minimal template using “Qubes Template Manager” tool if you don’t have it already.
Upda…
1 Like
okay, waydroid-sway shows app in qubes settings apps now. I think i had an error on the sway install.
How do I get aurora store 4.2.5? Their gitlab keeps redirecting to their main site where they only have 4.3.5. F-droid doesnt have 4.2.5 either.
You can download it from here:
And verify the signature:
1 Like
scales
January 21, 2024, 1:11pm
19
I think Droid-ify is privacy safely than F-Droid as client.
So first I install apk of Droid-ify, after I enable F-Droid Archive repository in Droid-ify, Aurora Store v4.2.5 is existing in F-Droid Archive repository, so it can install from here.
And Aurora Store use Exodus for monitor packet of apps, user should install Exodus.
n1ete
January 29, 2024, 12:15am
20
Thanks for making android research and devolpment more easy than ever on qubes with low resource overhead!
Everything seems to work so far only issue i have left is changing size of the output window for highres screens:
Scaling settings in /etc/sway/config
seem to have an effect on waydroid but the window size stays the same so the visible part of the screen is about 1/5…
if i resize the window android ist dynamicly rescaling, is that possible to configure? on chromebooks the rescaling works kinda.
I tried also the command waydroid shell wm density 320 and that helped also with with scaling but again the window size is too small.
I also found out that there is a Multi-Window-Mode any expierience with it?
You can set the sway window size in /etc/sway/config
like this:
output X11-1 resolution 1280x720 position 1280,0
Home · swaywm/sway Wiki · GitHub
You can change the DPI like this:
# Remove ro.sf.lcd_density properly if exist
grep ro.sf.lcd_density /var/lib/waydroid/waydroid_base.prop && \
sudo sed -i '/ro.sf.lcd_density/d' /var/lib/waydroid/waydroid_base.prop
# Append ro.sf.lcd_density property
echo "ro.sf.lcd_density=320" | sudo tee -a /var/lib/waydroid/waydroid_base.prop
Please add an scale setting (HIDPI support) · Issue #407 · waydroid/waydroid · GitHub
But I don’t think that dynamic resizing is possible:
Dynamic resolution · Issue #1053 · waydroid/waydroid · GitHub
add ability to run full ui mode in a resizable window · Issue #720 · waydroid/waydroid · GitHub