void-packages
void-packages copied to clipboard
New package: waydroid-1.3.0
Testing the changes
- I tested the changes in this PR: YES
New package
- This new package conforms to the quality requirements: YES
Local build testing
- I built this PR locally for my native architecture
-
x86_64-glibc
/x86_64-musl
-
i686
(tested withlinux5.15
&linux5-18
, both for some odd reason needed a rebuild twice, they failed oncd ${DESTDIR}/usr/lib/modules/${_kernver}
in their templates initially) -
aarch64
(tested by @CameronNemo and @Johnnynator, thanks!)
-
To-Do
Test running Waydroid on the following supported archs:
-
armv7l
(glibc or musl)
Supersedes #33135 and closes #33133.
In the PBP config when I was testing Anbox I used CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
, but it seems like you are leaving that blank. Any reason to go one way or the other? Do you expect any issues if I use the PBP config as is? (see relevant configs below)
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
# CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set
@CameronNemo those would work fine as well; I left CONFIG_ANDROID_BINDER_DEVICES
as blank as to not cause unnecessary clutter in /dev
when the binder devices aren't needed (Waydroid automatically manages these via binderfs
).
Btw enable CONFIG_ASHMEM
if you can (<=5.17 kernel), without that some Android apps may crash upon launch.
Tried on the PBP after adding PSI to the config, and did not get desired results. When activating the UI, just got visual glitches. edit: oh and ashmem is indeed enabled.
When activating the UI, just got visual glitches.
You could enable software rendering to workaround this.
https://docs.waydro.id/faq/get-waydroid-to-work-through-a-vm
I gave it a quick test on a pbp, only issue was this, networking and everything else did seem to work.
@CameronNemo you could perhaps try the Android 11 images courtesy of aleasto, they've got mesa 22.1 which could be enough to fix the graphical issues.
Since installing the images seems to be a bit finicky I'd recommend the following to upgrade from the vanilla A10 images you likely waydroid init
'ed with:
rm /var/service/waydroid-container
reboot
# in case you already enabled swrast, undo it:
sed -i /var/lib/waydroid/waydroid_base.prop \
-e '/^ro.hardware.gralloc=/ s/default/gbm/' \
-e '/^ro.hardware.egl=/ s/swiftshader/mesa/'
images_url=https://sourceforge.net/projects/aleasto-lineageos/files/LineageOS%2018.1/waydroid_arm64
mkdir -p /usr/share/waydroid-extra/images
curl -L $images_url/system.img/download -o /usr/share/waydroid-extra/images/system.img
curl -L $images_url/vendor.img/download -o /usr/share/waydroid-extra/images/vendor.img
sed -i /etc/gbinder.conf /etc/gbinder.d/anbox.conf \
-e '/^ApiLevel/ s/29/30/' -e 's/aidl2/aidl3/g'
waydroid init -f
ln -s /etc/sv/waydroid-container /var/service
Let me know how it goes!
Config for kernel 5.{15,18} has been merged. Kernel 5.10 will be merged soon. Please drop them from PR.
Do you have any tips for making network works in waydroid? I can't have internet access inside Android.
@sgn Which architecture and kernel (package)?
You could try installing nftables
(if it already isn't) and setting LXC_USE_NFT="true"
in /usr/lib/waydroid/data/scripts/waydroid-net.sh
(I've considered making this change in packaging as well to use nftables
when available and fallback to iptables
if not).
Otherwise is there anything interesting in waydroid log
possibly related to networking?
It could also perhaps just be missing a default route on the Android container vnic side so you could check if https://wiki.postmarketos.org/wiki/Waydroid#Networking helps
I think one time I had some dnsmasq instance hanging around mucking things up. I just brought waydroid down, deleted the bridge, and killed the process. Then relaunched waydroid.
Yes, I have dnsmasq
running. However, with dnsmasq
running, waydroid
couldn't be bringed up anyway.
When I stop dnsmasq
, waydroid could be up but no networks is available. waydroid log
shows no interesting log.
@sgn Which architecture and kernel (package)?
x86_64
, with musl
, and kernel 5.18
You could try installing
nftables
(if it already isn't) and settingLXC_USE_NFT="true"
in/usr/lib/waydroid/data/scripts/waydroid-net.sh
(I've considered making this change in packaging as well to usenftables
when available and fallback toiptables
if not).
We could make a configure files for it and source it with waydroid-net.sh
script. Editting /usr/...
is not nice.
Otherwise is there anything interesting in
waydroid log
possibly related to networking?
Nope.
It could also perhaps just be missing a default route on the Android container vnic side so you could check if https://wiki.postmarketos.org/wiki/Waydroid#Networking helps
Marking as a draft for now until @sgn's networking issue is solved, I'd probably have to reproduce the issue on my end somehow to have a chance at solving it. If you find a minimal set of packages/enabled services/configuration that causes the problem I'd much appreciate it!
Also 1.3.0 got tagged and waydroid
package needs to be updated, changed to build_style=gnu-makefile
and re-tested.
My issue with network has been resolved.
@sgn Oh? What solved it, LXC_USE_NFT="true"
? If so I think we should make it the default way of configuring networking, I didn't see any problems with using that instead of iptables
way myself (and it still fallbacks to iptables
if you don't have nftables
package installed).
Yeah, nftabls seems to be easier to work with. I think we can make nftables as default.
Anyway, can you patch the waydroid-net.sh
to source some configuration from let's say /etc/waydroid/net.conf
to choose firewall setting. /usr
is meant to be readonly.
@sgn I don't think that makes sense (yet), IF someone really needs to disable LXC_USE_NFT
(after being enabled by default and still falling back to iptables
if nftables
package isn't installed) could we make a new issue on this repo and assign me to it?
Since it technically (based on my testing at least) works with or without nftables
package installed I'll add a note to the README.voidlinux
about it being another way the networking could be setup, or should I just make waydroid
depend on nftables
?
If you don't make nftables
default, patch to read a config please.
With a config file, I think a readme is not necessary.
(Either way, I really think there should be a config file).
@sgn Did you already have nftables
installed from before trying Waydroid? All LXC_USE_NFT="true"
does is it allows the network setup script to also potentially use nftables
if installed instead of iptables
default (see the use_nft()
function) which I completely agree we should set.
I could just force installation of nftables
(add it to waydroid
depends) as well if you think that's better to make sure everyone uses that instead of potentially iptables
for Waydroid network configuration.
Btw the README.voidlinux (in this PR) has a bunch of content already, if I don't just add dependency on nftables
I would've added a note it is another way to setup the networking instead of iptables
default.
I feel like a dependency on nftables is fine. It is not like waydroid is some core package, and nftables is quite unobtrusive.
nftables
as hard dependencies is fine. The real gem is allowing incoming and forwarding traffic from waydroid. Which I always forgetting to set up.
@CameronNemo Regarding your previously seen graphical issues on PBP, may you also try https://docs.waydro.id/debugging/known-issues#graphical-issues. as well? I saw this helped someone but I don't know if they had more than one GPU
Thanks for the tip, that indeed fixed it on the PBP. My device actually matched what was in the docs exactly.
Just tested this, and apart from networking not working ootb, this is is good! Maybe aquick mention to check the arch wiki or something like that in the readme.voidlinux, for those where networking needs additional setup?
@jcgruenhage What did you need to change for networking to work? I'm just wondering if I can fix the packaging or if it now requires to also add a patch to source a config file in /usr/lib/waydroid/data/scripts/waydroid-net.sh
so you can change things if needed without having to edit stuff under /usr
...
See https://wiki.archlinux.org/title/Waydroid#Network, I added those three firewall rules.
@jcgruenhage Oh, I suppose another firewall layer and who knows what could mess with that yes, but the README.voidlinux
already links to docs.waydro.id
and a search there for firewall
brought me to https://docs.waydro.id/debugging/networking-issues#checking-for-firewalls (under Debugging
> Networking Issues
) which seems to have the exact same info already; If needed I'd rather have the generic docs improved so there's no need to link to other distro's wiki pages.
@CameronNemo @Johnnynator One more thing, can you try setting up Waydroid from scratch again with the tool version 1.3.0
that's here now? since commit https://github.com/waydroid/waydroid/commit/fb349c8 the GPU node should automatically be correctly selected by default so there should be no need to do manual steps like in that previously linked wiki page