Slow Android emulator
36
I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?

Even if it starts and loads the home screen, it is very sluggish. I have tried the Eclipse IDE in Galileos, and Ganymede.
improve this question | comment
Hubert Reynolds V Created at: 2013-11-13 17:07:04 UTC By Hubert Reynolds V
The emulator is really slow. On my 3.6Ghz Core 2 Duo it also takes forever... - Evalyn Parker
Intel Core 2 Duo @ 2GHz, 4GB RAM - I'm typing this message while waiting for the emulator to run an application I started 15mins ago... I am not sure if it'll run at all. - Betty Koch
the greatest part is when you start using OpenGL in your app. You'll get 4 or 5 fps from the emulator MAX, even when it runs at 20fps smoothly on the device... - Keira O'Keefe
A celeron processor with just over a gig of ram is not a very powerful setup, presumably while also running eclipse which can use a huge amount of memory. The emulator does have some speed issues, but your machine isn't helping. - Abbie Wilderman
See note below on saving snapshots.  As for general slowness, keep in mind the emulator is running a large amount of Java code, that's compiling to ARM, that's calling into a software emulated graphics device, all emulated on an x86 desktop OS.  I love how fast the iPhone emulator is, but that's because you're compiling your app to x86.  Android lets you run it (slowly) exactly how it will run on the device, including all your JNI and ARM NEON.  That said, would love a fast pure java 'emulation' environment with the Dalvik VM retargeted to x86, for most people's needs. - Oma Barton
30 Answers
0
On a 3.4 GHz quad core 6 GB of RAM, Windows 7, the emulator was unusably slow!
I downloaded Launcher-Pro.apk through the emulator, installed it and set it as the default launcher. It doubled my emulation speed! The screens load much smoother and faster. It doesn't seem to download in 2.1 or 2.2, only in 2.0.
0
The emulator seems to slow itself down when idle.  This is made apparent by rapidly mousing over the keys on the side and observing the light-up responses.  As a workaround, I pass -icount auto to qemu when starting the emulator.  You can make a batch file called my_avd.bat to do it for you:

emulator @my_avd -no-boot-anim -qemu -icount auto

@foo -- launch a virtual device named 'foo'
-no-boot-anim -- disable animation for faster boot
-qemu args... -- pass arguments to qemu
-icount [N|auto] -- enable virtual instruction counter with 2^N clock ticks per instruction
This made animations buttery smooth and sped up adb install tenfold.
0
I installed LauncherPro APK from their website and my emulator got at least twice as fast. The system is Debian 6.0 (squeeze).
0
Android Development Tools (ADT) 9.0.0 (or later) has a feature that allows you to save state of the AVD (emulator) and you can start your emulator instantly. You have to enable this feature while creating a new AVD or you can just create it later by editing the AVD.

Also I have increased the Device RAM Size to 1024 which results in very fast emulator.

Refer the given below screenshots for more information.


  Creating a new AVD with the save snapshot feature.





  Launching the emulator from the snapshot.



0
Try Android x86. It's much faster than the Google Android emulator. Follow these steps:

Install VirtualBox.
Download the ISO file that you need.
Create a virtual machine as Linux 2.6/Other Linux, 512 Mb RAM, HD 2 GB. Network: PCnet-Fast III, attached to NAT. You can also use a bridged adapter, but you need a DHCP server in your environment.
Install Android x86 on the emulator, run it.
Press Alt+F1, type netcfg, remember the IP address, press Alt+F7.
Run cmd on your Windows XP system, change the directory to your Android tools directory, type adb connect <virtual_machine_IP>.
Start Eclipse, open the ADT plugin, find the device, and enjoy!
0
HAXM Speeds Up the Slow Android Emulator

HAXM stands for - "Intel Hardware Accelerated Execution Manager"

Currently it supports only Intel® VT [Intel Virtualization Technology]

The Android emulator is based on QEMU; The interface between QEMU and the HAXM driver on the host system is designed to be vendor-agnostic.



Steps for Configuring Your Android Development Environment for HAXM

Update Eclipse:
Make sure your Eclipse installation and the ADT plug-in are fully up to date.
Update your Android Tools:
After each Eclipse plug-in update, it is important to update your Android SDK Tools. To do this, launch the Android SDK Manager and update all the Android SDK components. To take advantage of HAXM, you must be on at least release version 17.


Download the x86 Atom System Images: Follow the below Pic
Download the Intel Hardware Accelerated Execution Manager Driver: Follow the below Pic


Install the HAXM Driver by running "IntelHaxm.exe".
It will be located in one of following locations:

C:\Program
Files\Android\android-sdk\extras\intel\Hardware_Accelerated_Execution_Manager
C:\Users\<user>\adt-bundle-windows-x86_64\sdk\extras\intel\Hardware_Accelerated_Execution_Manager
If the installer fails with message that Intel VT must be turned on, you need to enable this in BIOS. See description for how to do this here.
Create a New x86 AVD: Follow the below Pic

