Android emulator does not boot on Ubuntu 15.04 (64bit) - emulation

When I start the emulator, the "phone" shows only a black screen. Nothing more happens. No loading, no pixels, no application nothing. Just a black screen.
Based on other forums i tried:
restart several times
install mesagl
install more c++ libs
start emulator without android studio
enable or disable "Use host gpu" option
limit emulator ram to 768mbyte
delete and recreate virtual device with several other api and abi
reinstall nvidia closed driver
Non of these helped.
Any other suggestions?

Related

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.

Hardware Acceleration issue with emulator on Android Studio

I installed Android Studio and fired up the default emulator (Nexus 5 API 23), but got the following error message:
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAXM must be updated (version 1.1.5 < 6.0.1).
It seems that a lot of people already encountered this issue and the solution would be to install Intel x86 Emulator Accelerator, but in my case, it is already installed.
Another thing I read is:
After you download it and make sure you run the setup located in: {SDK_FOLDER}\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm.exe
I'm on a 2015 retina Macbook though, so this is not an option.
Also when creating a new Virtual Device, the error message remains the same.
What can I do to get a working emulator?
Thanks in advance!
You should mount and run the IntelHAXM_1.1.4.dmg file located in {SDK_FOLDER}\extras\intel\Hardware_Accelerated_Execution_Manager
Actually problem is that HAXM is downloaded but not installed.
So you should run executable file and install new version of HAXM.
HAXM path: {SDK_FOLDER}\extras\intel\Hardware_Accelerated_Execution_Manager

HAX kernel module is not installed - AMD processor

I've recently installed Android Studio and I'm trying to run a Hello World app to see that everything works as it should. Which it evidently doesn't. I've followed every step on the Android Developer site for setting up Android Studio, yet I get this error when I try to run my app:
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!
I searched for a bit and realized that HAXM is for Intel processors, and I'm running an AMD processor. I tried installing the emulator Bluestacks as suggested in this thread but it didn't help at all. Has anyone got a clever solution to this problem?
You might as well uninstall HAXM, only works with Intel processors.
A lot of answers in this forum have pointed to using genymotion (https://www.genymotion.com/) with AMD processors
This is what you need to do to fix this issue:
1) Navigate to the following path:
C:\Users\Main\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager
2) Run intelhaxm-android.exe as an administrator.
3) Once the installation is complete, Run your project and you will be able to run android emulator on your machine.
Hope this helps.

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.)

Building AOSP and launching the emulator

I am trying to launch the emulator after building the Android source.
Right now, the setup is like, I am running a windows machine connecting through putty to my linux machine. I have downloaded my source in the linux machine and I have successfully built it.
When I am running the emulator using the command in
https://stackoverflow.com/a/9023141/539472
the emulator is launching but only the android image is coming. From there on the emulator is not completely booting. Its not going to launcher.
The logs are
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
Failed to create Context 0x3005
There are many posts with this error, they say that check if the graphics driver is installed. I have checked it and its installed.
What might be the problem ?
Putty is just terminal console, it has no graphics/windows it cant possibly display emulator. Emulator is application like Browser or GEdit. If you login to you linux machine directly using Ubuntu then it can show emulator application.

Resources