Maybe I’m just dumb but I can’t seem to get any Android emulator to work.
Running Sway in Wayland on unstable nixos.
I’ve followed the Wiki for Waydroid. I can get all the way to $ waydroid show-full-ui and I get no UI. I don’t get anything in the logs either.
Anyone?
Then for Genymotion. It uses QEMU which I already have installed, with a few VMs.
I try to run a test Genymotion Android VM and it complains about QEMU already being used and unable to start the VM. wtf?
Any clues from anyone using this on QEMU?
Very frustrated at the moment. Any help would be greatly appreciated
I’ve gotten it working, although to be honest, I have no idea how. I remember it being a pain, but I can’t piece together exactly what I did. I am also on Sway and unstable NixOS.
My only explicitly Waydroid related configuration is:
virtualisation.waydroid.enable = true;
Searching my shell history for waydroid, I see the following commands:
Doesn’t lend many hints unfortunately. When you say you get “no UI”, do you mean the command hangs and there’s no window? Is there a window, but it is black?
Re: Genymotion, I don’t believe Waydroid uses QEMU, so I can’t imagine it is related to this too much, but I could be wrong. Can you maybe get a screenshot or copy of the actual full error? Maybe there’s a hint hidden in there somewhere. I believe Genymotion will want to use KVM in particular, so you may need to make sure hardware virtualization extensions are enabled in your machine’s firmware.
P.S.: If you are using Virtualbox, this may prevent QEMU-KVM based virtualization software from working. If you want to be able to use both simultaneously, you might be interested in the virtualisation.virtualbox.host.enableKvm option, which enables a (somewhat experimental) Virtualbox patch to use KVM instead of Virtualbox’s own virtualization kernel extensions. (You may need to reboot after turning this option on, though.)
My first thought is that Waydroid is very odd with how the windowing works. I am pretty sure at least by default with show-full-ui it’s actually meant to take up the whole screen. Maybe you can try fullscreening that surface with $mod+f or whichever bindsym you might have for the fullscreen command? I wonder if it’s possible there’s some Android message box on a black background that’s just out of view, or something like that.
(You may indeed find a traditional Android emulator like Genymotion is indeed better for your purposes, though there are some ways to change the way Waydroid behaves/integrates. Hopefully we can get both of them to work.)
@jchw Well, I’ve got Virtbox running but Genymotion looks to fail to start because it can’t connect to a host-only network.
Trying to add one inside Virtualbox then gives a NS_ERROR_FAILURE (0X80004005)
So currently stuck between virtualbox and getting Genymotion to connect to it.
Error - VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory.
Have you had Genymotion running with the virtualisation.virtualbox.host.enableKvm option yourself?
Sorry to say that I have no recent experience with Genymotion (I don’t have an account…) and I may have led you astray here. I have used Virtualbox KVM with success on its own, not with Genymotion, but unfortunately I did indeed miss that it seems like creating a host-only network is broken; I just filed an upstream issue that will hopefully clarify things. It’s definitely an issue in the Virtualbox KVM patches, not your fault.
To be honest, I actually wasn’t even meaning to suggest using Virtualbox-KVM with Genymotion. I was guessing that you may be running Virtualbox, because running Virtualbox (even just having its kernel modules loaded on your machine) would be one reason why QEMU+KVM would fail to initialize, and in that case, using Virtualbox-KVM instead of regular Virtualbox would’ve allowed both of them to run at the same time with no conflict. If you were running Virtualbox, and now you are able to use Virtualbox-KVM, you can try to use QEMU+KVM with Genymotion again; QEMU+KVM should co-exist on the same machine as Virutalbox-KVM. On the other hand, if you haven’t tried running Genymotion with normal Virtualbox (that is, with enableKvm unset) that would be worth a try, too.
Sorry this has been so frustrating.
If you have the patience to spare, please feel free to dump the exact errors you get when trying to use Qemu as well, or if you happen to try it, regular Virtualbox. Even though I don’t really have much recent experience with Genymotion, I remain optimistic that we could get this working.
That’s strange, I would not have expected an embedded QEMU to have any issues with another copy of QEMU. Are you sure that is what the error is actually saying? It’s not that I don’t believe you, just curious about why exactly it doesn’t work.
I’m hoping to get an answer by reaching out. I tried digging through Virtualbox code but it’s pretty impenetrable.
I wonder what it means by “the same resources”. I can’t find another single reference to the exact phrase “Another QEMU process appears to be using the same resources” across the entire Internet, which is somewhat surprising.
Unfortunately I’m not really sure where to go from here. I think I need to set up a Genymotion account to see if I can figure anything else out. I’m also running QEMU+KVM virtual machines in the background with libvirt, so if there is any conflict it ought to hit me, too, and maybe I can figure out what resource it’s talking about.
@jchw Yeah I did the same search a few times. Nothing found which is bizarre.
I would have thought it commonplace for QEMU to already be installed on a developers machine prior to getting to Genymotion.
Why it doesn’t play nice in this situation is beyond. I don’t rule out the nix package has issues either but the few people I know that have tried Genymotion have given up with a shrug.
If you can figure out then you get this week’s ‘Nix Hero Award’
I have encountered the same Another QEMU process appears to be using the same resources, please stop it and retry. I’m running into this on X11. What’s strange is that I’m able to run other virtual machines just fine on VirtualBox. So it might not be a Wayland thing.
I’m glad to hear. Sorry I couldn’t get to this sooner, it was coming up on my TODO list to give it a go myself. I’ll take a look at that and hopefully we can figure out a way to get this fixed in Nixpkgs.