Waydroid template revisions

Go back to topic: Waydroid template

  1. v34 anchor; v34 full version
  2. v33 anchor; v33 full version
  3. v32 anchor; v32 full version
  4. v31 anchor; v31 full version
  5. v30 anchor; v30 full version
  6. v29 anchor; v29 full version
  7. v28 anchor; v28 full version
  8. v27 anchor; v27 full version
  9. v26 anchor; v26 full version
  10. v25 anchor; v25 full version
  11. v24 anchor; v24 full version
  12. v23 anchor; v23 full version
  13. v22 anchor; v22 full version
  14. v21 anchor; v21 full version
  15. v20 anchor; v20 full version
  16. v19 anchor; v19 full version
  17. v18 anchor; v18 full version
  18. v17 anchor; v17 full version
  19. v16 anchor; v16 full version
  20. v15 anchor; v15 full version
  21. v14 anchor; v14 full version
  22. v13 anchor; v13 full version
  23. v12 anchor; v12 full version
  24. v11 anchor; v11 full version
  25. v10 anchor; v10 full version
  26. v9 anchor; v9 full version
  27. v8 anchor; v8 full version
  28. v7 anchor; v7 full version
  29. v6 anchor; v6 full version
  30. v5 anchor; v5 full version
  31. v4 anchor; v4 full version
  32. v3 anchor; v3 full version
  33. v2 anchor; v2 full version

Revision #34

