Waydroid: Difference between revisions

Brad (talk | contribs)
m Link to Wayland page
Genius (talk | contribs)
Undo revision 28926 by Mach50 (talk)
Tag: Undo
 
(10 intermediate revisions by 6 users not shown)
Line 36: Line 36:


You'll know it worked by checking the journal You should see "Started Waydroid Container".
You'll know it worked by checking the journal You should see "Started Waydroid Container".
$ sudo journalctl -u waydroid-container
$ sudo journalctl -u waydroid-container -e


Start Waydroid session
Start Waydroid session
Line 67: Line 67:
== Customization ==
== Customization ==


=== Running applications that differ from the current host architecture via libhoudini<ref>Need help with activating libhoudini for waydroid on NixOS
=== Running applications that differ from the current host architecture via libhoudini or libndk<ref>Need help with activating libhoudini for waydroid on NixOS


https://www.reddit.com/r/NixOS/comments/15k2jxc/need_help_with_activating_libhoudini_for_waydroid/</ref> ===
https://www.reddit.com/r/NixOS/comments/15k2jxc/need_help_with_activating_libhoudini_for_waydroid/</ref> ===


# Add NUR to your flake or shell or something like that base on [https://github.com/nix-community/NUR readme]
Run <code>nix shell github:nix-community/NUR#repos.ataraxiasjel.waydroid-script -c sudo waydroid-script</code>
# Add nur.repos.ataraxiasjel.waydroid-script to your packages, if you were using nixos then set it as a item in environment.systemPackages, HM then home.packages.
 
# Use  `sudo waydroid-script` to run the script
Or, alternatively, add <code>nur.repos.ataraxiasjel.waydroid-script</code> from the NUR to your flake or shell or NixOS <code>environment.systemPackages</code>, or HM <code>home.packages</code> or something like that based on [https://github.com/nix-community/NUR readme] and run <code>sudo waydroid-script</code>
# Select Android 11 >> Install >libhoudini, which the script only support libhoudini in this version.
 
In the TUI, select Android 13 > Install > libhoudini (or libndk, [https://github.com/casualsnek/waydroid_script/blob/fcb15624db0811615ea9800837a836c4777674bf/README.md#install-libndk-arm-translation which script author claims may be faster on AMD])


== Maintenance  ==
== Maintenance  ==
Line 100: Line 101:


== Tips and tricks ==
== Tips and tricks ==
=== Mount host directories ===
{{Warning|Parts of this instruction will only work with the latest waydroid-helper package in NixOS master and will be available with the next release 25.11}}Install and configure graphical application <code>waydroid-helper</code><syntaxhighlight lang="nix">
environment.systemPackages =  [ pkgs.waydroid-helper ];
systemd = {
  packages = [ pkgs.waydroid-helper ];
  services.waydroid-mount.wantedBy = [ "multi-user.target" ];
};
</syntaxhighlight>Enable the user service which is also required. Note that this is not persistent and needs to get started after reboot again.<syntaxhighlight lang="bash">
systemctl --user start waydroid-monitor
</syntaxhighlight>Now start <code>waydroid-helper</code> application and add a shared directory. As an example, source directory could be <code>/home/myuser/Public</code> and target directory <code>/home/myuser/.local/share/waydroid/data/media/0/NixOS</code>. Ensure that both directories already exist locally. After that you might need to restart the ''Waydroid'' container which is also possible with the graphical user interface.


=== GPS/Location forwarding ===
=== GPS/Location forwarding ===
Line 116: Line 130:
sh geobridge.sh --init
sh geobridge.sh --init
</syntaxhighlight>
</syntaxhighlight>
=== Notification forwarding ===
To forward notifications from the Waydroid container to the host system, [[KDE Connect]] can be used.
On a Gnome-desktop, add following to your system config and enable:<syntaxhighlight lang="nix">
programs.kdeconnect = {
  enable = true;
  package = pkgs.gnomeExtensions.gsconnect;
};
</syntaxhighlight>Open the application ''Extensions'' and enable ''Gsconnect'' plugin there.
Inside the Waydroid container, follow these steps:
* Download and install the [https://f-droid.org/en/packages/org.kde.kdeconnect_tp/ KDE Connect app]
* Open the app and and start pairing with the host machine
* You'll have to enable access to notifications by clicking on the corresponding entry in the permissions list inside the app
* If you get the system message "''Restricted setting / For your security, this setting is currently unavailable''", you'll have to enable restricted settings. Go to Android settings app, in the apps list select KDE connect and click in the upper right corner on the three dot menu to ''Allow restricted settings''
* You may have to reboot the Waydroid container for notification forward to work.


== Troubleshooting ==
== Troubleshooting ==