Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android emulator hanging on startup?

I've been modifying/editing parts of the Android platform, but have run into a problem when trying to test my edits. After making my changes to the platform source, I was able to successfully compile the source - thus creating system.img, ramdisk.img, and userdata.img.

When I go to test this in the emulator, the emulator just hangs on the "ANDROID_" screen, with the underscore blinking, but never seems to load. Any suggestions?

The command I used to run the emulator is as follows:

./emulator -system $HOME/android/platform/out/target/product/generic/system.img -ramdisk $HOME/android/platform/out/target/product/generic/ramdisk.img -data $HOME/android/platform/out/target/product/generic/userdata.img

Thanks,
Chris

like image 461
Chrisc Avatar asked Jun 23 '10 16:06

Chrisc


2 Answers

I had a similar problem. The emulator was unresponsive and Android Studio was unable to deploy and run the application. My solution was the following: 1. Open the AVD manager 2. On right hand side menu of the virtual device issue the commands "Stop" and "Wipe data" 3. Then, do a cold boot of the virtual device and voila, it came back to life.

like image 170
Jorge M. Londoño P. Avatar answered Oct 23 '22 19:10

Jorge M. Londoño P.


Try using adb logcat in the terminal to see what's happening with the emulator. When I did that I kept noticing

I/ServiceManager(  918): service 'media.audio_flinger' died
I/ServiceManager(  918): service 'media.player' died
I/ServiceManager(  918): service 'media.camera' died
I/ServiceManager(  918): service 'media.audio_policy' died

repeating every 10s or so. I tried enabling my cameras in the AVD and the emulator started working.

To enable the camera enter android avd in the terminal and set the front and back camera options.

like image 40
mujtaba Avatar answered Oct 23 '22 20:10

mujtaba