Edited on
2024-08-23
Edited by user
apparatus
# Add Waydroid App menu shortcut to the newly created qubes by default To add the Waydroid App menu shortcut to the newly created qubes you need to set `default-menu-items` feature for Waydroid template. Open dom0 terminal and run this command to set the default App menu items for qubes based on this template: ``` qvm-features d12m-waydroid default-menu-items "Waydroid-Sway.desktop debian-xterm.desktop" ``` # Configure Waydroid template
To configure the Waydroid template you can use the easy way if you don't need to fine-tune your template or the advanced way if you want to fine-tune it. [details="Easy way to configure Waydroid template for Qubes OS 4.2 with in-VM kernel, audio support and Thunar installed."] Run this command in dom0 terminal to add support for in-VM kernel in PVH qubes: ``` sudo qubes-dom0-update grub2-xen-pvh ```` Run this command in `d12m-waydroid` root terminal to install the in-VM kernel support in template: ``` apt install -y linux-image-amd64 linux-headers-amd64 grub2 qubes-kernel-vm-support ``` Shutdown `d12m-waydroid` template. Run this command in dom0 terminal to configure the Waydroid qube to use in-VM kernel: ``` qvm-prefs d12m-waydroid kernel pvgrub2-pvh ``` Start `d12m-waydroid` and open its root terminal using this command in dom0 terminal: ``` qvm-run -u root d12m-waydroid xterm & ``` Run these commands in `d12m-waydroid` root terminal: ``` apt install -y ca-certificates extrepo https_proxy=http://127.0.0.1:8082 http_proxy=http://127.0.0.1:8082 extrepo enable waydroid apt update apt install -y sway qubes-core-agent-networking waydroid pipewire-qubes curl unzip build-essential libx11-dev libxtst-dev xclip wl-clipboard pip python3-venv x11-utils thunar qubes-core-agent-thunar mkdir -p /etc/systemd/system/waydroid-container.service.d cat << 'EOF' | tee /etc/systemd/system/waydroid-container.service.d/override.conf >/dev/null [Unit] ConditionPathExists=!/run/qubes/this-is-templatevm EOF 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 -o clipnotify-master.zip unzip -j clipnotify-master.zip -d clipnotify cd clipnotify mkdir -p /opt/bin sed -i "s|/usr/local|/opt|g" Makefile make make install echo 'export PATH="/opt/bin:$PATH"' >> /etc/profile.d/opt-bin.sh echo "exec /opt/bin/x11-wl-clip.sh" > /etc/sway/config.d/99-x11-wl-clip.conf mkdir -p /opt/bin cat << 'EOF' | tee /opt/bin/x11-wl-clip.sh >/dev/null #!/bin/bash x11_wl='while DISPLAY=":0" clipnotify -s clipboard; do xclip -d ":0" -selection clipboard -o | wl-copy; done' wl_x11='wl-paste -nw xclip -d ":0" -selection clipboard' eval "${x11_wl}" &>/dev/null & eval "${wl_x11}" &>/dev/null pstree -A -p $$ | grep -Eow "[0-9]+" | xargs kill &>/dev/null EOF chmod +x /opt/bin/x11-wl-clip.sh python3 -m venv /opt/venv/pyclip source /opt/venv/pyclip/bin/activate pip install --proxy http://127.0.0.1:8082 pyclip deactivate echo 'export PATH="$PATH:/opt/venv/pyclip/bin"' >> /etc/profile.d/python-venv.sh echo 'export PYTHONPATH="$PYTHONPATH:/opt/venv/pyclip/lib/python3.11/site-packages"' >> /etc/profile.d/python-venv.sh cat << 'EOF' | tee /etc/systemd/system/waydroid-firewall.service >/dev/null [Unit] ConditionPathExists=!/run/qubes/this-is-templatevm PartOf=waydroid-container.service After=waydroid-container.service BindsTo=waydroid-container.service Requires=qubes-iptables.service After=qubes-iptables.service BindsTo=qubes-iptables.service [Service] Type=oneshot 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 RemainAfterExit=yes [Install] WantedBy=waydroid-container.service EOF systemctl daemon-reload systemctl enable waydroid-firewall.service echo "default_border none" > /etc/sway/config.d/94-disable-window-titlebar.conf perl -0777 -i -pe 's/(^\h*bar\s*|\v\h*bar\s*)(\{(?:(?>[^{}]+)|(?-1))*\})//g' /etc/sway/config cat << 'EOF' | tee /opt/bin/sway-waydroid.sh >/dev/null #!/bin/bash sway &>/dev/null & WAYLAND_DISPLAY="wayland-1" XDG_SESSION_TYPE="wayland" DISPLAY=":1" waydroid first-launch &>/dev/null & for i in $(seq 1 3); do if xwininfo -name "wlroots - X11-1" &>/dev/null; then break fi sleep 1 done while xwininfo -name "wlroots - X11-1" &>/dev/null; do sleep 2 done WAYLAND_DISPLAY="wayland-1" XDG_SESSION_TYPE="wayland" DISPLAY=":1" waydroid session stop &>/dev/null pstree -A -p $$ | grep -Eow "[0-9]+" | xargs kill &>/dev/null EOF chmod +x /opt/bin/sway-waydroid.sh cat << 'EOF' | tee /usr/share/applications/Waydroid-Sway.desktop >/dev/null [Desktop Entry] Type=Application Name=Waydroid-Sway Exec=/opt/bin/sway-waydroid.sh Icon=waydroid Categories=X-WayDroid-App; X-Purism-FormFactor=Workstation;Mobile; EOF cat << 'EOF' | tee /opt/bin/waydroid-install-apk >/dev/null #!/bin/sh WAYLAND_DISPLAY="wayland-1" XDG_SESSION_TYPE="wayland" DISPLAY=":1" waydroid app install $1 EOF chmod +x /opt/bin/waydroid-install-apk cat << 'EOF' | tee /opt/bin/waydroid-upgrade >/dev/null #!/bin/sh https_proxy=http://127.0.0.1:8082 http_proxy=http://127.0.0.1:8082 waydroid upgrade EOF chmod +x /opt/bin/waydroid-upgrade ``` Run this command to initialize Waydroid, It’ll download VANILLA Android image: ``` https_proxy=http://127.0.0.1:8082 http_proxy=http://127.0.0.1:8082 waydroid init ``` Or this command for Waydroid image with GApps support: ``` https_proxy=http://127.0.0.1:8082 http_proxy=http://127.0.0.1:8082 waydroid init -s GAPPS ``` Run this command in dom0 terminal to sync the Waydroid template appmenu entries: ``` qvm-sync-appmenus d12m-waydroid ``` [/details] --- [details="Advanced way to configure Waydroid template for fine-tuning."]
To disable sway status bar you need to edit the default sway config `/etc/sway/config` and remove or comment out the entire bar section: To disable sway status bar you need to edit the default sway config `/etc/sway/config` and remove or comment out the entire bar section. Run this command to remove the `bar{}` block from the sway config:
perl -0777 -i -pe 's/(^\h*bar\s*|\v\h*bar\s*)(\{(?:(?>[^{}]+)|(?-1))*\})//g' /etc/sway/config ``` Or do it manually: ```
``` Run this command in dom0 terminal to sync the Waydroid template appmenu entries: ``` qvm-sync-appmenus d12m-waydroid
Then you can choose whatever the Waydroid qube should have the sound or not by setting the suitable template for it. # Add Waydroid App menu shortcut to the newly created qubes by default To add the Waydroid App menu shortcut to the newly created qubes you need to set `default-menu-items` feature for Waydroid template. Open dom0 terminal and run this command to set the default App menu items for qubes based on this template: ``` qvm-features d12m-waydroid default-menu-items "Waydroid-Sway.desktop debian-xterm.desktop" ``` Then you can choose whatever the Waydroid qube should have the sound or not by setting the suitable template for it. [/details]
You can create a new app qube based on the `d12m-waydroid` and start the `Waydroid-Sway` app in this qube from Qubes OS menu to start the Waydroid inside this qube.
Since qubes use kernel provided by dom0 by default then apps in Waydroid can know that you're running Waydroid in Qubes OS (e.g. `6.7.3-1.qubes.fc37.x86_64`). To hide this you can use in-VM kernel instead: https://www.qubes-os.org/doc/managing-vm-kernels/#using-kernel-installed-in-the-vm Since qubes use kernel provided by dom0 by default then apps in Waydroid can know that you're running Waydroid in Qubes OS (e.g. `6.7.3-1.qubes.fc37.x86_64`). **NOTE** that if you've used the easy way to configure the Waydroid template then it's already configured to use the in-VM kernel. Use the following command if you've used the advanced way. To hide this you can use in-VM kernel instead: https://www.qubes-os.org/doc/managing-vm-kernels/#using-kernel-installed-in-the-vm Run this command in dom0 terminal to add support for in-VM kernel in PVH qubes: ``` sudo qubes-dom0-update grub2-xen-pvh ```` Run this command in `d12m-waydroid` root terminal to install the in-VM kernel support in template: ``` apt install -y linux-image-amd64 linux-headers-amd64 grub2 qubes-kernel-vm-support ``` Shutdown `d12m-waydroid` template. Run this command in dom0 terminal to configure the Waydroid qube to use in-VM kernel: ``` qvm-prefs d12m-waydroid kernel pvgrub2-pvh ```
Boot the Waydroid template with new kernel and run this command in its root terminal for VANILLA Android image: Start the Waydroid template with new kernel and run this command in its root terminal for VANILLA Android image:

Revision #33

Edited on
2024-08-23
Edited by user
apparatus

Revision #32

Edited on
2024-08-14
Edited by user
apparatus
apt install -y --no-install-recommends install pipewire-pulse apt install -y --no-install-recommends pipewire-pulse

Revision #31

Edited on
2024-08-13
Edited by user
apparatus
apt install -y --no-install-recommends install pipewire-pulse
The `pulseaudio` or `pipewire-pulse` package is required for Waydroid to work.

Revision #30

Edited on
2024-06-25
Edited by user
apparatus
#!/bin/sh
#!/bin/sh

Revision #29

Edited on
2024-04-27
Edited by user
apparatus
https://docs.waydro.id/faq/setting-up-a-shared-folder https://docs.waydro.id/faq/setting-up-a-shared-folder Or you can try to configure it like this: https://github.com/waydroid/waydroid/discussions/1107

Revision #28

Edited on
2024-04-27
Edited by user
apparatus
cat << 'EOF' | tee /etc/systemd/system/waydroid-container.service.d/override.conf cat << 'EOF' | tee /etc/systemd/system/waydroid-container.service.d/override.conf >/dev/null
cat << 'EOF' | tee /opt/bin/x11-wl-clip.sh cat << 'EOF' | tee /opt/bin/x11-wl-clip.sh >/dev/null
cat << 'EOF' | tee /etc/systemd/system/waydroid-firewall.service cat << 'EOF' | tee /etc/systemd/system/waydroid-firewall.service >/dev/null
cat << 'EOF' | tee /etc/systemd/system/waydroid-firewall.service cat << 'EOF' | tee /etc/systemd/system/waydroid-firewall.service >/dev/null
cat << 'EOF' | tee /opt/bin/sway-waydroid.sh cat << 'EOF' | tee /opt/bin/sway-waydroid.sh >/dev/null
cat << 'EOF' | tee /usr/share/applications/Waydroid-Sway.desktop cat << 'EOF' | tee /usr/share/applications/Waydroid-Sway.desktop >/dev/null
cat << 'EOF' | tee /opt/bin/waydroid-install-apk cat << 'EOF' | tee /opt/bin/waydroid-install-apk >/dev/null
cat << 'EOF' | tee /opt/bin/waydroid-upgrade cat << 'EOF' | tee /opt/bin/waydroid-upgrade >/dev/null

