Waydroid: Difference between revisions

Onny (talk | contribs)
Camera forwarding: Add fix for AMD GPUs
Onny (talk | contribs)
 
(One intermediate revision by the same user not shown)
Line 117: Line 117:
</syntaxhighlight>
</syntaxhighlight>


=== Camera forwarding ===
=== V4L2 camera forwarding ===


Camera forwarding using V4L2 is not yet supported upstream, but can be achieved by using the Waydroid images of the [https://github.com/WayDroid-ATV Waydroid-ATV project]. Further we also need an unstable Waydroid version (>1.6.2) for running it.<syntaxhighlight lang="nix">
Camera forwarding using V4L2 is broken on upstream, but can be achieved by using the Waydroid images of the [https://github.com/WayDroid-ATV Waydroid-ATV project]. Further we also need an unstable Waydroid version (>1.6.2) for running it.<syntaxhighlight lang="nix">
disabledModules = [
disabledModules = [
   "virtualisation/waydroid.nix"
   "virtualisation/waydroid.nix"
Line 155: Line 155:
waydroid shell -- pm disable-user --user 0 com.google.android.gms.setup
waydroid shell -- pm disable-user --user 0 com.google.android.gms.setup
</syntaxhighlight>In case the camera access will crash the Waydroid container, there's a recent image which solves this on AMD GPUs. Download it and extract the contents to <code>/etc/waydroid-extra/images</code>. After that recreate the environment as mentioned above but only issue <code>waydroid init -f</code>.
</syntaxhighlight>In case the camera access will crash the Waydroid container, there's a recent image which solves this on AMD GPUs. Download it and extract the contents to <code>/etc/waydroid-extra/images</code>. After that recreate the environment as mentioned above but only issue <code>waydroid init -f</code>.
=== 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.


=== Running applications that differ from the current host architecture via libhoudini or libndk<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