Waydroid: Difference between revisions

imported>Zeorin
Waydroid can be run on X11 inside a nested Wayland session
Weijia (talk | contribs)
m s/WayDroid/Waydroid/g
Line 1: Line 1:
[https://waydro.id WayDroid] is an application which uses LXC containers to run Android applications on a non-Android system.  
[https://waydro.id Waydroid] is an application which uses LXC containers to run Android applications on a non-Android system.  


{{Warning|WayDroid requires a Wayland desktop session and cannot be used on X11 directly, but can be run in a nested Wayland session, using e.g. [https://www.hjdskes.nl/projects/cage cage].}}
{{Warning|Waydroid requires a Wayland desktop session and cannot be used on X11 directly, but can be run in a nested Wayland session, using e.g. [https://www.hjdskes.nl/projects/cage cage].}}
{{Warning|Installing WayDroid on your system before running nixos-generate-config will create unnecessary fstab entries that may interfere with system functionality.}}
{{Warning|Installing Waydroid on your system before running nixos-generate-config will create unnecessary fstab entries that may interfere with system functionality.}}


== Installation ==
== Installation ==


Enable WayDroid in your system configuration:
Enable Waydroid in your system configuration:


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
Line 15: Line 15:




After rebuilding and switching, finish the WayDroid install in your shell.  
After rebuilding and switching, finish the Waydroid install in your shell.  


<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
Fetch WayDroid images.
Fetch Waydroid images.
You can add the parameters "-s GAPPS -f" to have GApps support.
You can add the parameters "-s GAPPS -f" to have GApps support.
$ sudo waydroid init
$ sudo waydroid init
Line 30: Line 30:


<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
Start the WayDroid LXC container
Start the Waydroid LXC container
$ sudo systemctl start waydroid-container
$ sudo systemctl start waydroid-container


Line 36: Line 36:
$ sudo journalctl -u waydroid-container
$ sudo journalctl -u waydroid-container


Start WayDroid session
Start Waydroid session
You'll know it is finished when you see the message "Android with user 0 is ready".
You'll know it is finished when you see the message "Android with user 0 is ready".
$ waydroid session start
$ waydroid session start
Line 98: Line 98:
=== Linux 5.18+ ===
=== Linux 5.18+ ===


Linux 5.18 and later removed ashmem in favor of memfd, so you may need to tell WayDroid (1.2.1 and later) to use the new module:
Linux 5.18 and later removed ashmem in favor of memfd, so you may need to tell Waydroid (1.2.1 and later) to use the new module:
{{file|/var/lib/waydroid/waydroid_base.prop|prop|<nowiki>
{{file|/var/lib/waydroid/waydroid_base.prop|prop|<nowiki>
sys.use_memfd=true
sys.use_memfd=true
Line 111: Line 111:
According to [https://github.com/waydroid/waydroid/issues/536 an upstream issue], Android might fail to display special characters correctly.
According to [https://github.com/waydroid/waydroid/issues/536 an upstream issue], Android might fail to display special characters correctly.


=== WayDroid interferes with suspend/hybernation ===
=== Waydroid interferes with suspend/hybernation ===


According to [https://github.com/waydroid/waydroid/issues/168 an upstream issue], WayDroid might interfere with suspend or hybernation. You might have to stop the Android session and container to suspend your machine correctly.
According to [https://github.com/waydroid/waydroid/issues/168 an upstream issue], Waydroid might interfere with suspend or hybernation. You might have to stop the Android session and container to suspend your machine correctly.


=== Clipboard sharing ===
=== Clipboard sharing ===