Revision #27

Edited on
2024-04-26
Edited by user
apparatus
apt install sway -y apt install -y sway
apt install qubes-core-agent-networking -y apt install -y qubes-core-agent-networking
apt install ca-certificates extrepo -y apt install -y ca-certificates extrepo
apt install waydroid -y apt install -y waydroid
apt install curl ca-certificates -y apt install -y curl ca-certificates
apt install waydroid -y apt install -y waydroid
apt install curl unzip -y apt install -y curl unzip
apt install git -y apt install -y git
apt install build-essential libx11-dev libxtst-dev -y apt install -y build-essential libx11-dev libxtst-dev
apt install xclip wl-clipboard -y apt install -y xclip wl-clipboard
apt install xclip wl-clipboard pip python3-venv -y apt install -y xclip wl-clipboard pip python3-venv
apt install x11-utils -y apt install -y x11-utils
# File manager in Waydroid qube If you want to use the file manager in Waydroid qube then you need to install these packages in Waydroid qube template: ``` apt install -y thunar qubes-core-agent-thunar ```
apt install pipewire-qubes -y apt install -y pipewire-qubes

Revision #26

Edited on
2024-04-25
Edited by user
apparatus
``` It’ll redownload the images but I’m not sure how to fix it without it. ```

Revision #25

Edited on
2024-04-25
Edited by user
apparatus
https://www.qubes-os.org/doc/managing-vm-kernels/#using-kernel-installed-in-the-vm https://www.qubes-os.org/doc/managing-vm-kernels/#using-kernel-installed-in-the-vm You'll need to reinitialize the Waydroid in template after switching the kernel. Boot the Waydroid template with new kernel and run this command in its root terminal for VANILLA Android image: ``` https_proxy=http://127.0.0.1:8082 http_proxy=http://127.0.0.1:8082 waydroid init -f ``` Or this command for Waydroid image with GApps support: ``` https_proxy=http://127.0.0.1:8082 http_proxy=http://127.0.0.1:8082 waydroid init -f -s GAPPS ``` It’ll redownload the images but I’m not sure how to fix it without it.

Revision #24

Edited on
2024-04-21
Edited by user
apparatus
extrepo enable waydroid https_proxy=http://127.0.0.1:8082 http_proxy=http://127.0.0.1:8082 extrepo enable waydroid

Revision #23

Edited on
2024-04-17
Edited by user
apparatus
Before=waydroid-container.service After=waydroid-container.service BindsTo=waydroid-container.service
BindsTo=qubes-iptables.service
ConditionPathExists=!/run/qubes/this-is-templatevm
Before=waydroid-container.service After=waydroid-container.service BindsTo=waydroid-container.service
BindsTo=qubes-iptables.service

Revision #22

Edited on
2024-04-17
Edited by user
apparatus
mkdir -p /etc/systemd/system/waydroid-container.service.d

Revision #21