0
The startup of the emulator is very slow.  The good thing is that you only need to start the emulator once.  If the emulator is already running and you run your app again, the emulator reinstalls the app relatively quickly.  Of course, if you want to know how fast it will run on a phone, it is best to test it on a real phone.
0
It is not a problem with your environment, it is just that the emulator is very slow.

Practically I use a real phone to do my tests. It is faster and tests are more realistic. But if you want to test your application on a lot of different Android versions and don't want to buy several phones, you will have to use the emulator from time to time.

UPDATE: The Android SDK now allows to use an x86-based Android emulator. See http://developer.android.com/tools/devices/emulator.html#accel-vm
0
Intel released recommended installation instructions for the ICS emulator on May 15, 2012.  This worked for me.  The emulator is now fast and the UI is smooth.

http://software.intel.com/en-us/articles/intel-atom-x86-image-for-android-ice-cream-sandwich-installation-instructions-recommended/

The first half of the instructions are detailed enough so I will assume you were able to install the Intel x86 Atom System Image(s) using the Android SDK manager, as well as Intel HAXM

Now to ensure that everything else is set up so you can enjoy a highly performing emulator...

Install Intel Hardware Accelerated Execution Manager (HAXM):

http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager/

And start it:

sudo kextload -b com.intel.kext.intelhaxm (mac)

If HAXM is working properly you may see this message when launching the emulator:


  HAX is working and emulator runs in fast virt mode


Otherwise you may see this error:


  HAX is not working and emulator runs in emulation mode emulator:
  Failed to open the hax module

Use GPU emulation.  You cannot use the Snapshot option when using GPU emulation as of this writing.  Ensure that GPU emulation is set to "yes".
Set the device memory to 1024mb or more, but not more than the Intel HAXM setting.  I use 1024mb per device and 2048 for HAXM.
Always double-check the settings after saving!  The emulator is very picky about what it allows you to set, and it will revert configurations without telling you.

With these settings the software keyboard no longer appears, nor do the on-screen back, menu, and recent keys.  This appears to be a limitation of the current ICS Intel x86 system image.  You will need to use the keyboard shortcuts which are listed here:

http://developer.android.com/guide/developing/tools/emulator.html#KeyMapping.

On Mac OS you will need to hold fn + control for the F1 - F12 keys to work.  Page up/down/left/right can be performed using control + arrow keys.
0
I've noticed that emulator starts much faster if there's no Dalvik Debug Monitor Server (DDMS) connected.
So if you start the emulator from Virtual Device Manager "SDK Setup.exe" and Eclipse is not started, the emulator works faster.

If you start the emulator from Eclipse - DDMS is there, so sometimes emulator is extremely slow, but sometimes it's faster.
0
You can create emulator.bat with follow command to start the emulator. It will start faster.

emulator.exe -cpu-delay 0 -no-boot-anim -avd avd


or on Unix (Mac or Linux flavors):

emulator -cpu-delay 0 -no-boot-anim -avd <avd name>

0
As of Revision 17 of Android SDK Tools, the emulator can use graphic aceleration and CPU provided extensions for better efficiency . The requisites and full configuration and user notes are at:  

http://developer.android.com/guide/developing/devices/emulator.html#acceleration  

for enabling gpu aceleration, run the emulator from the command line or add "-gpu on" to the additional emulator ommand line options in the avd config. 

emulator -avd <avd_name> -gpu on


for using the cpu machine extensions, you have to install the driver (caution because it can conflict with existing virtualbox or vmware drivers). Once it's installed it will be used automatically whenever you use an x86-based AVD.  
0
Android SDK rev. 17 supports Virtual Machine Acceleration using AMD and Intel virtualization technologies. 

This feature can improve the emulator performance a lot!

See the following section in the Android emulator documentation for more details: Configuring Virtual Machine Acceleration

Don't forget to install the appropriate driver for your operating system:

Configuring VM Acceleration on Windows
Configuring VM Acceleration on Mac
Configuring VM Acceleration on Linux
After you have installed the drivers and downloaded an Android X86 system image (as described in the documentation) you should be able to create a new AVD using the x86 image:

For example:

Target: Intel Atom x86 System Image - API Level 10
CPU/ABI: Intel Atom (x86)
0
Try using Genymotion.  You can download a version for Windows/Mac OS X/Linux after registering.  A plugin for Eclipse is also avaliable:


  The installation of the plugin can be done by launching Eclipse and going to "Help / Install New Software" menu, then just add a new Update Site with the following URL: http://plugins.genymotion.com/eclipse. Follow the steps indicated by Eclipse.


This emulator is fast and responsive. 

