Does Android emulator hang at startup?

I modified / edited parts of the Android platform, but ran into a problem while trying to verify my changes. After making changes to the platform source, I was able to successfully compile the source code, thereby 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 underline blinking but never loading. Any suggestions?

The command I used to start 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

+7
android android-emulator testing
source share
5 answers

The first start may take some time, especially on a slow machine, but otherwise try running the adb logcat command to view the log output. This will help you determine what the problem is.

Also, if you want to skip the delivery of all the parameters of the emulator, that is, the system, and the other, you can use the scripts supplied in the assembly folder. Run these commands from the root folder of an open source project:

 source build/envsetup.sh setpaths 

The first runs an envsetup script for Android, which provides several useful commands. The second installs all the paths necessary for developing the Android platform. Among them is the ANDROID_PRODUCT_OUT variable, which informs the emulator about where to look for assembly images. It is installed in the default folders that you specified above. After running setpath, you can simply start the emulator using your build by typing the emulator at the command prompt.

+8
source share

I had this problem and fixed it by removing the emulator and creating a new one. In the eclipse:

  • Menu Window β†’ Android SVK and AVD Manager
  • Select virtual devices (must be selected already)
  • Choose an emulator that creates problems
  • Edit to see the settings and remember them.
  • Remove emulator.
  • Create a new one, the same as the old.
  • Launch the emulator here using the start button.

It started about 30 seconds after I did it.

Usually the emulator starts in about 2-3 minutes for me. Then mysteriously stopped working. I saw the loading animation 30 minutes before I gave up. Rebooting my laptop did not help, which made me think that this was a problem with the emulator settings, and I came across this solution.

  • Note # 1: Doing this will destroy your user data.
  • Note # 2: As already mentioned, in the case when you create or edit the emulator, it is recommended to check β€œEnabled” for the snapshot, this allows you to speed up the launch next time.
  • Note # 3: My new emulator appeared in Chinese. It's weird weird :)
+10
source share

Try using adb logcat in the terminal to find out what happens with the emulator. When I did this, I continued to notice

 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 

repeated every 10 seconds or so. I tried to include my cameras in AVD, and the emulator started to work.

To turn on the camera, enter android avd in the terminal and set the front and rear camera parameters.

+6
source share

I usually need to restart it in order to start it. Today it will not reboot, no matter what. Logarithm execution. / adb consistently showed "device wait". Therefore, I restarted it using the Eclipse Android SDK and AVD Manager / Start ... (option), unchecking the "Run from snapshot" checkbox, and after a long load crushing it works.

+1
source share

My trick to running the emulator on a weak machine (RAM: only 1 GB) is to run it as the first thing after WinXP has finished loading. In addition, using an instance of the emulator with a lower resolution (fewer pixels on the display to emulate, for example, 240x400) also helped.

+1
source share

All Articles