Edited on
2024-04-17
Edited by user
apparatus
</details> </details> Configure for Waydroid container not to start in TemplateVMs: ``` cat << 'EOF' | tee /etc/systemd/system/waydroid-container.service.d/override.conf [Unit] ConditionPathExists=!/run/qubes/this-is-templatevm EOF ```
ConditionPathExists=!/run/qubes/this-is-templatevm
# Create script to upgrade Waydroid image in template from the terminal ``` cat << 'EOF' | tee /opt/bin/waydroid-upgrade https_proxy=http://127.0.0.1:8082 http_proxy=http://127.0.0.1:8082 waydroid upgrade EOF chmod +x /opt/bin/waydroid-upgrade ```
## Update Waydroid image To update Waydroid image in the future you'll need to manually run this command in Waydroid template `d12m-waydroid`: ## Upgrade Waydroid image To upgrade Waydroid image in the future you'll need to manually run this command in Waydroid template `d12m-waydroid`:
https_proxy=http://127.0.0.1:8082 http_proxy=http://127.0.0.1:8082 waydroid upgrade ``` waydroid-upgrade ``` [See above](https://forum.qubes-os.org/t/waydroid-template/23356#create-script-to-upgrade-waydroid-image-in-template-from-the-terminal-14) on how to create `waydroid-upgrade` command if it doesn't exist.

Revision #20

Edited on
2024-03-30
Edited by user
apparatus
apt install ca-certificates extrepo -y extrepo enable waydroid apt update apt install waydroid -y ``` The installation is using `extrepo` package instead of downloading the shell script from waydro.id and running it. This was suggested here: https://github.com/QubesOS/qubes-issues/issues/2233#issuecomment-2028278710 The link to the default installation process for reference: https://docs.waydro.id/usage/install-on-desktops#ubuntu-debian-and-derivatives <details> <summary>Original installation instructions if you prefer them:</summary> ```
``` Link for reference: https://docs.waydro.id/usage/install-on-desktops#ubuntu-debian-and-derivatives ``` </details>
Download and extract the clipnotify sources in some qube with network access: Download and extract the clipnotify sources in Waydroid template:
apt install unzip -y apt install curl unzip -y
apt install git -y

Revision #19

Edited on
2024-03-26
Edited by user
apparatus
# 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 * add the `Waydroid-Sway` app shortcut for your newly created Waydroid qube: https://www.qubes-os.org/doc/app-menu-shortcut-troubleshooting/

Revision #18

Edited on
2024-03-26
Edited by user
apparatus
# Add Waydroid App menu shortcut to the newly created qubes by default To add the Waydroid App menu shortcut to the newly created qubes you need to set `default-menu-items` feature for Waydroid template. Open dom0 terminal and run this command to set the default App menu items for qubes based on this template: ``` qvm-features d12m-waydroid default-menu-items "Waydroid-Sway.desktop debian-xterm.desktop" ```

Revision #17

Edited on
2024-03-17
Edited by user
apparatus
**At this point the template is configured and ready to be used.** # **At this point the template is configured and ready to be used.**

Revision #16

Edited on
2024-03-14
Edited by user
apparatus
* create a DispsableVM, in Settings / Applications, refresh Applications, add Waydroid-Sway * create a DispsableVM, in Settings / Applications, refresh Applications, add Waydroid-Sway * add the `Waydroid-Sway` app shortcut for your newly created Waydroid qube: https://www.qubes-os.org/doc/app-menu-shortcut-troubleshooting/

Revision #15

Edited on
2024-03-12
Edited by user
apparatus
For Qubes OS 4.2:
For Qubes OS 4.1: ``` cat << 'EOF' | tee /etc/systemd/system/waydroid-firewall.service [Unit] PartOf=waydroid-container.service Before=waydroid-container.service Requires=qubes-iptables.service After=qubes-iptables.service [Service] Type=oneshot 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 RemainAfterExit=yes [Install] WantedBy=waydroid-container.service EOF systemctl daemon-reload systemctl enable waydroid-firewall.service ```

Revision #14

Edited on
2024-03-12
Edited by user
apparatus

Revision #13

Edited on
2024-02-12
Edited by user
apparatus
## Info about your system that apps in Waydroid will know Apps installed in Waydroid will be able to see your CPU and system kernel. Since qubes use kernel provided by dom0 by default then apps in Waydroid can know that you're running Waydroid in Qubes OS (e.g. `6.7.3-1.qubes.fc37.x86_64`). To hide this you can use in-VM kernel instead: https://www.qubes-os.org/doc/managing-vm-kernels/#using-kernel-installed-in-the-vm

Revision #12

Edited on
2024-02-06
Edited by user
apparatus
You can copy files to/from there. You can copy files to/from there. Or you can set up shared folders like this: https://docs.waydro.id/faq/setting-up-a-shared-folder

Revision #11

Edited on
2024-02-05
Edited by user
apparatus
## Transfer files to/from Waydroid The Waydroid internal storage is located in this path: ``` /home/user/.local/share/waydroid/data/media/0/ ``` You can copy files to/from there.

Revision #10

Edited on
2024-02-05
Edited by user
apparatus
echo 'export PATH="/opt/venv/pyclip/bin:$PATH"' >> /etc/profile.d/python-venv.sh echo 'export PYTHONPATH="/opt/venv/pyclip/lib/python3.11/site-packages:$PYTHONPATH"' >> /etc/profile.d/python-venv.sh echo 'export PATH="$PATH:/opt/venv/pyclip/bin"' >> /etc/profile.d/python-venv.sh echo 'export PYTHONPATH="$PYTHONPATH:/opt/venv/pyclip/lib/python3.11/site-packages"' >> /etc/profile.d/python-venv.sh

Revision #9

Edited on
2024-01-02
Edited by user
apparatus
# Enable sound for the Waydroid qube To get the sound working in the Waydroid qube, for Qubes OS 4.2 you need to install `pipewire-qubes` package in Waydroid qube template: ``` apt install pipewire-qubes -y ``` In case you don't want for some Waydroid qubes to have sound (e.g. for protection against [profiling threat](https://www.kicksecure.com/wiki/Hardware_Threat_Minimization#Profiling_Threat) and tracking or increasing [attack surface](https://forum.qubes-os.org/t/attack-surface-of-templates/7869)) you can clone the `d12m-waydroid` template without sound to `d12m-waydroid-sound` template and install the sound package in `d12m-waydroid-sound` template. Then you can choose whatever the Waydroid qube should have the sound or not by setting the suitable template for it.

Revision #8