GenyMotion allow you to control various sensors of your device including the battery level, signal strength and GPS.
0
Try to disable your antivirus. Maybe it will make emulator a little bit faster.
0
The option -cpu-delay <delay> described in Emulator Startup Options can help.
0
The current (May 2011) version of the emulator is slow particularly with Android 3.0 (Honeycomb) primarily because the emulator does not support hardware GL -- this means that the GL code gets translated into software (ARM software, in fact) which then gets emulated in software in QEMU. This is crazy-slow. They're working on this problem and have it partially solved, but not with any sort of release quality.

Check out the video Google I/O 2011: Android Development Tools to see it in action -- jump to about 44 minutes.
0
Android emulator release 9 has new "snapshot" feature. You can save state of emulator (make image of emulator) and avoid booting when you start the emulator.
0
You can review the emulator issues on the Google I/O 2011: Android Development Tools talk, starting a 0:40:20.

The emulator runs slowly because the complete Android environment is running on emulated hardware and the instructions are executed on a emulated ARM processor as well.

The main choking point is rendering, since it's not running on any dedicated hardware but it's actually being performed through software rendering. Lowering the screen size will drastically improve emulator performance. Getting more/faster memory isn't going to help.

They've mentioned, at the time, that they're developing an interface that would allow the emulator to pipe certain instructions through the host hardware, so eventually you'll be able to leverage emulator performances with the raw power of desktop hardware.
0
To add further information to this.

I have recently upgraded my Ubuntu installation to Lucid Ubuntu 10.04 LTS which in turn updated my Java version to:

Java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)


And now the emulator (although takes a while to start) seems to be running faster than previously.

It might be worth people upgrading their JVM.
0
I had intermittent slow emulator (SDK v8.0) load times, up to 3 minutes on Intel Core i7 920 2.67GHz CPU running on Xubuntu 10.04 VirtualBox 3.2.12 guest with Eclipse (3.6.1) loaded. I changed the VBox guest memory from 1024 MB to 2048 MB and from that point on never experienced the slowness again (load times consistent at 33 seconds, CPU load consistent at 20%). Both Eclipse and the emulator are memory hogs.
0
Here's what I noticed nobody mentioned it at all. 

Assign all available processor to the emulator 

Here's what you can try. It does speed up the emulator for me, especially during loading time.
I noticed the emulator is only using a single core of the available CPU. What I did is to set it to use all available processors.

I'm using Windows 7.


  When the android emulator is starting, open up the Task Manager, look under the Process tab, look for "emulator-arm.exe" or "emulator-arm.exe *32" ...right click on it, select Processor Affinity and assign as much processor as you like to the emulator.



0
I noticed that the my emulator (eclipse plugin) was significantly slowed by my nVidia graphics card anti aliasing settings. Removing 2x anti aliasing from the graphics menu and changing it to application controlled made it more responsive. it is still slow, but better than it used to be.  
0
See Running Android Apps on Linux - Booting the Emulator Quickly for step by step instructions on setting up a snapshot that will boot in just a few seconds. 
0
The older Android versions run a lot faster.  When I'm on my netbook, I use Android 1.5 (API level 3).  There are a couple of drawbacks, though--your apps need to support the older platforms (obviously), and ndk-gdb requires running Android 2.2 (API level 8) or higher.  But regularly testing apps against older platforms is a good idea anyway.
I am a guest. - Guest
0
Instead of using the native emulator, try using the Android OS in a virtual machine. I've written a detailed guide here http://www.bobbychanblog.com/2011/07/faster-android-emulator-alternative-using-virtualbox/. Hope it helps.
0
To reduce your emulator start-up time you need to check the "Disable Boot Animation" before starting the emulator

Refer android documentation here : http://developer.android.com/tools/help/emulator.html

If in case you dont know, you no need to close the emulator every-time you run/debugg your app. If you click run/debug when it's already open, your APK will get uploaded to the emulator and start pretty much immediately.Emulator takes annoyingly long time only when it started at first time.

Here are some tips to speed up the Android emulator : http://www.nuxeo.com/blog/development/2011/10/speeding-up-the-android-emulator/
0
I found this project amazing: 

http://androvm.org/blog/

It provides very updated Android Virtual Machines network ready
0
Well since somebody suggested Android x86 as an alterante testing Emulator, I'll also present my favorite. This might not be an alternative for everyone but for me it's perfect! Use the Bluestacks Player. it runs Android 2.3.4 and is very fluent and fast. Sometimes even faster than a normal device. The only downside is, that you can just test Apps on the API Level 10 and just on one screen size, but it's perfect just for testing if it's working or not. Just connect the Player with the adb by running

adb connect 127.0.0.1 


After compiling it installs instantly. Very impressive, considering I have a rather average computer hardware(dual core with 4 GB of RAM)
0
After developing for a while, my emulator became brutally slow.  I chose wipe user data and it was much much better. I am guessing that it takes time to load up each apk you've deployed.
Your Answer