Android Studio, Suddenly got GPU Driver Issue when running emulator - android

I have a laptop that I mainly use for android development on android studio, today all of the sudden got this error message (or an outdated version of it) when i ran my emulator
Your GPU driver information:
GPU #1
Make: 8086
Model: Intel(R) HD Graphics Family
Device ID: 0a16
Driver version: 10.18.10.3945
GPU #2
Make: 10de
Model: NVIDIA GeForce 820M
Device ID: 1140
Driver version: 22.21.13.8476
Some users have experienced emulator stability issues with this driver version. As a result, were selecting a compatibility renderer. Please check with your manufacturer to see if there is an updated driver available.
Updated the geforce driver, but no use, tried to update the intel one but failed, is there a way to disable this? bypass the compatibility renderer and work as I used to, the emulator is awful now. Any explanation why that occurred all of the sudden?
Also I'm using windows 7 64-bit if that will help with anything, had an update few days ago.

I am using Win10 but have the same problem. Emulator started crashing my app after last emulator update. In my case, problem is that emulator does not run on hardware even though I never had a problem with my GPUs. Also, the "GPU driver issue" window that pops up doesn't even label WHICH one of the GPUs it thinks is the problem.
For me the solution that worked is to run emulator from terminal, forcing it to run using hardware graphics (instead of letting emulator decide on which) using command
emulator -avd avd_name -gpu mode
where mode is host so that it will run with hardware.
For example:
Using Android Studio terminal move to folder where the emulator is located. Default on Win10 is: C:\Users\userName\AppData\Local\Android\sdk\emulator
Find emulator to run by listing available ones:
emulator -list-avds
Run emulator with -gpu host option:
emulator -avd avd_name -gpu host
More info on this link

A comment in the on the bug report pertaining to this issue by a Google employee is illuminating.
If your system doesn't have a discrete GPU, we intended this change in
order to make the emulator more reliably run on Intel GPU drivers. At
your own risk, you may switch back to using the Intel GPU by going to
settings page, then changing the OpenGL ES renderer to "ANGLE
(D3D11)", "ANGLE (D3D9)", or "Desktop native OpenGL".
It appears that this message is being displayed for all systems using Intel GPUs, not just systems running specific versions of a graphics driver.
The solution is to, if possible, switch to using an external GPU for running the emulator.
If an Intel GPU is the only GPU available on system it is possible to re-enable accelerated rendering of OpenGL ES, by overriding the default OpenGL ES renderer in settings (see below). Options are OpenGL, ANGLE and SwiftShader. SwiftShader is CPU based OpenGL ES emulation, so this setting will not provide a speedup. ANGLE is Direct3d based OpenGL emulation.
As per the comment this is not guaranteed to work, indeed I am able to re-enable hardware acceleration for Android 7 emulators, but with hardware acceleration enabled, all I receive is a black screen for Android 8 emulators.
Open settings with Ctrl-Shift-S then, depending on the version of the emulator, either go to Settings -> General -> OpenGL ES renderer or to Settings -> Advanced -> OpenGL ES renderer
Newer emulator versions:
Older emulator versions:
Update #1:
Another comment on the bug report provides further illumination on this issue:
If you have just a Intel HD 4xxx running the emulator, it's intended that a compatibility renderer be used. I'm sorry about it, but we need to be able to switch to better-supported Intel GPU drivers especially when running high API levels (25+) of system images. Intel iGPUs of that generation (and older) have many issues with OpenGL compatibility.
It appears that Intel iGPU drivers for Haswell (4th gen) processor and older don't support OpenGL well enough for Android 7.1+ devices. So they are purposely falling back to using software emulation which better supports the new Android emulators.
This matches my experience. Using the Intel iGPU works great on Android 7, but is flaky on Android 7.1 and doesn't work at all on Android 8.
My suggestion, stick with Android 7 emulators when using hardware acceleration for Intel Haswell and older iGPUs.
Update #2:
Official communication on this issue was finally provided in the form of comments in the release notes for Emulator 26.1.3:
Which GPUs will be switched to use ANGLE or Swiftshader rendering is determined as follows:
Older Intel iGPUs have driver issues on both OpenGL and ANGLE D3D drivers. Users with Intel HD Graphics 3xxx and older will use Swiftshader.
Some users reported the inability to use API level 25 images because of a bug in which "Pixel Launcher keeps stopping." This seems to be a driver issue in some Intel HD 4xxx models. So they will be switched to use ANGLE automatically.
For best results with GPU emulation, we recommend either to use a discrete NVIDIA or AMD GPU, or a newer Intel GPU (Iris, HD 5xxx, HD 5xx/6xx).

