Waydroid: Difference between revisions
imported>Fedx No edit summary |
imported>PedroHLC Enable it through the service because of the environment; add the GApps support parameters; Teach how to know if it worked; Add GPU Adjustments |
||
Line 5: | Line 5: | ||
== Install: == | == Install: == | ||
We will need to enable the WayDroid and LXC | We will need to enable the WayDroid and LXD options (the WayDroid module enables LXC). | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
Line 12: | Line 12: | ||
virtualisation = { | virtualisation = { | ||
waydroid. enable = true; | waydroid. enable = true; | ||
lxd.enable = true; | lxd.enable = true; | ||
}; | }; | ||
Line 18: | Line 17: | ||
</nowiki>}} | </nowiki>}} | ||
You'll need to finish the WayDroid install in your shell. | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# Rebuild NixOS config. | # Rebuild NixOS config. | ||
nixos-rebuild switch | nixos-rebuild switch | ||
# Fetch WayDroid images. | |||
# Fetch WayDroid images. | |||
# You can add the parameters "-s GAPPS -f" to have GApps support. | |||
sudo waydroid init | sudo waydroid init | ||
# | |||
sudo waydroid container | # Before the following steps, you might need to do some GPU adjustments. See the next section. | ||
# Start the WayDroid LXC container | |||
sudo systemctl start waydroid-container | |||
# You'll know it worked by checking the journal You should see "Started 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". | |||
waydroid session start | waydroid session start | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==GPU Adjustments== | |||
In case you have an NVIDIA card or an RX 6800 series, you'll need to disable GBM and mesa-drivers: | |||
{{file|/var/lib/waydroid/waydroid_base.prop|prop|<nowiki> | |||
ro.hardware.gralloc=default | |||
ro.hardware.egl=swiftshader | |||
</nowiki>}} | |||
==Usage== | ==Usage== |