Waydroid template

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

Thanks the fixed values helped!

i’ve tested and works fine, magisk too, i’ve tried all of the scripts you shared just now from github and could not for the life of me get snapchat to work, it freezes at launch.
is there another way you recommend? for running snapchat on qubes

i had by accident install microg on top of an iso that already has gapps, it corrupted playstore and some g services, while the iso still runs, any suggestion to fix the g apps crashing?

I don’t think it’s a problem specifically with Qubes OS. I think it’s a general problem with snapchat in android VM.
You can test snapchat on Waydroid installed on some general Linux OS and see if it’ll work there.
If it’ll work then this should be issue specific to Qubes OS.
If it won’t work then it’s a general issue with snapchat on Waydroid.
It’d be better to ask for pointers about running snapchat in Waydroid github issue.

The rpm version of waydoid on debian as an example?

I mean installing Waydroid not in Qubes OS VM but e.g. in plain Debian installed on your PC.

how would that make a difference?

I don’t know, but there could be some differences.
If there is no difference and snapchat is not working on Waydroid installed on plain Debian as well then it’s an issue with Waydroid and to fix it it’d be better to seek advice in Waydroid github issue instead of Qubes OS forum.

I have executed all the steps with debian-12-minimal template as described. It worked. :smiley:

Next, I did it again in a new template vm and before executing all the steps, I executed the line bellow to use Nautilus with “Copy to other qube” menu enabled.
sudo apt-get install --no-install-recommends nautilus qubes-core-agent-nautilus zenity -y

At this point: “Install pyclip required by Waydroid” the Nautilus “Copy to other qube” menu disappears.

Any way to to make it work with Nautilus “Copy to other qube” menu enabled?

Thanks.

I guess the links to the python binary in the /opt/venv/pyclip/bin are causing this issue.
Change this:

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

To this:

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

Now it should work.
I’ve also updated the guide.

1 Like

I have recreated the templateVM and I confirm it is working with Nautilus “Copy to other qube” menu.

Thanks for the fix!

what about device identifiers? how well does it ‘hide’ t?

No idea, better to ask this in the Waydroid matrix/telegram channel:
Waydroid | Android in a Linux container

i have not tested waydoid and checked what info it obtains and gives to apps as of now, but with android86 it obtains some exact hardware info like CPU which is not good, so i just threw the question out there to see what you know based off of your personal experience, thanks for the suggestion regarding their telegram group, I’ll take that into consideration, and by the way, you can check your self by getting “device info” app, from the store or as an APK, give it permissions if needed, and you can check what kind of info it gets about the hardware, hopefully if it can be counter measured with root perhaps?, would be very helpful.

It’ll show your CPU and system kernel.
Since it’ll use kernel provided by dom0 by default then apps in Waydroid can know that you’re running Waydroid in Qubes OS. To hide this you can use in-VM kernel:

what about CPU spoofing? if switching to a vm kernel? any other possible identifiers?

I don’t know.

this thread has been up since 2015 and the change has not been introduced yet, crazy

1 Like

This is old, but talks about other possible problems with xen changing the CPUID: https://xenbits.xen.org/people/andrewcoop/2016-Summit/cpuidlevel.pdf

I didn’t fully read your thread, but wanted to make sure that you know that the instructions ( xl.cfg - xl domain configuration file syntax ) say that you can add “cpuid=” to
/etc/libvirt/libxl/{qube name}.cfg

/etc/libvirt/libxl/{qube name}.cfg is auto-generated, so you would probably want to change the template (which i believe is /usr/share/qubes/templates/libvirt/xen.xml , but don’t quote me on that one)

Changing the template should change it for all the VMs except dom0 (which would be a good thing, so that dom0 knows what the actual processor bugs are)

There is also a way to change the template for a specific VM, but i don’t remember how at the moment. (it might be a new 4.2 feature?)

Anyway, I have not done this myself, but am interested in privacy enhancements, so wanted to make sure you knew about this.

If your up for it, you could try doing it yourself and see how it goes, and if it works, then create a “How to set your CPUID for a AppVM Guide”, getting other people on board and possibly ending up with a well tested procedure after a while.

Good luck!