I ran into this problem today. Per the suggestion from the Google emulator issue tracker, I installed the beta emulator 26.1.3. Problem fixed.

As other suggested, go to Settings -> Appearance & Behaviour -> System settings -> Updates. Change "Automatically check updates for" to "Beta channel". Update emulator to latest beta. Driver issue should be gone. I had problems running fragment with google maps (app chrash) that was solved after update of emulator to latest beta.

I did the same thing as #Api, but I did it from the Virtual Device Manager. In the device edit window, in the Graphics dropdown list, I selected "Hardware - GLES 2.0". I believe the default is Automatic. I still get the erroneous GPU Driver popup window, but the emulator does not crash anymore. It is back to normal reliability.

For linux users, go to Android Folder which in my case is under ~/Android. Then proceed to /sdk/emulator. "emulator" is a local command. So, you can run the command as local "./emulator".
The rest is done as the user "Api" stated.
$ ./emulator -avd -avd_name -gpu mode
$ ./emulator -avd Nexus_5X_API_26 -gpu host (#IN MY CASE)
Note: I didn't download SDK, instead copy and pasted it under /home dir. That's why the command was not valid on a global scale. If you setup sdk avd from ground-up, it should work just fine.

I'm having the exact same issue from precisely 4 days ago. I've tried both above answers but none of it work.
PS. The emulator works, but just crashes seemingly at random. I prior to this error, the emulator worked fine and i could test certain features, i can also debug completely with no crashes via USB with a few android devices so im almost certain its a problem with the emulator.
Edit: Not sure what eactly the problem was, but was solved by forcing Android Studio to run with nVidia GPU.

I managed to workaround this problem by disabling the use of the GPU so that the AVD uses Software acceleration.
It won't be as fast as GPU though, but at least it has better chances to work properly.
I tried other options above but sadly none of them was working.
If you want to try this option, go to the AVD Manager (in Android Studio : Tools -> Android -> AVD Manager), then edit your virtual Device and in the Graphics field, you can set "Software - GLES 1.1" instead if "Hardware - GLES 2.0".
This is not the perfect fix for this problem but it can help.

On Mac OS (currenly i'm using Catalina)
First move to emulator directory
I use the default location
cd /Users/yourusername/Library/Android/sdk/emulator
Search list of emulator
./emulator -list-avds
example my output is :
Pixel_2_XL_API_27
Running emulator using -gpu command
./emulator -avd Pixel_2_XL_API_27 -gpu host

How do I update my GPU drivers?
Select Windows Start > Control Panel.
Open Device Manager.
(Or Search Start for Device Manager.)
Click the arrow next to Display Adapters.
Right-click on Intel HD Graphics and choose Update Driver.
Choose Search automatically for updated driver software.

none of that worked for me on my windows laptop with intel hd4000
what worked is ubuntu linux
after i run emulator on linux i was shocked of its speed :)
so it seems the problem with intel and windows won't be resolved soon

Related

Why Android Studio arm64 system images are slow? [duplicate]

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
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?
Even if it starts and loads the home screen, it is very sluggish. I have tried the Eclipse IDE in version 3.5 (Galileo) and 3.4 (Ganymede).
Update
You can now enable the Quick Boot option for Android Emulator. That will save emulator state, and it will start the emulator quickly on the next boot.
Click on Emulator edit button, then click Show Advanced Setting. Then enable Quick Boot like below screenshot.
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 a very fast emulator.
Refer to the given below screenshots for more information.
Creating a new AVD with the save snapshot feature.
Launching the emulator from the snapshot.
And for speeding up your emulator you can refer to Speed up your Android Emulator!:
Using ssd hard drive has too much impact and I recommend to use more suitable ram (8 or higher)
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:
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 the message that Intel VT must be turned on, you need to enable this in the BIOS. See the description for how to do this in Enabling Intel VT (Virtualization Technology) .
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:
Install Intel Hardware Accelerated Execution Manager (HAXM)
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.
Genymotion - Preferred
VirtualBox
BlueStacks
YouWave
Windows Android Emulator
Jar of Beans
Andy
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:
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 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:
For example:
Target: Intel Atom x86 System Image - API Level 10
CPU/ABI: Intel Atom (x86)
The option -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 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
#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 adb install tenfold.
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.
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 an 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.
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.
Use the Intel x86 Emulator Accelerator
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.
In the version of Android Studio I used (0.8.9), Android SDK Manager downloads HAXM but doesn't actually run the installer (I assume this will be fixed in later releases). To run the installer I had to go to C:\Program Files (x86)\Android\android-studio\sdk\extras\intel\Hardware_Accelerated_Execution_Manager and manually launch intelhaxm.exe.
HAXM works with Intel devices, so created a new Emulator with Intel CPU.
Create a new AVD using Intel Atom x86
This improved things considerably, but the emulator was still feeling a bit sluggish. The final step was selecting Use Host GPU in Android Virtual Device Manager (AVD).
After these changes, Android Emulator was launching in 5-10 seconds and running without any noticeable lag.
Be aware that these features are hardware dependent (CPU/GPU) and may not work on some systems.
Try Genymotion for Android Studio. Blazing fast! Just needs one time installation. No more AVD pain.
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.
A new option is the Visual Studio Emulator for Android--it's fast, Hyper-V, x86, and free to download even without VS.
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 by running
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.
Visual Studio Emulator for Android
EDIT:
Try https://www.visualstudio.com/vs/msft-android-emulator/
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.
And Instant run will look like this
However Android Studio is right now in Preview you can try it now.

My Android Emulator is deadly slow without VT [duplicate]

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
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?
Even if it starts and loads the home screen, it is very sluggish. I have tried the Eclipse IDE in version 3.5 (Galileo) and 3.4 (Ganymede).
Update
You can now enable the Quick Boot option for Android Emulator. That will save emulator state, and it will start the emulator quickly on the next boot.
Click on Emulator edit button, then click Show Advanced Setting. Then enable Quick Boot like below screenshot.
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 a very fast emulator.
Refer to the given below screenshots for more information.
Creating a new AVD with the save snapshot feature.
Launching the emulator from the snapshot.
And for speeding up your emulator you can refer to Speed up your Android Emulator!:
Using ssd hard drive has too much impact and I recommend to use more suitable ram (8 or higher)
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:
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 the message that Intel VT must be turned on, you need to enable this in the BIOS. See the description for how to do this in Enabling Intel VT (Virtualization Technology) .
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:
Install Intel Hardware Accelerated Execution Manager (HAXM)
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.
Genymotion - Preferred
VirtualBox
BlueStacks
YouWave
Windows Android Emulator
Jar of Beans
Andy
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:
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 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:
For example:
Target: Intel Atom x86 System Image - API Level 10
CPU/ABI: Intel Atom (x86)
The option -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 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
#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 adb install tenfold.
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.
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 an 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.
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.
Use the Intel x86 Emulator Accelerator
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.
In the version of Android Studio I used (0.8.9), Android SDK Manager downloads HAXM but doesn't actually run the installer (I assume this will be fixed in later releases). To run the installer I had to go to C:\Program Files (x86)\Android\android-studio\sdk\extras\intel\Hardware_Accelerated_Execution_Manager and manually launch intelhaxm.exe.
HAXM works with Intel devices, so created a new Emulator with Intel CPU.
Create a new AVD using Intel Atom x86
This improved things considerably, but the emulator was still feeling a bit sluggish. The final step was selecting Use Host GPU in Android Virtual Device Manager (AVD).
After these changes, Android Emulator was launching in 5-10 seconds and running without any noticeable lag.
Be aware that these features are hardware dependent (CPU/GPU) and may not work on some systems.
Try Genymotion for Android Studio. Blazing fast! Just needs one time installation. No more AVD pain.
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.
A new option is the Visual Studio Emulator for Android--it's fast, Hyper-V, x86, and free to download even without VS.
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 by running
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.
Visual Studio Emulator for Android
EDIT:
Try https://www.visualstudio.com/vs/msft-android-emulator/
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.
And Instant run will look like this
However Android Studio is right now in Preview you can try it now.

Android: 10inch android emulator is very slow [duplicate]

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
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?
Even if it starts and loads the home screen, it is very sluggish. I have tried the Eclipse IDE in version 3.5 (Galileo) and 3.4 (Ganymede).
Update
You can now enable the Quick Boot option for Android Emulator. That will save emulator state, and it will start the emulator quickly on the next boot.
Click on Emulator edit button, then click Show Advanced Setting. Then enable Quick Boot like below screenshot.
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 a very fast emulator.
Refer to the given below screenshots for more information.
Creating a new AVD with the save snapshot feature.
Launching the emulator from the snapshot.
And for speeding up your emulator you can refer to Speed up your Android Emulator!:
Using ssd hard drive has too much impact and I recommend to use more suitable ram (8 or higher)
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:
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 the message that Intel VT must be turned on, you need to enable this in the BIOS. See the description for how to do this in Enabling Intel VT (Virtualization Technology) .
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:
Install Intel Hardware Accelerated Execution Manager (HAXM)
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.
Genymotion - Preferred
VirtualBox
BlueStacks
YouWave
Windows Android Emulator
Jar of Beans
Andy
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:
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 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:
For example:
Target: Intel Atom x86 System Image - API Level 10
CPU/ABI: Intel Atom (x86)
The option -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 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
#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 adb install tenfold.
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.
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 an 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.
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.
Use the Intel x86 Emulator Accelerator
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.
In the version of Android Studio I used (0.8.9), Android SDK Manager downloads HAXM but doesn't actually run the installer (I assume this will be fixed in later releases). To run the installer I had to go to C:\Program Files (x86)\Android\android-studio\sdk\extras\intel\Hardware_Accelerated_Execution_Manager and manually launch intelhaxm.exe.
HAXM works with Intel devices, so created a new Emulator with Intel CPU.
Create a new AVD using Intel Atom x86
This improved things considerably, but the emulator was still feeling a bit sluggish. The final step was selecting Use Host GPU in Android Virtual Device Manager (AVD).
After these changes, Android Emulator was launching in 5-10 seconds and running without any noticeable lag.
Be aware that these features are hardware dependent (CPU/GPU) and may not work on some systems.
Try Genymotion for Android Studio. Blazing fast! Just needs one time installation. No more AVD pain.
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.
A new option is the Visual Studio Emulator for Android--it's fast, Hyper-V, x86, and free to download even without VS.
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 by running
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.
Visual Studio Emulator for Android
EDIT:
Try https://www.visualstudio.com/vs/msft-android-emulator/
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.
And Instant run will look like this
However Android Studio is right now in Preview you can try it now.

how would you change Android AVD setting to make the emulator smooth as on the real android devices? [duplicate]

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
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?
Even if it starts and loads the home screen, it is very sluggish. I have tried the Eclipse IDE in version 3.5 (Galileo) and 3.4 (Ganymede).
Update
You can now enable the Quick Boot option for Android Emulator. That will save emulator state, and it will start the emulator quickly on the next boot.
Click on Emulator edit button, then click Show Advanced Setting. Then enable Quick Boot like below screenshot.
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 a very fast emulator.
Refer to the given below screenshots for more information.
Creating a new AVD with the save snapshot feature.
Launching the emulator from the snapshot.
And for speeding up your emulator you can refer to Speed up your Android Emulator!:
Using ssd hard drive has too much impact and I recommend to use more suitable ram (8 or higher)
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:
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 the message that Intel VT must be turned on, you need to enable this in the BIOS. See the description for how to do this in Enabling Intel VT (Virtualization Technology) .
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:
Install Intel Hardware Accelerated Execution Manager (HAXM)
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.
Genymotion - Preferred
VirtualBox
BlueStacks
YouWave
Windows Android Emulator
Jar of Beans
Andy
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:
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 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:
For example:
Target: Intel Atom x86 System Image - API Level 10
CPU/ABI: Intel Atom (x86)
The option -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 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
#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 adb install tenfold.
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.
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 an 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.
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.
Use the Intel x86 Emulator Accelerator
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.
In the version of Android Studio I used (0.8.9), Android SDK Manager downloads HAXM but doesn't actually run the installer (I assume this will be fixed in later releases). To run the installer I had to go to C:\Program Files (x86)\Android\android-studio\sdk\extras\intel\Hardware_Accelerated_Execution_Manager and manually launch intelhaxm.exe.
HAXM works with Intel devices, so created a new Emulator with Intel CPU.
Create a new AVD using Intel Atom x86
This improved things considerably, but the emulator was still feeling a bit sluggish. The final step was selecting Use Host GPU in Android Virtual Device Manager (AVD).
After these changes, Android Emulator was launching in 5-10 seconds and running without any noticeable lag.
Be aware that these features are hardware dependent (CPU/GPU) and may not work on some systems.
Try Genymotion for Android Studio. Blazing fast! Just needs one time installation. No more AVD pain.
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.
A new option is the Visual Studio Emulator for Android--it's fast, Hyper-V, x86, and free to download even without VS.
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 by running
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.
Visual Studio Emulator for Android
EDIT:
Try https://www.visualstudio.com/vs/msft-android-emulator/
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.
And Instant run will look like this
However Android Studio is right now in Preview you can try it now.

Why is the Android emulator so slow? How can we speed up the Android emulator? [closed]

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
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?
Even if it starts and loads the home screen, it is very sluggish. I have tried the Eclipse IDE in version 3.5 (Galileo) and 3.4 (Ganymede).
Update
You can now enable the Quick Boot option for Android Emulator. That will save emulator state, and it will start the emulator quickly on the next boot.
Click on Emulator edit button, then click Show Advanced Setting. Then enable Quick Boot like below screenshot.
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 a very fast emulator.
Refer to the given below screenshots for more information.
Creating a new AVD with the save snapshot feature.
Launching the emulator from the snapshot.
And for speeding up your emulator you can refer to Speed up your Android Emulator!:
Using ssd hard drive has too much impact and I recommend to use more suitable ram (8 or higher)
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:
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 the message that Intel VT must be turned on, you need to enable this in the BIOS. See the description for how to do this in Enabling Intel VT (Virtualization Technology) .
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:
Install Intel Hardware Accelerated Execution Manager (HAXM)
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.
Genymotion - Preferred
VirtualBox
BlueStacks
YouWave
Windows Android Emulator
Jar of Beans
Andy
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:
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 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:
For example:
Target: Intel Atom x86 System Image - API Level 10
CPU/ABI: Intel Atom (x86)
The option -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 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
#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 adb install tenfold.
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.
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 an 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.
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.
Use the Intel x86 Emulator Accelerator
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.
In the version of Android Studio I used (0.8.9), Android SDK Manager downloads HAXM but doesn't actually run the installer (I assume this will be fixed in later releases). To run the installer I had to go to C:\Program Files (x86)\Android\android-studio\sdk\extras\intel\Hardware_Accelerated_Execution_Manager and manually launch intelhaxm.exe.
HAXM works with Intel devices, so created a new Emulator with Intel CPU.
Create a new AVD using Intel Atom x86
This improved things considerably, but the emulator was still feeling a bit sluggish. The final step was selecting Use Host GPU in Android Virtual Device Manager (AVD).
After these changes, Android Emulator was launching in 5-10 seconds and running without any noticeable lag.
Be aware that these features are hardware dependent (CPU/GPU) and may not work on some systems.
Try Genymotion for Android Studio. Blazing fast! Just needs one time installation. No more AVD pain.
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.
A new option is the Visual Studio Emulator for Android--it's fast, Hyper-V, x86, and free to download even without VS.
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 by running
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.
Visual Studio Emulator for Android
EDIT:
Try https://www.visualstudio.com/vs/msft-android-emulator/
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.
And Instant run will look like this
However Android Studio is right now in Preview you can try it now.

Categories

Resources