Questions : Why is the Android emulator so slow? How can we speed up the Android emulator? [closed]
I have got a 2.67 GHz Celeron processor, and 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 doesn’t. I have followed all the instructions in setting up the IDE, SDKs, JDKs and such and have had some success in starting the emulator quickly, but that is very rare. How can I, if possible, fix this problem?
Total Answers: 77 Answers
IMPORTANT NOTE: Please first refer to the Intel list about VT to make sure your CPU supports Intel VT.
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 and the Intel Hardware Accelerated Execution Manager Driver. Follow the image below:
Install the HAXM Driver by running “IntelHaxm.exe”. It will be located in one of the following locations:
- Create a new x86 AVD: Follow the image below:
- Or as for new SDK,
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!
UPDATE: The latest version of Android studio (2.x) made major improvements to the bundled emulator. It’s responsive and has a whole bunch of features.
For those still interested: Try using Genymotion. You can download a version for Windows/Mac OS X/Linux after registering. A plugin for Eclipse is also available:
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 allows you to control various sensors of your device including the battery level, signal strength, and GPS. The latest version now also contains camera tools.
The emulator included in your (old) version of Eclipse is very slow.
Recent emulators are faster than they use to be in 2010. Update your SDK/IDE.
Personally, 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.
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.
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.
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:
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 virtual mode
Otherwise, you may see this error:
HAX is not working and the 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 1024 MB or more, but not more than the Intel HAXM setting. I use 1024 MB 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.
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.
You can create emulator.bat with following command to start the emulator. It will start faster.
emulator.exe -cpu-delay 0 -no-boot-anim @<avd name>
Or on Unix (Mac or Linux flavors):
emulator -cpu-delay 0 -no-boot-anim @<avd name>
I’ve noticed that the 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 the emulator is extremely slow, but sometimes it’s faster.
Emulators are slow. There’s really nothing you can do about it, but there are alternatives to the emulator.
To make your emulator faster, you can host a GPU and use a lighter Android version (Android 2.3 (Gingerbread)). Developing on a Mac would be better. Why use an emulator, BTW? Using a real phone makes more sense.
As of Revision 17 of Android SDK Tools, the emulator can use graphic acceleration and CPU-provided extensions for better efficiency. The prerequisites and full configuration and user notes are at:
For enabling GPU aceleration, run the emulator from the command line or add “-gpu on” to the additional emulator command line options in the AVD configuration.
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.
Try to disable your antivirus. Maybe it will make emulator a little bit faster.
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:
- Target: Intel Atom x86 System Image – API Level 10
- CPU/ABI: Intel Atom (x86)
-cpu-delay <delay>described in Emulator Startup Options can help.
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 autoto QEMU when starting the emulator. You can make a batch file called
my_avd.batto do it for you:
emulator @my_avd -no-boot-anim -qemu -icount auto
@my_avd— launch a virtual device named ‘my_avd’
-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
Android emulator release 9 has a new “snapshot” feature. You can save the state of the emulator (make an image of the emulator) and avoid booting when you start the emulator.
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.
- First, install the Intel x86 Emulator Accelerator (HAXM). This can be downloaded directly from Intel or using Android SDK Manager. In the SDK Manager, it’s located under Extras.
To add further information to this.
I have recently upgraded my Ubuntu installation to Ubuntu 10.04 LTS (Lucid Lynx) 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.
Here’s what I noticed nobody mentioned it at all.
Assign all available processors 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. I 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.
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 file you’ve deployed.
Well, since somebody suggested Android x86 as an alternative 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 fluid and fast. Sometimes it is 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 connect 127.0.0.1
After compiling, it installs instantly. It is very impressive, considering I have rather an average computer hardware (dual core with 4 GB of RAM).
I had intermittent slow emulator (SDK v8.0) load times, up to three minutes on Intel Core i7 920 2.67 GHz CPU running on Xubuntu 10.04 VirtualBox 3.2.12 guest with Eclipse (3.6.1) loaded. I changed the VirtualBox guest memory from 1024 MB to 2048 MB and from that point on, I never experienced the slowness again (load times consistent at 33 seconds, CPU load consistent at 20%). Both Eclipse and the emulator are memory hogs.
Android emulator is dead slow. It takes 800MB memory while running. If you are on Windows, You can use Microsoft Android Emulator. It is superb, provides you functionalities more than Android Studio Emulator. And most important it is fast ( consumes 13MB only). It comes with Visual Studio 2015 Technical Preview. I am using it and happy with it. I downloaded and installed entire VS pack, I need to look how we can install VS Emulator only.
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.
To reduce your emulator start-up time you need to check the “Disable Boot Animation” before starting the emulator. Refer to the Android documentation.
If in case you don’t know, you do not need to close the emulator every-time you run/debug your app. If you click run/debug when it’s already open, your APK file will get uploaded to the emulator and start pretty much immediately. Emulator takes annoyingly long time only when it started the first time.
Here are some tips to speed up the Android emulator: How to speed up the Android Emulator by up to 400%.
Good way to speed up Android Emulator and app testing is Install or Upgrade your Android Studio to Android Studio 2.0 version and then go to app open Settings/Preferences, the go to Build, Execution, Deployment → Instant Run. Click on Enable Instant Run. And After That This will ensure you have the correct gradle plugin for your project to work with Instant Run.
However Android Studio is right now in Preview you can try it now.
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.
Simple easy solution for beginners. I have tried many ways and stopped with Genymotion in combination with Eclipse. Genymotion simply adds a virtual device to Eclipse.
Step by step:
- Download Genymotion with VirtualBox included from here.
- Install this package included build in VirtualBox.
- Install the plugin into Eclipse from here.
- Start GenyMotion and create a virtual device you want use, and start it.
- In Eclipse, go to Window -> Preferences -> GenyMobile -> GenyMotion, and set the path to GenyMotion (in my case, C:/ProgramFiles/GenyMobile/Genymotion).
- Click on a project name in Eclipse that you want to start. Start the application using “Run as”. In the list of devices, you should see the emulated device.
- You cam emulate what you want.
In my case, this solution is the one and only fast solution. No emulators in Eclipse have never worked so fast, and every setting was very slow. Only this solution works almost in realtime. I can recommend (notebook i3, 2.6 GHz).
On a 3.4 GHz quad core 6 GB of RAM, Windows 7, the emulator was unusably slow! I downloaded
Launcher-Pro.apkthrough 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.
If you have an Intel CPU, install Intel Hardware Accelerated Execution Manager.
Then assign it as the emulator’s CPU in Emulator Settings. When I did it on my Core i7 CPU, it was taking about 10 minutes. Now it is opening in 15 seconds.
I tried booting the emulator from Eclipse (Indigo and Android 1.5, no Snapshot) and after 45 minutes I stopped it, because nothing had happened.
Statistics: Phenom Quad @2.6 MHz with 4 GB DDR2 Corsair Dominator @800 MHz. The AVD is on an SSD drive and the emulator on a 7200 RPM HDD.
I started the emulator manually with the
-no-boot-animoption and it loaded in 30 seconds. 🙂
In CMD, navigate to folder where the
emulator.exefile is and type
emulator.exe @<YourAVDFromEclipse> -no-boot-anim
emulator.exefile is located in the Android SDK folder under Tools.
In Windows, you can find the the Android Virtual Device(AVD) under
The projects run from inside Eclipse, targeting the AVD you booted, show up just nicely 😀
For a better experience, I would recommend the shop.genymotion.com licensed genymotion. If you want to test it out, first you can get genymotion here
You can try our new Android virtual machine, Leapdroid, which is fully compatible with the original Android emulator. Since it uses virtualization technology, instead of emulation, it provides pretty much native speed. In addition, we use a new OpenGL technology called LeapGL, which performs OpenGL graphics in native speed. Our vm has the best performance compared to others.
Source code: https://github.com/leapdroid
Leapdroid is fully compatible with Eclipse and Android Studio, as it uses the same adb ports.
I wonder why nobody has mentioned the
Visual Studio Emulatoras an alternative. It’s way faster than the native Android Studio Emulator.
Here’s a link to performance comparison: https://medium.com/android-news/how-visual-studio-emulator-for-android-can-improve-your-android-development-9e17a6213839#.hlh7ba6ut
What’s even better is that the apk files and even gapps (or any other flashable zip) can be installed just by drag and drop. However, the downside is that it requires Hyper-V which is only available on Windows (that too, from Windows 8 onwards). Other limitations (along with the description of the above) and other details can be found here: https://blogs.msdn.microsoft.com/visualstudioalm/2014/11/12/introducing-visual-studios-emulator-for-android/
Android ADT 18 now includes a (beta) GPU enabled option (simply enable the GPU acceleration from your AVD properties). It makes a huge difference and even ICS feels relatively comfortable now.
You may try Genymotion instead of android emulator. It is faster and better than the android emulator.
My solution is Vysor . I get both of the best worlds. I don’t put too much charge on my machine, but I can also see my real Android device on the screen so I don’t have to reach for it, take my hands off the keyboard etc. Furthermore there are always some feature that don’t work best on an emulator.
There is free version with ads and a payed one which compared to other solutions, won’t break the bank.
I’ve similar issues on a Mac. What I did;
- 1) on the emulator, settings-display -> disable screen orientation
- 2) on Eclipse, emulator startup options -> -cpu-delay 100
Those had some effect in lowering CPU use (not it is around 40-60%), not ultimate solution. But again, the CPU use is NOT >100% anymore!
I have noticed that an emulator gets slow over a period of time. So, one can delete the emulator which gets very slow and create a new one with the help of the AVD manager. I have tried it a couple of times and it works well.
The fastest emulators at the moment of writing this are the built-in x86 emulators which come with the Android SDK. You can find them in AVD manager where you create virtual machines. Simply pick any of them and then you pick the type of CPU (choose x86 for best performance). It will be as fast as your machine.
The latest such machine for Android 4.0 and 4.0.3 can be found in Giving your Android Emulator a Boost: Building Android ICS with Goldfish & x86 KVM support on EC2 – TestObject.
Note: This is only for a development purpose. To test for performance, you still have to either use a real device or test on the emulator with ARM CPU.
You need more memory.
Here’s why I say that:
I’m using VirtualBox on Windows to run Ubuntu 10.10 as a guest. I installed Eclipse and the Android SDK on the VM. My physical box has 4 GB of memory, but when I first configured the Ubuntu virtual machine, I only gave it 1 GB. The emulator took about 15 minutes to launch. Then, I changed my configuration to give the VM 2 GB and the emulator was running in less than a minute.