Waydroid: Difference between revisions
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 |
imported>PedroHLC m Teach how to override width |
||
Line 58: | Line 58: | ||
# Enter the LXC shell | # Enter the LXC shell | ||
sudo waydroid shell | sudo waydroid shell | ||
# Overrides the full-ui width | |||
waydroid prop set persist.waydroid.width 608 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also:== | ==See Also:== | ||
[https://wiki.archlinux.org/title/Waydroid Arch Wiki] | [https://wiki.archlinux.org/title/Waydroid Arch Wiki] |
Revision as of 15:12, 8 May 2022
WayDroid is an application which uses LXC containers to run Android applications on a non-Android system.
Install:
We will need to enable the WayDroid and LXD options (the WayDroid module enables LXC).
/etc/nixos/configuration.nix
{ pkgs, ... }:
{
virtualisation = {
waydroid. enable = true;
lxd.enable = true;
};
}
You'll need to finish the WayDroid install in your shell.
# Rebuild NixOS config.
nixos-rebuild switch
# Fetch WayDroid images.
# You can add the parameters "-s GAPPS -f" to have GApps support.
sudo waydroid init
# 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
# You'll know it is finished when you see the message "Android with user 0 is ready".
waydroid session start
GPU Adjustments
In case you have an NVIDIA card or an RX 6800 series, you'll need to disable GBM and mesa-drivers:
/var/lib/waydroid/waydroid_base.prop
ro.hardware.gralloc=default
ro.hardware.egl=swiftshader
Usage
# Start Android UI
waydroid show-full-ui
# Start an Android app
waydroid app start <application name>
# Install an Android app
waydroid app install </path/to/app.apk>
# List Android apps
waydroid app list
# Enter the LXC shell
sudo waydroid shell
# Overrides the full-ui width
waydroid prop set persist.waydroid.width 608