Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android emulator64-x86 hangs during the boot process

I'm using a 64bits Debian and when I try to run this:

$ emulator64-x86 -verbose -avd cocos2dx-emulator -gpu on -qemu -m 2047 -enable-kvm

The process just hangs and the only way to stop it is using kill -9, these are the last output lines it prints:

[...]
emulator:     trying to find: /home/victor/lab/androidr16/android-sdk-linux/tools/bios.bin
emulator:     trying to find: /home/victor/lab/androidr16/android-sdk-linux/tools/lib/pc-bios/bios.bin
emulator:     trying to find: /home/victor/lab/androidr16/android-sdk-linux/tools/vgabios-cirrus.bin
emulator:     trying to find: /home/victor/lab/androidr16/android-sdk-linux/tools/lib/pc-bios/vgabios-cirrus.bin

If I use emulator-x86, it works fine:

$ emulator-x86 -verbose -avd cocos2dx-emulator -gpu on -qemu -m 2047 -enable-kvm
[...]
emulator:     trying to find: /home/victor/lab/androidr16/android-sdk-linux/tools/bios.bin
emulator:     trying to find: /home/victor/lab/androidr16/android-sdk-linux/tools/lib/pc-bios/bios.bin
emulator:     trying to find: /home/victor/lab/androidr16/android-sdk-linux/tools/vgabios-cirrus.bin
emulator:     trying to find: /home/victor/lab/androidr16/android-sdk-linux/tools/lib/pc-bios/vgabios-cirrus.bin
emulator: autoconfig: -scale 1
emulator: Could not open file: (null)/system/build.prop: No such file or directory
emulator: sent '0012host:emulator:5555' to ADB server
[...]

I don't have any clue about what's going on and I'm not able to find any possible related errors in the system logs.

Any ideas?

like image 226
Victor Henriquez Avatar asked Nov 07 '13 10:11

Victor Henriquez


1 Answers

A similar bug has been filed in AOSP (see below), although most of us experience the same result with emulator-x86 as well.

As a workaround, try to uninstall KVM and see if the emulator runs. It will obviously be slower since it's not using the VT extensions of your CPU, but it may narrow the source of the problem.

Issue 33817: emulator-x86 + kvm triggers an endless loop in qemu-setup.c https://code.google.com/p/android/issues/detail?id=33817

Then again, you might only need to run the 32-bit emulators and this might not be an issue at all.

Edit: The issue appears to be caused by a clone() in pulseaudio code called from external/qemu/audio/paaudio.c. A patch that adds the BEGIN_NOSIGALRM guard is available on the Issue 33817 thread, post 16: https://code.google.com/p/android/issues/detail?id=33817#c16

like image 195
thinkmassive Avatar answered Oct 20 '22 11:10

thinkmassive