Edited on
2024-01-01
Edited by user
apparatus
``` ``` ---
``` ``` ---
* Run `waydroid-install-apk` (see above) with the path to the apk file e.g.: * Run `waydroid-install-apk` ([see above](https://forum.qubes-os.org/t/waydroid-template/23356#create-script-to-install-apk-from-the-terminal-13)) with the path to the apk file e.g.:

Revision #7

Edited on
2024-01-01
Edited by user
apparatus
# Create script to install apk from the terminal ``` cat << 'EOF' | tee /opt/bin/waydroid-install-apk WAYLAND_DISPLAY="wayland-1" XDG_SESSION_TYPE="wayland" DISPLAY=":1" waydroid app install $1 EOF chmod +x /opt/bin/waydroid-install-apk ```
At this point the template is configured and ready to be used. **At this point the template is configured and ready to be used.**
## Install apk in Waydroid To install apk in Waydorid AppVM run this command in its terminal: ## Install application in Waydroid In a 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 `waydroid-install-apk` (see above) with the path to the apk file e.g.:
WAYLAND_DISPLAY="wayland-1" XDG_SESSION_TYPE="wayland" DISPLAY=":1" waydroid app install /path/to/app.apk ``` Change `/path/to/app.apk` to the actual path of the apk you want to install in your qube. waydroid-install-apk /home/user/QubesIncoming/disp1629/F-Droid.apk ```

Revision #6

Edited on
2024-01-01
Edited by user
apparatus
You can download the clipnotify sources in the Waydroid template directly or in some other qube and transfer them to the Waydroid template. To download the sources directly in Waydroid template you'll need to install the additional packages unzip/git. Since unzip/git probably won't be used ever again in the Waydroid qube you may want to keep the Waydroid template minimal then you can download the sources in some other qube and transfer them to the Waydroid template. #### Option 1: Download the sources directly in Waydroid template
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 -o clipnotify-master.zip unzip -j clipnotify-master.zip -d clipnotify ``` or using git: ``` git config --global http.proxy http://127.0.0.1:8082 git clone https://github.com/cdown/clipnotify.git git config --global http.proxy "" ``` #### Option 2: Download the sources in some other qube and transfer them to Waydroid template Download and extract the clipnotify sources in some qube with network access: ```
In `d12m-waydroid` qube build and install clipnotify: After getting the sources in `d12m-waydroid` qube, move to the clipnotify sources directory in `d12m-waydroid` qube: If you followed `Option 1: Download the sources directly in Waydroid template`:
apt install build-essential libx11-dev libxtst-dev -y cd clipnotify ``` If you followed `Option 2: Download the sources in some other qube and transfer them to Waydroid template`: ```
``` Once you're in the sources directory, build and install clipnotify: ``` apt install build-essential libx11-dev libxtst-dev -y
# Update Waydroid image --- --- At this point the template is configured and ready to be used. # 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 # Additional information ## Update Waydroid image
# Install apk in Waydroid ## Install apk in Waydroid
# Change keyboard layout in Waydroid ## Change keyboard layout in Waydroid
Change keyboard layout with Ctrl+Space.Change keyboard layout with Ctrl+Space. # Troubleshootings ### 1. From Application menu, choose AppVM / Waydroid-Sway, BUT nothing displayed. **Solution:** Application menu, choose AppVM / xterm, in the displayed xterm, manually launch waydroid with this command to see the debug output: ``` sed "s|&>/dev/null||g" /opt/bin/sway-waydroid.sh | source /dev/stdin ``` ### 2. How to exit the AppVM ? **Solution:** From dom0 *Qubes Domain* traybar, for the AppVM, choose Shutdown.

Revision #5

Edited on
2024-01-01
Edited by user
apparatus
unzip clipnotify-master.zip mv clipnotify-master clipnotify unzip -j clipnotify-master.zip -d clipnotify

Revision #4

Edited on
2024-01-01
Edited by user
apparatus
Change `/path/to/app.apk` to the actual path of the apk you want to install in your qube.Change `/path/to/app.apk` to the actual path of the apk you want to install in your qube. # Change keyboard layout in Waydroid Settings -> Languages & input -> Physical keyboard -> wayland_keyboard Add layouts. Change keyboard layout with Ctrl+Space.

Revision #3

Edited on
2024-01-01
Edited by user
apparatus
https://docs.waydro.id/faq/get-waydroid-to-work-through-a-vm https://docs.waydro.id/debugging/troubleshooting#failed-to-start-clipboard-manager-service
for i in $(seq 1 10); for i in $(seq 1 3);
WAYLAND_DISPLAY="wayland-1" XDG_SESSION_TYPE="wayland" DISPLAY=":1" waydroid session stop &>/dev/null
WAYLAND_DISPLAY="wayland-1" XDG_SESSION_TYPE="wayland" DISPLAY=":1" waydroid session stop &>/dev/null

Revision #2

Edited on
2024-01-01
Edited by user
apparatus
Install `pyclip` required by Waydroid: Install X11 and Wayland clipboard cli tools:
apt install xclip wl-clipboard pip python3-venv -y python3 -m venv /opt/venv/pyclip source /opt/venv/pyclip/bin/activate pip install --proxy http://127.0.0.1:8082 pyclip deactivate echo 'export PATH="/opt/venv/pyclip/bin:$PATH"' >> /etc/profile.d/python-venv.sh echo 'export PYTHONPATH="/opt/venv/pyclip/lib/python3.11/site-packages:$PYTHONPATH"' >> /etc/profile.d/python-venv.sh ``` Links for reference: https://docs.waydro.id/faq/get-waydroid-to-work-through-a-vm https://github.com/waydroid/waydroid/issues/981#issuecomment-1778969058 apt install xclip wl-clipboard -y ```
## Install `pyclip` required by Waydroid ``` apt install xclip wl-clipboard pip python3-venv -y python3 -m venv /opt/venv/pyclip source /opt/venv/pyclip/bin/activate pip install --proxy http://127.0.0.1:8082 pyclip deactivate echo 'export PATH="/opt/venv/pyclip/bin:$PATH"' >> /etc/profile.d/python-venv.sh echo 'export PYTHONPATH="/opt/venv/pyclip/lib/python3.11/site-packages:$PYTHONPATH"' >> /etc/profile.d/python-venv.sh ``` Links for reference: https://docs.waydro.id/faq/get-waydroid-to-work-through-a-vm https://github.com/waydroid/waydroid/issues/981#issuecomment-1778969058