Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Waydroid, anyone got it working?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
heikkikk
Apprentice
Apprentice


Joined: 05 Feb 2008
Posts: 220

PostPosted: Thu Mar 23, 2023 3:05 pm    Post subject: [Solved] Waydroid, anyone got it working? Reply with quote

Hi.
I wonder if anyone got app-containers/waydroid working.
Any hints on how to get it working are welcome.


waydroid session start
[17:04:41] OSError: container failed to start



I have:
app-containers/waydroid-1.4.0::guru USE="systemd -apparmor" PYTHON_SINGLE_TARGET="python3_10 -python3_9 -python3_11" 0 KiB


Last edited by heikkikk on Thu Mar 23, 2023 9:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31257
Location: here

PostPosted: Thu Mar 23, 2023 3:15 pm    Post subject: Reply with quote

Moved from Desktop Environments to Unsupported Software.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
heikkikk
Apprentice
Apprentice


Joined: 05 Feb 2008
Posts: 220

PostPosted: Thu Mar 23, 2023 9:02 pm    Post subject: Reply with quote

Got it working. Added this to package.use:
app-containers/lxc apparmor
app-containers/waydroid apparmor
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31257
Location: here

PostPosted: Thu Mar 23, 2023 9:09 pm    Post subject: Reply with quote

If you don't use apparmor you can follow instructions
Code:
   if ! use apparmor; then
      ewarn "If you use app-containers/lxc without apparmor, make sure you deleted or commented out in waydroid LXC config"
      ewarn "(generated after waydroid init) in /var/lib/waydroid/lxc/waydroid/config the following string:"
      ewarn "lxc.apparmor.profile = unconfined"
      ewarn "or waydroid experiences crash during launch"
      ewarn "See also https://github.com/waydroid/waydroid/issues/652"
   else

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
heikkikk
Apprentice
Apprentice


Joined: 05 Feb 2008
Posts: 220

PostPosted: Fri Mar 24, 2023 4:49 pm    Post subject: Reply with quote

Thanks :) Will try that.
Back to top
View user's profile Send private message
Dragonlord
Guru
Guru


Joined: 22 Aug 2004
Posts: 446
Location: Switzerland

PostPosted: Tue Oct 17, 2023 11:45 pm    Post subject: Reply with quote

I'm trying to get waydroid working too but without any success so far. The problem seems to be an impossible permission situation.

"waydroid init" is required to be run as root. Using "su" to become root and running the command works.

"waydroid show-full-ui" is required to be run by user. If run by root I get an error "ERROR: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.". If I run it though as user I get the error "ERROR: WayDroid is not initialized, run "waydroid init"".

If I try to run "waydroid init" as user I though get "ERROR: Action "init" needs root access".

It is impossible to satisfy all these conditions at once. How is one supposed to run waydroid on GenToo?
_________________
DragonDreams: Leader and Head Programmer
Back to top
View user's profile Send private message
lindegur
Apprentice
Apprentice


Joined: 14 Aug 2004
Posts: 292
Location: Swiss mountains

PostPosted: Sat Nov 11, 2023 8:43 am    Post subject: Reply with quote

I also try to run waydroid. My know how on wayland and waydroid is pretty low.

During emerge I observed missing kernel options, additionally there are Android binder options.
So I updated my kernel.
I observed two new groups dnsmasq, lxc, so I added my regular user to it.
After installation I did
Code:
emerge --config app-containers/waydroid
instead of
Code:
waydroid init
as root and it worked fine.
I did
Code:
rc-service wayland start

and from the user shell
Code:
waydroid session start
this however gives me DBus.Error.FileNotFound
I do not have "needs root access" errors

I switched to SDDM and the DBus error is gone. But there is new RuntimeError: Command failed: % /usr/lib/waydroid/data/script/waidroid-net.sh start
Code:
lxc-checkconfig
shows me still a lot of missing network related kernel options.

I guess fixing them with a new kernel is the next step?
Or does
Code:
waydroid session start
create some error logs?
Back to top
View user's profile Send private message
an7h
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jan 2018
Posts: 92

PostPosted: Sun Nov 12, 2023 12:47 pm    Post subject: Reply with quote

@Dragonlord
@lindegur


Here's pretty much everything required by Waydroid that isn't enabled in sys-kernel/gentoo-sources by default:
https://forums.gentoo.org/viewtopic-t-1165699.html

Notice that some options MUST be disabled in order for Waydroid to work correctly.

I also recommend emerging =app-containers/waydroid-9999 from the xira overlay. In the link above I mention the guru overlay, but this xira package allows updating to the latest version without issues (at least for me). Either way, when I was trying to get it to work properly, most problems would occur exactly because the kernel wasn't set up correctly. It was easy to confirm this by running Waydroid under with sys-kernel/gentoo-kernel-bin . Unfortunately the official documentation barely mentions anything about setting up a kernel for waydroid, which is why I posted a separate thread here on the forums.
_________________
If dreams were horses, beggars would ride.
Back to top
View user's profile Send private message
lindegur
Apprentice
Apprentice


Joined: 14 Aug 2004
Posts: 292
Location: Swiss mountains

PostPosted: Sun Nov 12, 2023 7:49 pm    Post subject: Reply with quote

New Kernel with many new options, probably I will test sys-kernel/gentoo-kernel-bin es well but still same error.
Code:
waydroid session start
fails with the script
Code:
/usr/lib/waydroid/data/scripts/waydroid-net.sh start

fails. It should be possible to debug this script to see a bit more. I use OpenRC and Weston.


Last edited by lindegur on Sun Nov 26, 2023 2:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
an7h
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jan 2018
Posts: 92

PostPosted: Mon Nov 13, 2023 7:49 am    Post subject: Reply with quote

@lindegur
You should try waydroid with sys-kernel/gentoo-kernel-bin just to see if this is an issue with the kernel config or not. Just to narrow down the source of the problem. If it works with sys-kernel/gentoo-kernel-bin , then there's something wrong with the kernel configuration. Earlier I would get that error when something wasn't enabled withing the netfilter. Also you can check the log by typing in waydroid log
_________________
If dreams were horses, beggars would ride.
Back to top
View user's profile Send private message
lindegur
Apprentice
Apprentice


Joined: 14 Aug 2004
Posts: 292
Location: Swiss mountains

PostPosted: Sun Nov 26, 2023 3:46 pm    Post subject: Reply with quote

sys-kernel/gentoo-kernel-bin works. I get
Code:
waydroid session start
[16:06:40] Android with user 0 is ready
[16:06:40] Established ADB connection to Waydroid device at 192.168.240.112.

Now some work to do is finding out the missing kernel configs.
And not to be discussed here: How to mouse and keyboard the android apps under weston (or an alternative as sway, or ....).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum