Android Studio on Lubuntu guest in VirtualBox? - android-studio

I would like to use Android Studio on Lubuntu as guest in VirtualBox.
The installation works fine but I can't get the "hello world" app to run on any AVD (Android Virtual Device)
Lubuntu 32 bit:
ARM won't work, abd connection error
USB > AVD manager won't work
Lubuntu 64 bit:
It's complaining about VtX settings
What is the best environment? 32 of 64 bit? And what is the fastest and easiest way to test my app? AVD, ARM, USB (hardware device) or another VirtualBox with Android on it?

I'm having the same issue on Windows host as well.. I guess the issue here is that VirtualBox still lacks the ability to host VT-in-VT. Please see: https://www.virtualbox.org/ticket/4032

Related

Cannot install Android Emulator Hypervisor Driver for AMD Processors (installer)

Disabled HyperV via GUI as above.
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
Then made sure via powershell via above.
Yet when running emulator-check.exe hyper-v:
hyper-v:
2
Hyper-V is enabled
hyper-v
I assume this is the issue. Virtualization is enabled. I have tried manually installing batch file (not in android studio). I have tried disabling Virtual Machine Platform and Windows Hypervisor Platform to install and that also didn't work (re-enabled after). CPU is AMD Ryzen 5 5625U with Radeon Graphics. Android Studio and the command were done with admin.
1st enable virtualization and hyper-v from your motherboard BIOS settings.
Then from the GUI enable the following:
Hyper-V
Virtual Machine Platform
Windows Hypervisor Platform
And after that restart your windows machine.
What fixed this, was turning Virtualization OFF in the BIOS and then ON again. After doing this mulator-check.exe hyper-v showed hyper-v to be not installed, which is the expected output. I was then able to install the driver in Android Studio as usual.

How to configure KVM for Android Studio on Ubuntu?

No matter how I configure my system, Android Studio shows the "We have detected that your system can run the android emulator in an accelerated performance mode. Linuxed-based systems support virtual machine acceleration through the KVM. Search for install instructions for your particular Linux configuration hat KVM is enabled for faster Android emulator performance."
egrep -c '(vmx|svm)' /proc/cpuinfo gives 8
kvm-ok gives INFO: /dev/kvm exists
KVM acceleration can be used
grep kvm /etc/group gives kvm:x:108:currentLoggedInUser
How should I configure KVM correct on Ubuntu 19.10? And how could I tell if Android Studio is running the VM using KVM?
Thanks.
i had same issue, but the other way around. To make it work, first make sure you've enabled virtualization in the BIOS and added your username in libvirt.
Click cancel on the screen that shows Android KVM
Android Studio will offer you to two options. Choose the one "don't start the setup wizard" (not the recommended one), so it will take you to the welcome screen.
Start a new project as usual and Android Studio will say couldn't find the SDK.
Choose the libraries and emulators to download and the rest is the same as usual.

Using kvm with WSL (Trying to run Android emulator using WSL)

I am running Android Studio from WSL. When I try to use the emulator I get "/dev/kvm" not found. I have installed kvm and I have confirmed that vt-x emulation is enabled in my BIOS.
Is it possible to use kvm with WSL (Ubuntu)?
KVM only runs on an actual Linux kernel, not Windows Subsystem for Linux (which runs on a thin Linux emulation layer over the Windows kernel).
You can either run Android Studio on Linux natively, or use the Windows version of Android Studio (on Windows, only HAXM is supported).

Android Studio KVM Setting?

Put in KVM (Kernel-based Virtual Machine) into my 64 bit Ubuntu 14.04 LTS per:
https://help.ubuntu.com/community/KVM/Installation
In the terminal:
kvm-ok INFO: /dev/kvm exists KVM acceleration can be used
OK so the KVM is in.
When I run the Android Emulator there is no change from the way the Emulator ran before I put in the KVM.
I've looked in to the various settings within Android Studio, and I found nothing obvious about KVM.
Does Android Studio have a setting somewhere to enable KVM?
Android Studio 1.5 and 2.0 do not have such option any more.
Update: that is because the team has made KVM mandatory. And see comments from Google employees claiming that their new 2.0 emulator is also KVM-based.
Alright, so when you see the message (on Android Studio v2 and higher):
KVM is required to run this AVD.
/dev/kvm device: permission denied
Grant current user access to dev/kvm
What you can do (manually, since I haven't found anything in Android Studio) to fix this is:
Add your Linux user into the kvm group: sudo adduser your_linux_user kvm
If the group doesn't exist, download this package sudo apt install qemu-kvm and try to add your user again into the kvm group.
When the user has successfully been added into the KVM group, logout or restart and try opening Android Studio again.
This setting works totally fine in Ubuntu 18.04/18.10, but it should work in other distros as well.
You can do this:
Click on Run -> Edit Configurations and go to the Emulator tab
You can add it on "additional commandline options":
-qemu -enable-kvm
I'm not sure if there is also a GUI option somewhere though, or how to check if it is working or not.
I'd test the x86 image to see if it works any faster.
Downgrade to Android Studio 1.4 (delete Android Studio 1.5 installation, download zip from http://tools.android.com/download/studio/builds/1-4-0, follow installation instructions).
Follow Stuart Axon's instructions above.
Gabor as far as I can tell is correct (and addresses the OP's question) - the option to use this acceleration by starting the emulator from within Android Studio 1.5 has been removed.
(Weirdly, I don't seem to be able access the acceleration when starting the emulator from the command line once Android Studio 1.5 has been installed - but maybe I'm wrong.)

Is there a way to install windows server 2003 x64 over a VM?

I have been trying to install that but it produces an error saying that the processor is not compatible with x64. I tried VMWare Player and Microsoft Virtual PC. I also read about disabling virualization but it's not working.
By enabling virtualization from the BIOS setup of the main machine it worked!
Problem installing x64 guest OS with vmware Server
You can try with this, it reveals some very useful informations http://support.microsoft.com/windowsserver2003x64

Resources