3451

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).

MMG
  • 2,962
  • 5
  • 8
  • 35
Andrie
  • 3,461
  • 3
  • 14
  • 3
  • 81
    Alternate is Genymotion. https://www.genymotion.com/. This is much mcuh faster. Straightforward installation. – Sukitha Udugamasooriya Jul 14 '15 at 02:47
  • 1
    You're much better off using [Andy the Android Emulator](http://www.andyroid.net/). GenyMotion [locks you out of most features](https://www.genymotion.com/#!/store) unless you pay $35 a month! – Mike Bethany Sep 03 '15 at 01:00
  • 9
    I have found the emulator to run way (and by way I mean waaaay) faster on linux. I've got a laptop with dualboot, on windows the emulator takes about 15 minutes to start up, with linux about 30 seconds. I do not know about other operating systems like OSX, but feels like a windows thing to me. – Daniël van den Berg Oct 26 '15 at 11:06
  • 1
    alternatives (most featuring more responsive, faster emulation) to the official Android emulator have been documented in this question: http://stackoverflow.com/questions/13112889/alternatives-to-the-android-avd-emulator – CCJ Nov 11 '15 at 22:23
  • 11
    Android Studio 2.0 is reported to not only have a much faster emulator, but employ "instant run", which allows certain changes in your source, such as the XML, to be deployed in seconds to the target without the APK having to be rebuilt and redeployed. See http://android-developers.blogspot.co.uk/2015/11/android-studio-20-preview.html – Carl Whalley Dec 02 '15 at 22:44
  • 1
    A new way introduce by google is Instant run you can check it here http://stackoverflow.com/a/34511114/2489061 – Umer Dec 29 '15 at 12:42
  • 13
    i think your ram is very small for an emulator to run faster. – Zia U Rahman Jul 05 '16 at 22:24
  • 7
    One way of avoiding confused comments could be to have a little notice box saying the question is older than, say, 2 years old. Tech is changing rapidly, and you would want age to affect rank, even though the question shouldn't be closed/archived as on lesser sites. – Henrik Erlandsson Feb 21 '17 at 14:45
  • 1
    Real Phone device is cheap enough. – iamcxl Apr 01 '17 at 04:17
  • 2
    Emulators require at least 1gb ram to run, eclipse need 1gb, XP OS need 256mb! so you should have at least 3 gb ram to run emulator properly, try to build lower version of android on emulator like version 2.3, it will be like 10 times faster than android version 4! On top of that, your cpu is too weak! besides, eclipse is outdated now and in order to use android studio and android 6 emulator try cpu i5 and 8gb ram. – Reflection Jun 05 '17 at 19:23
  • 2
    increase your system ram – faisal iqbal Aug 02 '17 at 11:28
  • 1
    If you can have a SSD hard disk, it would tremendously speed up the Android Studio and the emulator. – Pronoy999 Sep 14 '17 at 18:23
  • 1
    @DaniëlvandenBerg Nowadays it only takes about 0.5 seconds to boot on Windows (at least for a lot of people I know). Maybe Linux is faster for developing, but atleast not for emulators :) – Jason Aug 13 '18 at 17:30
  • 1
    @Jason Was your emulator running an Intel image? – Bhuro Aug 27 '18 at 03:53
  • Sometimes `Wipe data` option in AVD manager is the simplest solving :) – Nagibaba Jun 03 '19 at 06:46
  • Nobody talks about android-x86? I used to use android-x86 in VMWare workstation, which is very fast. I never get a fast android Emulator, even with intel HAXM. The most time consuming part seems to be the install part. With android x86, install is almost instant. I tried this years ago for Android 4.4. Don't know whether it works for new versions. – jw_ Jul 15 '19 at 03:04
  • The current situation of the Android emulator in 2019 on macOS is terrible. It's suffering from insane performance penalties and I am unable to test my apps because it either is too slow or the app crashes for random reasons. – Pedro Paulo Amorim Aug 28 '19 at 16:42
  • Try this command to launch emulator: "emulator -avd avd_name -gpu host". You can see at the end "host" which is the GPU mode. It means to use the GPU on your computer for hardware acceleration. Make sure you have a dedicated GPU for this. Learn more at https://developer.android.com/studio/run/emulator-acceleration – bikram Aug 14 '20 at 09:06
  • Run it in mode `-read-only`. *Way* faster. If you want, run it in read-write, make whatever setup changes you need to make, take a snapshot, then load that snapshot in read-only mode. – Raman Dec 03 '20 at 17:59

77 Answers77

1451

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.

Quick boot

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.

Android emulator with save snapshot feature.

Launching the emulator from the snapshot.

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)

Vikas Patidar
  • 41,230
  • 22
  • 89
  • 104
  • 23
    When you update and existing device, wipe the user data on the first startup from snapshot – Mark Bakker May 10 '11 at 11:13
  • 16
    I set the AVD as this, but seems still slow when I reboot the AVD, why? – zhongshu Jul 16 '11 at 13:01
  • 2
    @zhongshu: When you reboot **AVD** then it starts from the beginning state rather than the saved snapshot. So probably it will take more time. – Vikas Patidar Jul 22 '11 at 06:59
  • so, how to restart the AVD in correct way to use snapshot? (I just right click the Emulator icon in task bar and click 'Quit' and then restart it in AVD manager.) – zhongshu Jul 22 '11 at 07:15
  • @zhongshu: Oh ! i was just thinking that you might be restarting it from command or terminal mode. The way you had mentioned is correct but there may be something else related to your system configuration. – Vikas Patidar Jul 22 '11 at 10:17
  • 2
    For me, its not just the startup speed thats a problem. The environment from Eclipse 3.7 is so slow that mouse clicking seems to have no effect. Often, my Android environment is blank and takes many minutes to show any page change. I have Core2Quad 2.4Ghz, 8GB ram, Ubuntu 11.10 x64. – djangofan Dec 12 '11 at 02:50
  • I was unable to get to the launch options dialog. How do you open it? – Peter Ehrlich Jan 01 '12 at 03:09
  • 9
    @Peter Ehrlich : Just go to the **Window > Android SDK and AVD Manager** and select AVD you want to launch from the list and then click on the **Start** button in the right pane. It will open the same you want. – Vikas Patidar Jan 02 '12 at 07:10
  • 1
    Are these two different versions? My Eclipse has Window -> Android SDK Manager and Window -> AVD Manager as separate options. There's nothing that looks like the second dialog in this answer – Chris May 31 '12 at 15:57
  • command line version? – n611x007 May 31 '13 at 04:47
  • 3
    I got "Failed to allocate memory" when setting 1024. It also displayed a warning at the bottom of the configuration window saying: "On Windows, emulating RAM greater than 768M may fail dependin..." I Tried setting it to 770, and then it worked. It failed setting it to 800. – awe Aug 06 '13 at 10:56
  • How do you do the "launch options" portion in intellij? I made my emulator "snapshot-enabled" by just clicking snapshot, but the launch options portion (your second picture) is not something I see. – michaelsnowden Nov 14 '13 at 07:17
  • 5
    @ Msmit1993: You can use Intel x86 based emulator with HAX tool. Believe me you will will be surprised that emulator faster than your actual device. – Vikas Patidar Nov 22 '13 at 12:48
  • There is a use host GPU option as well, next to snapshot. It might help as one of the answers mentioned. – Trojan.ZBOT Dec 22 '13 at 05:09
  • @Trojan.ZBOT Both options are for speed-up but you can not use both together. – Vikas Patidar Dec 22 '13 at 07:44
  • Oddly, on my machine (quad core AMD), I've found that *reducing* RAM makes the emulator faster and *increasing* RAM slows it down. – Brian Knoblauch Sep 09 '14 at 17:03
  • 2
    Snapshots aren't supported with GPU emulation. GPU emulation makes the emulator much faster so I recommend it over snapshots. x86 images start up pretty fast with HAXM/KVM – vharron Mar 05 '15 at 01:41
  • This answer and the one mentioning the HAXM really increased the speed. Now it only takes about 10 seconds to load. Great! – jAC May 28 '15 at 11:35
  • I haven't found that this helps at all. I have a HDD rather than a SDD, though, so maybe this is for users with SSDs. – Sam Jun 18 '15 at 12:45
  • @Sam Please refer below answer, it's almost 4 year old trick and not relevant for today. – Vikas Patidar Jun 19 '15 at 06:24
  • How do you do it for Android Studio? – user41805 Aug 12 '15 at 14:17
  • 1
    @KritixiLithos Toos > Android > AVD Manager > Create New Virtual Device > Next > Select hardware > Next > Select System Image > Next > Check Use Host GPU – Vikas Patidar Aug 13 '15 at 10:13
  • Please try our newly released Android Virtual Machine, called Leapdroid, it's totally free, and compatible with Google's QEMU based emulator, with very fast OpenGL impl. http://www.leapdroid.com – huisinro Jun 25 '16 at 04:59
  • However, when you choose to save a snapshot, the emulator will be slow to close, so you might want to disable Save to snapshot after you've acquired an initial snapshot (after you close the AVD for the first time). – B-GangsteR Jul 01 '16 at 19:45
  • Also, beware than adding more RAM to your emulator makes you use a "better device" as it will be able to allocate more space before it goes out. If all what is wanted is to test functions of an app, that's ok, but keep in mind that if your app is too memory-intensive, lower devices could not be able to run it. – Shirkam Jul 25 '17 at 10:47
  • 1. On Windows, you must use Hardware Accelerator 2. If it didn't help and you have Avast antivirus - go to Settings > Troubleshooting and disable "Enable hardware-assisted virtualization". Reboot your computer. It helped me! Avast is slowing down any sandboxes (eg. virtual machines) by default. – Kirill Karmazin Aug 10 '19 at 12:22
  • Come on guys, just agree thats android emulators are too bad. Slow, buggy, looks and works ugly. – Sever Apr 10 '21 at 12:13
1141

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.

HAXM

Steps for Configuring Your Android Development Environment for HAXM

  1. Update Eclipse: Make sure your Eclipse installation and the ADT plug-in are fully up-to-date.

  2. 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.

Enter image description here

  • Download the x86 Atom System Images and the Intel Hardware Accelerated Execution Manager Driver. Follow the image below:

Enter image description here

  • 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) .

Install .exe or .dmg

  • Create a new x86 AVD: Follow the image below:

Create AVD

  • Or as for new SDK, Enter image description here
lukas
  • 1,870
  • 5
  • 28
  • 37
Prashanth Sams
  • 12,937
  • 16
  • 80
  • 106
  • 19
    Good write-up. If you're looking for docs from Google (includes a few differences for Mac), they can be found here: http://developer.android.com/tools/devices/emulator.html#accel-vm – Todd Price Feb 07 '13 at 03:11
  • 105
    Doesn't work on Linux. – Kshitiz Sharma Feb 18 '13 at 05:29
  • 14
    I tried this solution. It worked. However, I installed using MonoDroid and couldn't find IntelHaxm.exe for a minute. It was here: C:\Users\jbarneck\AppData\Local\Android\android-sdk\extras\intel – Rhyous Apr 29 '13 at 14:35
  • 2
    How to use this with a Google Api Emulator? I need it because my app uses GCM. – Raphael Oliveira Apr 30 '13 at 15:39
  • 2
    @RaphaelOliveira The Google frameworks are not distributable together with the x86 image because of licensing issues. What you need to do is manually copy the relevant Google library .jar(-s) and permission .xml(-s) from an -armeabi AVD of the corresponding Android version. Search keywords: "google maps library missing android x86 emulator". – conny Apr 30 '13 at 18:39
  • not able to install Install the HAXM Driver as my pc doesnt support Intel Virtualization Thecnology(VT-x). Any other solution? (not buying a pc jeje) – Guillermo Varini May 09 '13 at 01:34
  • I guess this changes the processor from ARM to x86? ^_^ so no native / JNI applications, am I right? – n611x007 May 31 '13 at 04:50
  • @naxa you can still do native, you just have to set up your build to make binaries for both platforms. – Nick Jun 14 '13 at 14:22
  • 1
    Except for issues with ARM / MIPS stuff. This is the best choice I guess. – Sharique Abdullah Jun 20 '13 at 19:28
  • 1
    Will this speed up the emulator? Thanks. – KarenAnne Jun 28 '13 at 07:10
  • What if i have to use Google API because i am running google services on emulator. – Ponting Jul 06 '13 at 16:08
  • 11
    Wow, can't thank you enough! Can't believe I was living with the slow emulator all this time. I thought that was normal. I really miss the fast start up times though, isn't there a way to enable snapshot alongside GPU acceleration? – Reda Jul 10 '13 at 12:20
  • 2
    Holy smokes, GPU emulation is the answer I have been looking for! The emulator runs perfectly now, and with the x86 image the startup time isn't thaaaaaat bad (still could be better). As @Reda asks, anyone know of a way to get snapshots and GPU enabled? – nerdherd Jul 20 '13 at 17:23
  • This `CPU` option will not be available for `Google API's`. Any suggestions for that? – Bharadwaj Jul 31 '13 at 09:37
  • 1
    I tried this, but the log said that HAXM failed to start, and still loading slowly... :( – awe Aug 06 '13 at 11:02
  • Didn't work for me. Don't know what's wrong on my system. For a moment, I imagined, my emulator on fire... Bad luck.. – Vamsi Challa Aug 19 '13 at 15:03
  • You are saying API17, but are showing API15.. – Guillaume Aug 21 '13 at 20:49
  • 1
    This worked, but I was stuck for a while on two things: first, "sudo kextunload –b com.intel.kext.intelhaxm" didn't work on my shell (macosx running bash) and I needed to use "sudo kextunload /System/Library/Extensions/intelhaxm.kext" instead when reinstalling the accelerator (I needed to up the RAM to 1536 MB). Second, I tried using an existing virtual device that was set up for acceleration, but it wasn't working; I set up a new one trying to mimic the settings above and that worked great. Initial startup took a few minutes, but after that seconds. – Ben Wheeler Sep 04 '13 at 18:07
  • 1
    well @Kshitiz Sharma , it DO works on Linux, but you cannot install it via the android manager as is... First you need Quem (via KVM), and then you may use it. I just installed it and voilá, pretty neat! :D look here for mor references: http://software.intel.com/en-us/blogs/2012/03/12/how-to-start-intel-hardware-assisted-virtualization-hypervisor-on-linux-to-speed-up-intel-android-x86-gingerbread-emulator – Javier Novoa C. Sep 11 '13 at 17:17
  • 3
    That works great. Thanks a lor for sharing this! When "Use Host GPU" is enabled, the emulator flickers heavily, but also without Host GPU enabled it's really fast now. – user1619275 Sep 12 '13 at 09:23
  • 1
    In my windows 7 64b setup, IntelHaxm.exe is in the C:\Users\\AppData\Local\Android\android-sdk\extras\intel\Hardware_Accelerated_Execution_Manager – numediaweb Sep 19 '13 at 11:04
  • 1
    I tried but failed. Finally I found a new virtual device should be created instead of editing the existing one, then it works !! – Jeff T. Oct 21 '13 at 06:41
  • You need to install HAXM manually: http://stackoverflow.com/questions/10761696/running-the-new-intel-emulator-for-android – cprcrack Nov 10 '13 at 14:23
  • 1
    This works for me: http://stackoverflow.com/questions/16091677/intel-haxm-installation-error-this-computer-does-not-support-intel-virtualizat – xtmq Dec 17 '13 at 19:33
  • 1
    @PrashanthSams - Thanks. It is much faster now, but goddamn phone is locked. Need to make is faster. I will also try dragon fire approach – Trojan.ZBOT Dec 22 '13 at 05:10
  • if your app have native c/c++ code in it then you need to add line in Application.mk Line: APP_ABI := all or for sake of efficiency append ",x86" at end. Otherwise app will crash or wont deploy. – Karioki Feb 21 '14 at 05:52
  • There is now a x86 image with Google API. You may want to update the answer. – Kaveh Feb 23 '14 at 19:52
  • 2
    It's really fast, but cause BSOD when running on windows 8 – ziftech Mar 05 '14 at 12:42
  • 2
    @Kshitiz Sharma For Linux user KVM. This was a great article: http://software.intel.com/en-us/android/articles/speeding-up-the-android-emulator-on-intel-architecture#_Toc358213272 – prasanthv Apr 04 '14 at 15:23
  • 1
    This solution will be usable ONNNNLY for a restricted range of CPU's! Not all Intel CPU's! For example my CPU is C2Duo E4600 and doesn't support Intel VT! And many of Intel processors are so. Refer http://ark.intel.com/Products/VirtualizationTechnology for details. – ABS May 11 '14 at 22:21
  • 1
    For Linux, try https://software.intel.com/en-us/android/articles/speeding-up-the-android-emulator-on-intel-architecture#_Toc358213272 – MeetM May 25 '14 at 14:14
  • 2
    One more trick is needed for large screen tablets and phones (else the emulator startup may stream logcat messages for a good part of an hour, then croak): (Step 1) **Install HAXM with 2048 MiB of memory.** (Step 2) **For a large-screen AVD, allocate up to 2048 MiB of memory.** Ignore the "Windows can't handle giving it more than 768 MB of memory" warning. (This assumes your computer has like 8+ GB of RAM.) – Jerry101 Jun 19 '14 at 08:06
  • 1
    Anyone who still has trouble installing Haxm even after VT is turned on, read [this](http://stackoverflow.com/questions/20019231/vt-not-supported-when-installing-haxm). – null Jul 28 '14 at 04:47
  • This solution doesn't work if you need Hyper-V (e.g. for other simulators like Windows Phone 8.1). – testing Mar 25 '16 at 09:36
  • Running the hardware accelerated images are faster, but they are still slow - very slow. I have pumped 4 gigs of RAM to get it to run at least without having 5 second delays. While it is a speedup to use HAXM, it still requires a massive amount of memory to run near decent – Zoe Sep 09 '17 at 07:25
  • HAXM has been open sourced: https://github.com/intel/haxm – AG1 Nov 15 '17 at 07:23
  • If HAXM didn't help you and you have Avast antivirus running try this answer: https://stackoverflow.com/a/57442277/5502121 it helper me on Windows – Kirill Karmazin Aug 10 '19 at 12:51
599

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

  1. Install VirtualBox.
  2. Download the ISO file that you need.
  3. 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.
  4. Install Android x86 on the emulator, run it.
  5. Press Alt+F1, type netcfg, remember the IP address, press Alt+F7.
  6. Run cmd on your Windows XP system, change the directory to your Android tools directory, type adb connect <virtual_machine_IP>.
  7. Start Eclipse, open the ADT plugin, find the device, and enjoy!
Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Pehat
  • 1,563
  • 1
  • 10
  • 24
  • 6
    so I connected. How do I get the screen to be vertical? I also don't see the phone hardware buttons anywhere. – Alex May 20 '11 at 01:54
  • 2
    well, I figured out some of the hardware buttons (below) but I still wish someone would tell me how to change the orientation to portrait mode. Home = Windows key; Back = Esc; Menu = Windows menu key (I had no idea my keyboard had one!); F4 = Reboot options; – Alex May 20 '11 at 02:20
  • 3
    I haven't found an opportunity to change screen orientation. http://groups.google.com/group/android-x86/browse_thread/thread/c5627d781f11743f they say that the orientation is probably hardcoded somewhere, and I can't find more information. Let me know if you solve the problem. – Pehat May 20 '11 at 12:23
  • 9
    See http://groups.google.com/group/android-x86/browse_thread/thread/eb93a1a3ad3b149d and http://groups.google.com/group/android-x86/browse_thread/thread/93302cfdd30f3572/202fc96508d0200c for changing screen resolutions. – Gili May 27 '11 at 17:26
  • 4
    Just to remind you guys that you need to enable mouse integration in the device menu if you like to use the mouse in the emulator! – kakopappa Jul 26 '11 at 04:05
  • 13
    Note that if you are using anything that's specific to ARM (like Mono for Android, for instance), it won't work on Android x86. – Matthew Groves Sep 07 '11 at 17:31
  • 4
    I decided to try and install on **VMWare**. Struggled all day trying to get eth0 to work. Found a developer building VMWare images that work seamlessly... http://groups.google.com/group/android-x86/browse_frm/thread/eb214d9e0f49e174?tvc=1&q=vmware# – Michael Gorham Sep 22 '11 at 00:22
  • 11
    For me, netcfg is showing lo 127.0.0.1 255.0.0.0 0x00000049 Is here 127.0.0.1 IP which I should mention in adb command ? its showing "unable to connect to 127.0.0.1:5555" Please help. – Riz Oct 16 '11 at 12:00
  • 3
    127.0.0.1 is "localhost", so you won't be able to use that to connect. you must not have networking working correctly yet. – jay Oct 20 '11 at 16:29
  • 2
    it did the same thing for me when i tried asus laptop, android-x86-2.3-RC1-eeepc.iso worked correctly – jay Oct 20 '11 at 16:51
  • 2
    also, i had to use NAT, for some reason the 10.* address wasn't working properly for me. then step 7 if you have been using the emulator, open run configurations, target tab, and make sure "Manual" is chosen for target selection mode. then run it and it will prompt you to select a device or AVD. – jay Oct 20 '11 at 17:32
  • It doesn't appear they have a single Google TV image for Android 3.1 – djangofan Dec 12 '11 at 02:47
  • With ADT rev 17 Intel acceleration is integrated. See http://android-developers.blogspot.jp/2012/03/updated-sdk-tools-and-adt-revision-17.html and http://developer.android.com/guide/developing/devices/emulator.html#accel-vm – ThomasW Mar 22 '12 at 05:13
  • 1
    No networking for me either with the asus_laptop image. Is the solution to use the eeepc iso? It isn't clear if that's the solution to the networking.... seems like we should be able to solve this with the asus_laptop image. Anyone? – MountainX Apr 09 '12 at 04:39
  • The Intel system image is still extremely slow... – James Wald May 26 '12 at 14:16
  • A similar setup that usese bridge mode is discussed here: http://androiddevnotes.com/2011/03/08/1299521520000.html – Tash Pemhiwa Sep 18 '12 at 20:52
  • 2
    Howto of the android-x86 project: http://code.google.com/p/android-x86/wiki/VirtualBoxHowTo @Click-Upvote: They took eeepc ISO. – sulai Oct 12 '12 at 15:31
  • 1
    To change screen resolution, for example to 320x480, follow this guide: http://stackoverflow.com/a/8273560/1208581 – sulai Oct 12 '12 at 17:32
  • I had a problem with the first ISO I tried. If you have the same problem, take a look at http://superuser.com/questions/410192/virtualbox-installing-iso-error-could-not-find-a-valid-v7-on-sda – Felipe Nov 26 '12 at 21:02
  • 1
    Cannot enable network. Should it just work? – jayarjo Dec 14 '12 at 07:51
  • use android-x86-4.0-RC2-eeepc.iso, see also http://www.android-x86.org/documents/virtualboxhowto – PiTheNumber Apr 17 '13 at 10:28
  • 1
    `Android x86` supports `Google API`? Because my project have maps to be loaded. – Bharadwaj Jul 31 '13 at 09:36
  • How is the GLES2 support ? Are things forward to the host GPU and running at 60 FPS or very far from it ? – RelativeGames Aug 18 '13 at 04:22
  • FYI, also runs fine in Parallels Desktop – lhunath Sep 05 '13 at 15:41
  • Whatever I do and whichever image I use, I cannot get android to see the network. I tried both NAT and bridge, I have DHCP on my network, but nothing works. I can't enable wifi in the android if that matters, and the android would not report its mac address. `netcfg` does show an address that belongs to my DHCP-enabled network, but I want the built-in browser to work. What do I do now? – GSerg Oct 29 '13 at 18:40
  • If you're using IntelliJ, use the "Show chooser dialog" to launch into x86. – occasl Dec 03 '13 at 18:17
  • 1
    if your app have native c/c++ code in it then you need to add line in Application.mk Line: APP_ABI := all or for sake of efficiency append ",x86" at end. Otherwise app will crash or wont deploy – Karioki Feb 21 '14 at 05:56
  • 1
    Here a video that show you how to do it step by step https://www.youtube.com/watch?v=7wIcFiRz76c – Jaider Jan 26 '15 at 17:23
  • This is very fast on my core i3 system with VT-x in both Windows (with Kaspersky) and Linux (no antivirus, slightly faster). It is as fast as booting it normally – Suici Doga Feb 18 '16 at 04:08
  • i changed the network setting to **Adapter bridged** and the ip changed and worked fine – Basheer AL-MOMANI Mar 21 '16 at 16:30
  • Step 4 states `Install Android x86 on the emulator,` – wal Jul 01 '16 at 01:39
  • Good idea, but doesn't seem to be working that fast. I've been waiting for 5 minutes for it to boot... – soger Nov 22 '16 at 14:12
  • This link shows how to perform step 4: http://www.tactig.com/install-android-6-0-marshmallow-virtualbox-pc/ – gimmegimme Feb 09 '17 at 03:38
  • Also I had to navigate to ~\AndroidSDK\platform-tools, NOT ~\AndroidSDK\tools, to find adb.exe – gimmegimme Feb 09 '17 at 05:01
  • to get adb connect to work, i had to follow the directions here: http://stackoverflow.com/a/30002653/1815210 – gimmegimme Feb 09 '17 at 05:37
  • The native Android emulator now supports x86 images too – Zoe Sep 09 '17 at 07:25
318

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.

Sayed Mohd Ali
  • 2,004
  • 3
  • 8
  • 25
blaffie
  • 460
  • 1
  • 8
  • 30
  • 52
    Genymotion is by far the best way to develop/test your app. It's not only quicker and better than a traditional emulator. It's quicker than a real device too. I use it for 99.99% of my deployments as it means I can see the results in a fraction of the time. It also means I can use OpenGL ES and other things which are not available on a normal emulator. – Eurig Jones Sep 14 '13 at 18:32
  • agreed Genymotion is the best thing I've ever used for android development – Furqan Sep 17 '13 at 07:11
  • This is clearly the best solution. You can also link up [this](http://www.infinum.co/the-capsized-eight/articles/is-your-android-emulator-just-too-slow) article which serves as a nice introduction. – silvenon Feb 08 '14 at 00:22
  • 2
    Newer versions of Genymotion do not include the GooglePlay Services. This link shows how to install them manually: forum.xda-developers.com/showthread.php?t=2528952 – Apfelsaft May 07 '14 at 06:35
  • @Apfelsaft I have tried the solution provided in the following answer. I used it a while ago and it worked fine. http://stackoverflow.com/questions/20121883/how-to-install-google-play-service-in-the-genymotion-ubuntu-13-04-currently-i/20137324#20137324 – Sufian May 10 '14 at 12:14
  • @Apfelsaft Refer to this answer [Play Store License](http://stackoverflow.com/a/11155703/1859777). In short, the Play Store is not licensed to run on the emulator. – blaffie May 10 '14 at 17:16
  • I wish the votes were re-set so everyone used Genymotion. By far the best emulator out there. – user2875404 Sep 12 '15 at 11:36
  • Genymotion is so fast, you'll take it for a real device or devices ;) –  Sep 25 '15 at 14:43
  • 2
    It's fine until you reinstall the VBox or any of the tools they use, then it stops working - uninstall doesn't help. But it _was_ good while it lasted. – milosmns Mar 29 '16 at 14:15
  • 5
    Genymotion is not free anymore(As it was when I used it last time),Not sure if this is still the best choice for developers – Zain Ali Sep 12 '16 at 14:09
  • 6
    Since Android studio 2 the emulator has been improved ten fold. It has plenty of features and performs well. – blaffie Nov 02 '16 at 14:28
  • @ZainAli It's still free for personal use at the moment – Dealdiane Mar 14 '17 at 00:28
  • 1
    I don't want to use the Genymotion. The question is why is the Android Emulator SO SLOW?? I don't know why, a few days ago it was running fast and smooth. Then I restarted my computer and it became extremely slow. It must be some reason for this – Ton Apr 22 '17 at 11:22
215

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.

Nicolas Raoul
  • 55,003
  • 52
  • 197
  • 338
  • 1
    vmware runs with unnoticed performance difference compared to the real machine. Even if emulator is emulating ARM it should be faster, even on the same system frequency and my PC is 3.6GHz which is slower than 500 MHz android phone. – NickSoft Mar 11 '12 at 11:04
  • @rds - So should my AVD emulate intel instead of ARM for it to load faster ? – Trojan.ZBOT Dec 22 '13 at 05:14
  • nope, this is not optimized for x86... it emulates x86 phone hardware - while the common phone nowadays easily outperforms the machine in question:) – Martin Zeitler May 28 '14 at 18:58
  • You do realize that both run the same emulator right? android-sdk\tools\emulator-x86.exe, nothing to do with Eclipse, you've probably just started using Intel x86 images with Intel HAXM. – Dan Dar3 Sep 08 '15 at 21:31
  • Well compared to how slow they where back in the days they go in lightning speed now. – Bolling Sep 18 '15 at 12:57
  • @Bolling: my experience is the opposite, VT-x accelerated x86_64 image on an x86_64 CPU is about as slow and laggy as was emulated ARM-v7 image in 2012. – Violet Giraffe May 30 '19 at 07:47
139

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.

Jay Askren
  • 9,793
  • 13
  • 48
  • 73
  • 41
    If it takes a couple of hours, there is probably something else wrong. It only takes a couple of minutes for me. – Jay Askren Oct 25 '10 at 12:59
  • what is your hardware configuration and operating system? – Junior Mayhé Dec 16 '10 at 23:16
  • @Junior Mayhe: I've programmed for Android using Windows, Mac, and Linux. I use Mac most often right now. The computers I've used have 2 to 4 gigs of RAM and a fairly modern 2 to 3 ghz processor. In all cases, it seems take several minutes to first launch the emulator, but then re-installing the app is fairly quick. – Jay Askren Dec 17 '10 at 15:23
  • 3
    @user286101: loading a new apk into an already running emulator takes no more than 10 seconds in my old laptop (1.6Ghz dual core, 1GB RAM), the only problem is I often forgot to leave the emulator running so I had to go through the slow rebooting process (which takes 3-5 minutes). – Lie Ryan Aug 12 '11 at 14:49
  • @LieRyan "should take no more than 10 seconds" sadly, that's about the time of a simular sized __C++__ project in today's machines. – kizzx2 Jan 14 '12 at 02:41
130

Intel released recommended installation instructions for the ICS emulator on May 15, 2012. This worked for me. The emulator is now fast and the UI is smooth.

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

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

And start it:

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

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

HAX is working and emulator runs in fast virtual mode

Otherwise, you may see this error:

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

  • Use GPU emulation. You cannot use the Snapshot option when using GPU emulation as of this writing. Ensure that GPU emulation is set to "yes".

  • Set the device memory to 1024  MB or more, but not more than the Intel HAXM setting. I use 1024  MB per device and 2048 for HAXM.

Always double-check the settings after saving! The emulator is very picky about what it allows you to set, and it will revert configurations without telling you.

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

On Mac OS you will need to hold fn + control for the F1 - F12 keys to work. Page up/down/left/right can be performed using control + arrow keys.

Sayed Mohd Ali
  • 2,004
  • 3
  • 8
  • 25
James Wald
  • 13,196
  • 5
  • 48
  • 63
  • Be careful when using a virtual machine with Intel HAXM. Apparently the virtual environment can become corrupt if system memory is exhausted. – James Wald Jun 14 '12 at 15:28
  • http://www.android-dev.ro/web/guest/home This is another good step-by-step instruction for setting up a HAXM x86 AVD in Eclipse. Additionally it explains how to set up Google APIs. – sulai Oct 15 '12 at 13:58
  • 2
    Not sure if that's me doing something wrong, but I closely followed the guide and got: "HAX is working and emulator runs in fast virt mode", just before the device started, but... it actually loads even slower than original arm version. I'm on Mac and CPU supports VT. – jayarjo Dec 09 '12 at 18:46
  • Do you also have hardware GPU emulation enabled? – James Wald Dec 10 '12 at 14:50
  • 4
    This is the right answer.. I have Intel x86 processor installed and I have GPU enabled. The emulator is very responsive and smooth with these settings. FINALLY ! If you need help setting it up on windows or mac let me know. Adios all – Tony Feb 09 '13 at 23:22
  • 2
    Thanks for this, tested on Windows 7 Pro, intel core i7 3770 and it works. On windows Intel Hardware Accelerated Execution Manager (HAXM) only need to be installed, it will start automatically. Just create an AVD with Intel Atom x86 and ensure 'use host GPU' is selected – gerrytan Mar 14 '13 at 00:35
  • I confirm that the emulator now runs like a F1 car on Mac OS. – poiuytrez Jun 25 '13 at 09:59
  • i donsnt have HAX any other solution for this? – PankajAndroid Jul 16 '13 at 05:24
  • Another pro tip, on Mac machines you can get additional details about the Intel kernel extension using the `kextstat` command, e.g. `$ kextstat | grep intelhaxm`. – James Wald Apr 07 '14 at 07:30
  • do i have to stop (because you said I should start it) the Intel HAXM after i finished my work with eclipse? – John Brunner Jun 29 '14 at 16:08
  • I generally leave it loaded all the time. It only consumes memory while emulators are running. – James Wald Jun 29 '14 at 21:50
112

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>
evandrix
  • 5,608
  • 4
  • 25
  • 33
andgps
  • 231
  • 1
  • 3
  • 2
  • Adding `-no-boot-anim` reduced the startup time by around 38%. Thanks! – Timothy003 Jun 10 '11 at 21:39
  • 3
    (Android Studio) Select **Run > Edit Configurations...**. In the left panel of **Run/Debug Configurations dialog**, select or create a configuration. Under **Target Device** options, select AVD. In **Emulator** tab, enter `-no-boot-anim` in **Additional command line options** field – Ivan Chau Jun 26 '15 at 03:58
104

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Fedor
  • 42,643
  • 9
  • 75
  • 86
61

Emulators are slow. There's really nothing you can do about it, but there are alternatives to the emulator.

  1. Genymotion - Preferred

  2. VirtualBox

  3. BlueStacks

  4. YouWave

  5. Windows Android Emulator

  6. Jar of Beans

  7. 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.

evandrix
  • 5,608
  • 4
  • 25
  • 33
JRE.exe
  • 751
  • 1
  • 13
  • 26
  • I have used Genymotion, and I have to say it is comparatively fast than the default Android emulator. – Anurag Nov 18 '15 at 07:21
  • "Why use an emulator, BTW? Using a real phone makes more sense." I'm at work, and we don't have enough phones to go around. I'm not a tester, so I don't get priority on them. – Almo Jan 30 '18 at 15:01
  • the emulator isn't slow, but your machine. x86 images suggested. – Martin Zeitler Mar 02 '18 at 11:01
  • @Almo, Real phones are a good choice, but emulator give you space to make your app compatible with most of android Version + design in different screens, ... that's the way to let your app run with fewer bugs before it goes to testing with real phones. I have personally seen some of the design issues can be easily fixed via checking them in the different emulators ... Not all can afford to have at least 1 phone of different os and screen sizes ... – Bhuro Aug 27 '18 at 03:58
51

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Jokin
  • 3,904
  • 1
  • 28
  • 30
  • I just discovered this myself. Makes the emulator run almost as well as a real device! – gak Apr 13 '12 at 00:20
  • Note that to use GPU acceleration you must use Android 4.0 or later. Also, with current tools you can't use BOTH snapshots and GPU acceleration at the same time, you have to choose (I personally prefer having GPU acceleration and slow emulator start). – mav Nov 05 '12 at 21:09
47

Try to disable your antivirus. Maybe it will make emulator a little bit faster.

Fedor
  • 42,643
  • 9
  • 75
  • 86
45

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:

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)
micha
  • 42,796
  • 15
  • 68
  • 78
41

The option -cpu-delay <delay> described in Emulator Startup Options can help.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
toosla
  • 41
  • 2
  • 2
41

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.

Jamie H
  • 590
  • 8
  • 29
Timothy003
  • 2,289
  • 4
  • 27
  • 33
35

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
mobiledev Alex
  • 1,976
  • 2
  • 25
  • 30
35

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.

Sayed Mohd Ali
  • 2,004
  • 3
  • 8
  • 25
Filip Dupanović
  • 28,429
  • 11
  • 76
  • 105
31

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
tylerl
  • 28,220
  • 12
  • 76
  • 108
  • Does it mean that if we buy the latest Raspberry Pi with ARM processor, we will be able to use the Android ARM emulator without the slowness of emulating ARM on x86 / x86_64? Is the latest Raspberry Pi CPU and GPU good enough to have a fast emulator? Does Google provide an ARM version of Android sdk-tools in order to use an ARM emulator? – baptx Oct 14 '19 at 08:45
30

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.

SDK Manager Screenshot

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).

AVD Create Options Screenshot

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.

Sayed Mohd Ali
  • 2,004
  • 3
  • 8
  • 25
Amin Rahkan
  • 109
  • 3
  • 10
29

Try Genymotion for Android Studio. Blazing fast! Just needs one time installation. No more AVD pain.

Vipul J
  • 6,393
  • 9
  • 43
  • 60
28

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
eggsy84
  • 999
  • 13
  • 25
  • 64-bit java is faster ( ~2 times) than 32-bit java on same machine. – Mostowski Collapse Sep 08 '11 at 15:19
  • 16
    I can't see why the emulator speed should depend on the Java version. The emulator is not written in Java and does not run on the JVM. – Lena Schimmel Nov 01 '11 at 19:56
  • I'm using 64-bit Oracle Java 1.6.0_26 and my Emulator is slower than a turtle... its painful. Core2Quad, 64-bit Java+Ubuntu 11.10, 8GB Ram. – djangofan Dec 12 '11 at 02:54
  • If it's not written in Java and does not run on the JVM, then why does it require Java (and not any version of Java either!) – Rolf May 25 '14 at 17:03
28

A new option is the Visual Studio Emulator for Android--it's fast, Hyper-V, x86, and free to download even without VS.

John Kemnetz
  • 2,397
  • 19
  • 22
  • Is it only for Windows? – Robert Jul 21 '15 at 07:12
  • Yes--it uses Hyper-V, which is only on Windows. – John Kemnetz Jul 22 '15 at 18:58
  • I agree with the claim - the best emulator on the planet. I am a witness after suffering from using other emulators for quite a few years. It is so much better than others, especially when it comes to debugging. Genymotion is not bad but it requires VirtualBox that conflicts with Hyper-V. This answer needs to go to the top. – Hong Aug 01 '15 at 18:20
  • 2
    @JohnKemnetz may I add only on Windows Professional or higher. – an earwig Aug 06 '16 at 23:32
25

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.

Enter image description here

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Harvey Darvey
  • 679
  • 8
  • 15
  • 3
    This sped things up quite a bit on my Windows 7 machine – Rocco The Taco Jan 11 '13 at 20:45
  • How to do that on Windows 8? – Eng.Fouad Feb 17 '13 at 18:37
  • I suppose you could use Windows 8 task manager to do the same ? Sorry I don't have windows 8 at the moment. – Harvey Darvey Mar 01 '13 at 06:14
  • 2
    On Windows 10, and I assume Windows 8 as well, you have to go to the `Details` tab in the `Task Manager` to do this. Though in my case all 4 cores were already selected. I wish they'd allow AMD devices to run the x86 images as well, even without the HAXM driver they should be faster than the ARM images. – A.Grandt Jan 08 '16 at 08:32
21

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).

Sayed Mohd Ali
  • 2,004
  • 3
  • 8
  • 25
Ahmad
  • 58,947
  • 17
  • 107
  • 133
  • It's really very fast! How can I modify it for requirements like 7' (800x480) tablet? I tried change app size but it's already a tablet. – nesimtunc Jun 03 '13 at 12:44
  • I think you meant "fluid and fast" :) Anyway, thanks. Nice tip, too bad it runs Android 2.2 – Rolf May 25 '14 at 17:23
  • 2
    @Rolf Oh right, haha :) However, this answer is old. You should check out Genymotion. It's *way* better. – Ahmad May 25 '14 at 18:00
21

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Ken Goodridge
  • 3,716
  • 1
  • 17
  • 22
20

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/

Anil8753
  • 2,059
  • 2
  • 18
  • 30
  • how do you calculate dude? it's an operation system and need a lot of ram to run. and 13 Mb It's really stupid please watch again. – MSS Apr 04 '15 at 18:14
  • @MSS I do not know the background history behind VS Emulator but I did it practically and found what I said. – Anil8753 Apr 05 '15 at 12:04
  • Maybe You Made Mistake I Meant It's Impossible To Emulate Real Android OS in such Small Piece Of RAM And VS Emulator Must Be A Simple Debugging Environment For C# Made Applications And Probably Unable To Run Standard Android Application. – MSS Apr 05 '15 at 12:17
  • Yes, I am not sure about that it is real full Android emulation or just a light basic Android features emulation. Please let it give a try. Run this emulator first and later deploy your Android studio App. – Anil8753 Apr 05 '15 at 14:47
  • I am developing android app using Android Studio and deploying it similar to other ADB devices. Just give a try – Anil8753 Apr 05 '15 at 16:43
  • probably MS runs emulator thru virtualization. virtualization governor - software won't show you real resources used by VM – razor May 26 '16 at 11:07
20

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
17

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%.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Vinayak Bevinakatti
  • 38,839
  • 25
  • 103
  • 135
17

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Alex S
  • 31
  • 1
  • 2
15

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. enter image description here

And Instant run will look like this New Run & Stop Actions in Android Studio for Instant Run

However Android Studio is right now in Preview you can try it now.

Umer
  • 1,491
  • 2
  • 19
  • 29
  • 1
    Android Studio 2.0 is stable now. Instant run increases build speeds not emulator speed, check for more info: – Arūnas Bedžinskas Apr 08 '16 at 12:47
  • The new emulator runs ~3x faster than Android’s previous emulator. and now you can now push apps and data 10x faster to the emulator than to a physical device. http://android-developers.blogspot.ae/ – Umer Apr 09 '16 at 08:40
  • 1
    Please be aware that when you are using Instant Run, there are some issues when installing on devices < 5.0. If you see that your app crashes on devices from kitkat and below, disable instant run and re-build it. You should be good to go.. – Vamsi Challa Jun 09 '16 at 12:20
14

The older Android versions run a lot faster. When I'm on my netbook, I use Android 1.5 (API level 3). There are a couple of drawbacks, though--your apps need to support the older platforms (obviously), and ndk-gdb requires running Android 2.2 (API level 8) or higher. But regularly testing apps against older platforms is a good idea anyway.

Timothy003
  • 2,289
  • 4
  • 27
  • 33
13

Simple easy solution for beginners. I have tried many ways and stopped with Genymotion in combination with Eclipse. Genymotion simply adds a virtual device to Eclipse.

Step by step:

  1. Download Genymotion with VirtualBox included from here.
  2. Install this package included build in VirtualBox.
  3. Install the plugin into Eclipse from here.
  4. Start GenyMotion and create a virtual device you want use, and start it.
  5. In Eclipse, go to Window -> Preferences -> GenyMobile -> GenyMotion, and set the path to GenyMotion (in my case, C:/ProgramFiles/GenyMobile/Genymotion).
  6. Click on a project name in Eclipse that you want to start. Start the application using "Run as". In the list of devices, you should see the emulated device.
  7. You cam emulate what you want.

In my case, this solution is the one and only fast solution. No emulators in Eclipse have never worked so fast, and every setting was very slow. Only this solution works almost in realtime. I can recommend (notebook i3, 2.6 GHz).

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
mira
  • 996
  • 2
  • 14
  • 31
10

On a 3.4 GHz quad core 6 GB of RAM, Windows 7, the emulator was unusably slow! I downloaded Launcher-Pro.apk through the emulator, installed it and set it as the default launcher. It doubled my emulation speed! The screens load much smoother and faster. It doesn't seem to download in 2.1 or 2.2, only in 2.0.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
OldNoob
  • 29
  • 1
  • 3
8

If you have an Intel CPU, install Intel Hardware Accelerated Execution Manager.

Then assign it as the emulator's CPU in Emulator Settings. When I did it on my Core i7 CPU, it was taking about 10 minutes. Now it is opening in 15 seconds.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
hakiko
  • 4,737
  • 6
  • 49
  • 96
8

A few things that definitely sped things up for me with this were

1. delegating the rendering process to the GPU by checking "Use Host GPU" checkbox in AVD's edit window.

2. downloading the Intel Atom (x86) image or if you are a windows/mac user downloading the Intel x86 Emulator Accelerator HAXM

Unfortunately the thing with Intel x86 images is that you don't get Google Apps, they only come with ARM images.

which is where Genymotion comes in handy

  1. Download and install VirtualBox. For Windows users it's not necessary to install VirtualBox separately, because it is available from the Genymotion site, bundled with the Genymotion emulator.
  2. Go to Genymotion website and sign up. You'll receive a validation mail, so just click on the validation link to proceed.
  3. Download and install the Genymotion emulator.
  4. Start Genymotion. You might need to configure path to your Android SDK location in Genymotion settings (probably if you've installed SDK in a non default location). Since this is a first start, there are no devices. Click on "Add" and download new device. To see available devices, write your credentials in the pop-up dialog and click "Connect".
  5. Select the device and click "Start".
NooBskie
  • 3,487
  • 20
  • 46
7

For a better experience, I would recommend the shop.genymotion.com licensed genymotion. If you want to test it out, first you can get genymotion here

RevanthKrishnaKumar V.
  • 1,779
  • 1
  • 19
  • 33
Ajay Pandya
  • 2,319
  • 4
  • 28
  • 64
7

You can try our new Android virtual machine, Leapdroid, which is fully compatible with the original Android emulator. Since it uses virtualization technology, instead of emulation, it provides pretty much native speed. In addition, we use a new OpenGL technology called LeapGL, which performs OpenGL graphics in native speed. Our vm has the best performance compared to others.

http://www.leapdroid.com

Source code: https://github.com/leapdroid

Leapdroid is fully compatible with Eclipse and Android Studio, as it uses the same adb ports.

huisinro
  • 1,053
  • 10
  • 15
7

I wonder why nobody has mentioned the Visual Studio Emulator as an alternative. It's way faster than the native Android Studio Emulator.

Here's a link to performance comparison: https://medium.com/android-news/how-visual-studio-emulator-for-android-can-improve-your-android-development-9e17a6213839#.hlh7ba6ut

enter image description here

What's even better is that the apk files and even gapps (or any other flashable zip) can be installed just by drag and drop. However, the downside is that it requires Hyper-V which is only available on Windows (that too, from Windows 8 onwards). Other limitations (along with the description of the above) and other details can be found here: https://blogs.msdn.microsoft.com/visualstudioalm/2014/11/12/introducing-visual-studios-emulator-for-android/

T.M
  • 797
  • 10
  • 16
  • "I wonder why nobody has mentioned the Visual Studio Emulator as an alternative." It's suggested right here: http://stackoverflow.com/a/28417080/508666 – PeeHaa Jul 12 '16 at 09:15
7

I tried booting the emulator from Eclipse (Indigo and Android 1.5, no Snapshot) and after 45 minutes I stopped it, because nothing had happened.

Statistics: Phenom Quad @2.6 MHz with 4 GB DDR2 Corsair Dominator @800 MHz. The AVD is on an SSD drive and the emulator on a 7200 RPM HDD.

I started the emulator manually with the -no-boot-anim option and it loaded in 30 seconds. :)

In CMD, navigate to folder where the emulator.exe file is and type

emulator.exe @<YourAVDFromEclipse> -no-boot-anim

The emulator.exe file is located in the Android SDK folder under Tools.

In Windows, you can find the the Android Virtual Device(AVD) under C:\Users\<NAME>\.android\avd.

The projects run from inside Eclipse, targeting the AVD you booted, show up just nicely :D

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Andrei
  • 1,658
  • 20
  • 29
  • I would appreciate to know why i got downvoted. This worked for me on a second development machine (a laptop with a core2 and 3GB RAM with a 5200 rpm HDD) – Andrei Jan 16 '12 at 16:33
6

Android ADT 18 now includes a (beta) GPU enabled option (simply enable the GPU acceleration from your AVD properties). It makes a huge difference and even ICS feels relatively comfortable now.

Stephan Tual
  • 2,537
  • 3
  • 23
  • 45
6

You may try Genymotion instead of android emulator. It is faster and better than the android emulator.

Avi Parshan
  • 1,427
  • 2
  • 19
  • 23
vishal grover
  • 47
  • 1
  • 7
6

My solution is Vysor . I get both of the best worlds. I don't put too much charge on my machine, but I can also see my real Android device on the screen so I don't have to reach for it, take my hands off the keyboard etc. Furthermore there are always some feature that don't work best on an emulator.

There is free version with ads and a payed one which compared to other solutions, won't break the bank.

r3dm4n
  • 991
  • 2
  • 16
  • 31
5

I have noticed that an emulator gets slow over a period of time. So, one can delete the emulator which gets very slow and create a new one with the help of the AVD manager. I have tried it a couple of times and it works well.

ambit
  • 1,039
  • 2
  • 27
  • 42
5

The fastest emulators at the moment of writing this are the built-in x86 emulators which come with the Android SDK. You can find them in AVD manager where you create virtual machines. Simply pick any of them and then you pick the type of CPU (choose x86 for best performance). It will be as fast as your machine.

The latest such machine for Android 4.0 and 4.0.3 can be found in Giving your Android Emulator a Boost: Building Android ICS with Goldfish & x86 KVM support on EC2 - TestObject.

Note: This is only for a development purpose. To test for performance, you still have to either use a real device or test on the emulator with ARM CPU.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
sandalone
  • 38,958
  • 59
  • 205
  • 324
5

I would insist you to install BlueStacks now as it works the same as the emulator with many other functionalities in that (for example, it gives access to Android Market). Also you can run applications directly from Eclipse to BlueStack Device/Emulator with a great performance speed. It just takes a fraction of second to run your application from Eclipse to the BlueStack emulator.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Lalit Poptani
  • 65,659
  • 21
  • 155
  • 238
5

I just noticed something I can't explain, but hey, for me it works!

I was compiling Android from sources anyway and the built-in emulator started in a few seconds (my machine is dual core AMD 2.7 GHz) and in a minute, perhaps two at the first run, the system was up. Using Eclipse ADT bundle, on the other hand, resulted in half an hour of emulator startup. Unacceptable.

The solution that works here (I have no means to test it on other machines, so if you feel inclined, test and verify):

  • Download and build Android SDK on your machine. It may take some time (you know, compilation of whole system is tiresome). Instructions can be found here:
    1. Initializing
    2. Downloading
    3. Building (I changed commands to 'lunch sdk-eng' and 'make sdk -j4'; besides that build tips are useful, especially concerning ccache and -jN option)
  • When done, run 'android' and the SDK manager should appear. Download tools and desired platform packages. If commands are not found, try rerunning '. build/envsetup.sh' and 'lunch sdk-eng' commands to set up pathes; they are lost after exiting a terminal session.
  • Run 'emulator' to check how fast it starts up. For me it's MUCH faster than the Eclipse-bundled one.
  • If that works, point Eclipse to the SDK you just compiled. Window-Preferences-Android in left pane -> choose SDK location. It should be dir with 'tools' subdir and something in 'platforms' subdir. For me it's <source base dir>/out/host/linux-x86
  • Apply/OK, restart Eclipse if needed. If it does not complain about anything, run your Android app. In my case, the emulator starts in a few seconds and finishes boot in under a minute. There is still a bit delay, but it entirely acceptable for me.

Also, I agree with running from snapshot and saving state to snapshot. My advice concerns only emulator startup time. I still have no idea why it is so long by default. Anyway, if that works for you, enjoy :)

RevanthKrishnaKumar V.
  • 1,779
  • 1
  • 19
  • 33
zencodism
  • 412
  • 4
  • 7
5

You can download the genymotion emulator from here. This is fast and efficient.

evandrix
  • 5,608
  • 4
  • 25
  • 33
Kaveesh Kanwal
  • 1,660
  • 15
  • 16
5

Now instead of using emulator we can test Android apps using ARC Welder app on Chrome, App Runtime for Chrome

DineshM
  • 799
  • 1
  • 14
  • 24
5

I suggest you to use the Android phone for developing by USB Debugging. It gives better experience in testing the apps and a better output compared to virtual devices. Or you can also use the options mentioned in rest of the answers and can go with Bluestacks App Player, it is also a good option in case of non-availability of Android Device.

abissa
  • 153
  • 1
  • 10
5

I've similar issues on a Mac. What I did;

  • 1) on the emulator, settings-display -> disable screen orientation
  • 2) on Eclipse, emulator startup options -> -cpu-delay 100

Those had some effect in lowering CPU use (not it is around 40-60%), not ultimate solution. But again, the CPU use is NOT >100% anymore!

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
beerstorm
  • 7,882
  • 3
  • 28
  • 41
5

You need more memory.

Here's why I say that:

I'm using VirtualBox on Windows to run Ubuntu 10.10 as a guest. I installed Eclipse and the Android SDK on the VM. My physical box has 4 GB of memory, but when I first configured the Ubuntu virtual machine, I only gave it 1 GB. The emulator took about 15 minutes to launch. Then, I changed my configuration to give the VM 2 GB and the emulator was running in less than a minute.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Corey Trager
  • 21,253
  • 16
  • 78
  • 121
  • i have 16Gb 1333 Ram in i5 with sad disk and it is slow as hell .. the problem is not in ram :-( – Zorb Jun 02 '14 at 19:26
  • The problem is ram if you give it too little. But diminishing returns. There's probably isn't much of a difference between 4gb and 5gb. – Anubian Noob Jan 06 '15 at 04:54
  • how about if we just follow the windows default setting for making that virtual memory allocation@Corey? – gumuruh May 02 '15 at 15:31
4

Remove unwanted activation of some of the plugins at start-up by going to windows-->preference-->General-->Startup and shutdown. Also make sure you don't use those plugins in any of your views

Eclipse is not a word processor. Better to disable the spell check. Disabling spell check will reduce the eclipse burden by going to Windows-->Preference-->General-->Editors --> Text Editors-->Spelling

When eclipse builds the project, it will delete all output folders and rebuild classes built by other compilers. We can disable such features, as deleting the output folders and rebuilding will take sometime. Goto Windows-->Preference-->Java-->Compiler-->Building

Disabling label decorations which is of less use for you, will also help you to gain some performance . Goto Windows-->Preference-->General-->Appearance-->Label Decorations

Close unwanted projects and use working set option to move from one group of project to another smoothly.

You could also disable Eclipse automatic building, if it is not needed for you. Goto Project-->Build Automatically (uncheck it)

Do not keep lot of tabs opened in the editor. Better to have around 20 tabs . Regularly close the unused tabs. To open resource we can always use ctrl+shift+R and ctrl+shift+T (java resource) instead of opening lot of tabs

Disable unwanted plugins. Full J2EE eclipse version has an option to disable/uninstall plugins. Goto Help-->Software Updates-->Manage Configuration. Right click on any installed plugin to get disable option. If this option is not available then enable Classic Update by going to Windows-->Preference-->Capabilty and check classic update. Now the manage configuration option should be available in help menu

Zeeshan Mirza
  • 4,359
  • 3
  • 18
  • 32
4

This is what has worked for me:

  • Setting AVD RAM to 512 MB
  • Setting SD card memory to 10 MB
  • Setting a large SD card memory size is one of the biggest causes of a slow AVD.
Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Buzz
  • 492
  • 8
  • 16
4

Gone were those days, when we used to run projects on slow Android Emulators. Today, Android Emulators are on steroids.. Yeah you heard me. No other emulators are as fast as Android Emulators. You can go to my blog for more details:

http://androidveteran.blogspot.in/2016/01/android-emulator-multi-touch.html

I have explained in details about new Android Emulators. Check it out.

Believe me they are as fast as your real device works.

Chintan Soni
  • 22,543
  • 24
  • 96
  • 158
  • Well, you call this fast? AS 2.1.2, Marshmallow, latest image downloaded right now, HAXM, everything. The emulator itself can't start in about 30 minutes, let alone testing anything on it... – Gábor Aug 14 '16 at 19:37
  • @Gábor may i know your hardware configurations ? – Chintan Soni Aug 15 '16 at 03:36
  • 2
    Quad-core @ 2,4 GHz, 8 GB memory, system on SSD with plenty of free space, Windows 10 Pro, AS 2.1.2, HAXM 6.0.3 (as per the SDK Manager). The virtual device is a Nexus 5X/6 as created and downloaded by the AVD Manager, fresh. I can't run anything directly from AS because it always times out at 300 sec. I tried to start the emulator first and leave it running but it can't start in 25-30 minutes. Not freezing, the "android" logo is animated all the time. Instant Run enabled. Running on my physical device is error free. – Gábor Aug 15 '16 at 10:18
4

I would suggest playing around with the OpenGL settings. I have a dual-core (quad-thread) i3-2350M running on it's internal GPU, and I get terrible performance if I use SwiftShaders, but changing it to "Desktop Native OpenGL" (Extended Controls > Settings > OpenGL ES Renderer) makes it run smoothly.

If the device doesn't boot, play around with the OpenGL ES API Level setting and the GPU emulation setting in the device config.

I don't know why, but on my 2011 Intel processor, it makes a world of difference.

Potassium Ion
  • 1,687
  • 16
  • 37
3

Now on ADT 21, it provides more options for a fast emulator... You should use 512 MB RAM, lower CPU Time, Device Selection and VM Heap Size high. For better results, you should use Intel Atom in CPU/ABI... Using Snapshot and CPU Host may not increase your speed of the emulator, but there are useful ones for other purposes.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Sagar Maiyad
  • 12,164
  • 8
  • 57
  • 96
3

I just started yesterday on Windows 7 and was facing the same problem. The easiest solution, I found and is working for me is to use the low config device in the emulator. I used Nexus One instead of Nexus 7 and select the snapshot for the device in Android Virtual Device.

And, also important is to leave open the emulator. It works both in Eclipse and Android Studio.

In a window, it says snapshot does not generally work when RAM is more than ~700. So, selecting a lower configured one easily help to test Hello World and then for developing your application. Later, we can test on a high-end device.

For me, virtualization support does not work as my hardware does not support it.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Satya Prakash
  • 2,966
  • 3
  • 26
  • 45
3

The use of Android x86 provides better productivity than the Android emulator.

Whereas working with Android x86 4.2, it provides extremely fast debugging compared to Android emulator. It's many many times faster for configuration

It is working with the latest Android X86 4.2 (Jelly Bean) and VirtualBox.

I have found different ways to connect with the Internet and ADB.

Step: 1 Selection of Adapters

CASE 1: Only Internet {NAT Adapter}

The easiest solution is just use a NAT adapter that will directly connect you to the Internet if the host is connected to the Internet, but you won't get the ADB connection with this setup.

Here you will get a public IP address, so you can't connect to the host computer.

NAT Adapter

Case 2: Only ADB (host-only adapter)

The easiest solution is just use the host-only adapter.

Host Only Adapter Settings

Note: The default host-only adapter may not work due to DHCP server settings. Either create a new HostOnlyAdapter or run DHCP server for existing an adapter.

Case 3: For both ADB and Internet (bridge adapter)

You will have to take care in this case.

If you are using LAN for the Internet connection you shall use the bridge adapter with your Ethernet card. It will give you a local IP address and the virtual machine will connect to the Internet using the host machine.

Alternatively if you are with Wi-Fi, just do the same by selecting the Wi-Fi adapter.

For other types of connection, you shall go with the same way.

Bridge Adapter

Step: 2 Connection with ADB

To check the IP address, just press Alt+F1 (for a console Window). (To switch back to the graphics view, press Alt+F7.)

You will see the console window. Type netcfg.

It will show the IP address.

Now move on to your host, run the command prompt, and move to the adb directory.

type adb connect <your IP address>

Example

adb connect 192.168.1.51

Note: If ADB is not running or responding you can do the following.

adb kill-server

adb start-server

You can check devices connected to ADB:

adb devices

For the original question, click here.

Community
  • 1
  • 1
Trikaldarshiii
  • 10,566
  • 16
  • 61
  • 90
3

Try to reduce the screen size of the emulator while creating a new Android virtual device.

I have seen that this will launch the emulator very fast compared to the default options provided in AVD manager.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Puttaraju
  • 473
  • 6
  • 14
3

Try reducing screen size, and maybe you should consider using Ubuntu. I've had the same issue, and somehow my emulator on the same PC works five times faster when using Linux.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Darko Petkovski
  • 3,742
  • 10
  • 49
  • 110
  • Screen size has nothing to do with it, and Ubuntu is, in my experience, as slow as Windows 7. –  Dec 13 '13 at 08:47
  • 1
    I think screen size can affect speed. More pixels = more calculations and more RAM necessary. How can you be so sure that "screen size has nothing to do with it"? – Rolf May 28 '14 at 21:41
3

Short answer: because of the ARM -> x86 instruction translations. The Emulator works in a similar fashion to a virtual machine that is tasked with booting a full fledged OS and running your test application afterwards. The ARM -> x86 translations can be very time consuming, less for your app, but more for when the OS is booting (it's proportional to complexity and number of instructions involved).

Some suggested running the code on x86 emulators. What this means is instead of loading an ARM based OS, you load an x86 variant that will run faster on your x86 machine, as no ARM->x86 translation are necessary. Still, this is not a perfect solution:

Android applications that use NDK and come packed with native libs (*.so) compiled for ARM, will not work on x86 emulators, so such programs will fail to run. But if you get to that point and get to deal with NDK/native JNI code, you probably know enough about emulators already.

radhoo
  • 2,677
  • 22
  • 27
3

Using the ADB utility I've discovered some more information that is important.

The emulator is actually running, but it seems like the graphical interface may be the problem.

When the Android splash screen is up and you are waiting forever it looks like the following: enter image description here

The emulator is actually running because you can run the following command-line tool and see the listed processes:

adb -s emulator-5554 shell ps 

That will provide you with a list of processes which are running on the device, which seems stuck.

I piped the output to a file and here is a list of all the running processes:

USER     PID   PPID  VSIZE  RSS     WCHAN    PC         NAME

root      1     0     696    500   c02ae25a 0805a406 S /init
root      2     0     0      0     c02315a2 00000000 S kthreadd
root      3     2     0      0     c021f9dc 00000000 S ksoftirqd/0
root      5     2     0      0     c022e8d7 00000000 S kworker/u:0
root      6     2     0      0     c022e085 00000000 S khelper
root      7     2     0      0     c022e8d7 00000000 S kworker/u:1
root      255   2     0      0     c02886de 00000000 S sync_supers
root      257   2     0      0     c028935e 00000000 S bdi-default
root      259   2     0      0     c022e085 00000000 S kblockd
root      267   2     0      0     c022e085 00000000 S ata_sff
root      278   2     0      0     c04f610f 00000000 S khubd
root      283   2     0      0     c022e085 00000000 S md
root      297   2     0      0     c022e085 00000000 S cfg80211
root      298   2     0      0     c022e8d7 00000000 S kworker/0:1
root      413   2     0      0     c0283057 00000000 S kswapd0
root      481   2     0      0     c02cd713 00000000 S fsnotify_mark
root      501   2     0      0     c022e085 00000000 S crypto
root      590   2     0      0     c022e085 00000000 S iscsi_eh
root      611   2     0      0     c048aa21 00000000 S mtdblock0
root      619   2     0      0     c048aa21 00000000 S mtdblock1
root      627   2     0      0     c048aa21 00000000 S mtdblock2
root      666   2     0      0     c022e8d7 00000000 S kworker/0:2
root      700   2     0      0     c022e085 00000000 S binder
root      724   2     0      0     c022e085 00000000 S deferwq
root      725   1     624    348   c02ae25a 0805a406 S /sbin/ueventd
root      932   2     0      0     c055236e 00000000 S mmcqd/0
root      939   2     0      0     c0340f30 00000000 S yaffs-bg-1
root      941   2     0      0     c0340f30 00000000 S yaffs-bg-1
root      942   2     0      0     c0340f30 00000000 S yaffs-bg-1
system    943   1     1340   400   c056a35d b76a1eb6 S /system/bin/servicemanager
root      944   1     5540   924   ffffffff b7646c11 S /system/bin/vold
root      947   1     1548   504   c05785ce b766c163 S /system/bin/debuggerd
radio     948   1     6420   1016  ffffffff b76d3c11 S /system/bin/rild
system    949   1     20088  2876  ffffffff b7655eb6 S /system/bin/surfaceflinger
drm       951   1     10480  2920  ffffffff b7585eb6 S /system/bin/drmserver
keystore  954   1     5036   1416  c056a35d b765deb6 S /system/bin/keystore
root      955   1     1324   440   c02d0083 b76b28ab S /system/bin/qemud
shell     958   1     1428   668   c03e9ad9 b767fa76 S /system/bin/sh
root      959   1     4680   304   ffffffff 08063530 S /sbin/adbd
graphics  1012  1     17980  4276  ffffffff b7652eb6 S /system/bin/bootanimation
media     4743  1     25288  6232  ffffffff b75beeb6 S /system/bin/mediaserver
root      4744  1     3944   1164  00000000 b7628976 R /system/bin/netd
root      4770  4744  0      0     c021de78 00000000 Z iptables
root      4771  959   1768   540   00000000 b766fa76 R ps

For fun I then ran the following command and killed the "Android" animation:

adb -s emulator-5554 shell kill 1012

The splash screen became blank so something is really happening.

I tried and succeeded at killing some other processes and that made me feel good but the emulator still didn't ever seem to start. Oh well. I'm running a QuadCore i7 with 8Gb of ram. Also running the haxm with the settings described in other posts in this question.

Note: I'm updating this on 09/19/2014 - I learned that this odd behavior where the emulator would attempt to start the instance but never would was all related to the file rights on the emulator files. They were set to read-only because of the way they were copied, so the emulator attempts to install and write to its "virtual disk" but it's "virtual disk" is really a file or set of files which my OS has set to read-only and so it fails. These failures cause the emulator to never start. I set the files to full access and the emulator starts up in record time.

raddevus
  • 5,847
  • 5
  • 51
  • 65
3

Add some more RAM and use SSD drive. Android Studio is best run on 8 to 12 GB of RAM using SSD drives based on my experience.

LEMUEL ADANE
  • 6,680
  • 14
  • 48
  • 64
  • I have 10GB ram and using SSD on my laptop. my processor is i3, with a graphic card Nvidia Geforce 920M. The emulator still slow. – MaXi32 Oct 01 '16 at 08:50
3

I just took the default Android 3.1, and it was very slow, but since I realised my code was Android 2.3.3 compatible I switched to that. It's about 50% quicker and also the emulator looks more like my phone, and has a keyboard permanently displayed so that it is easier to use.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Paul Taylor
  • 12,050
  • 34
  • 149
  • 295
3

In AVD Manager select the VD and click edit, set the resolution to little as you are able to read the text on VD.

I use 800x600 pixels, RAM set to 512 MB, and it works like a charm without high use of CPU time.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Junaid Atari
  • 499
  • 7
  • 14
2

Enabling snapshot may not make it faster in the first run; do not go for big SD size. Adjust the SD card size to 100 MB in the first run.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
yrk
  • 57
  • 2
  • 10
2

For fast testing (<1 second) use buildroid with VirtualBox's first network card set to “host only network” and then run

C:\Program Files (x86)\Android\android-sdk\platform-tools>adb connect *.*.*.*:5555
connected to *.*.*.*:5555

(^) DOS / bash (v)

# adb connect *.*.*.*:5555
connected to *.*.*.*:5555

where *. *. * .* is the buildroid IP address you get by clicking the buildroid app in buildroid main screen.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
conners
  • 1,400
  • 4
  • 16
  • 27
2

Try using the Intel X86 Atom Storage Image for a relatively faster boot up than using ARM based images when emulating the device.

Another thing to be taken into the notice is that according to your system configuration, running an Android emulator with 1.21 GB RAM can be a sluggish experience, because the emulator requires up to some certain percentage of RAM which is used for emulating the device, not forgetting about the RAM used by the ADT.

Try a system image of 2.1 - 2.3.3 for at least a runnable experience. Plus not forgetting about Save to Snapshot for quicker loading. Though the first load may take time. But saving to a snapshot definitely saves up some time.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
2

Update your current Android Studio to Android Studio 2.0 And also update system images.

Android Studio 2.0 emulator runs ~3x faster than Android’s previous emulator, and with ADB enhancements you can now push apps and data 10x faster to the emulator than to a physical device. Like a physical device, the official Android emulator also includes Google Play Services built-in, so you can test out more API functionality. Finally, the new emulator has rich new features to manage calls, battery, network, GPS, and more.

Umer
  • 1,491
  • 2
  • 19
  • 29
2

If you can, switch to using Ubuntu for Android development. I switched to Ubuntu 14.04 LTS for Android development, and I am glad that I took the jump. All of the steps mentioned made little or no difference in the lag on Windows. Linux is the correct answer to all the problems you are facing

CyprUS
  • 3,931
  • 7
  • 43
  • 85
  • Despite all those negative votes, that's the best "solution". I did that 4 years ago and I've been living happy since then. People should TEST on windows, but not develop ON it. – Christian Jun 30 '16 at 18:38
  • @Christian : I wonder why the down votes. Hacking for a solution on Windows is futile, I know this because I have tried all the steps. – CyprUS Jun 30 '16 at 19:15
  • Yeah... there are so many advantages when developing on Ubuntu... there are no usb drivers to install... eclipse runs pretty much faster, no more freezings/hangins... it's so much better... I wonder WHY ppl insist in windows (for android development). – Christian Jul 01 '16 at 16:32
2

Android studio 2.02 has been launched, it has faster emulators, if you want to go with third party, use Genymotion emulators, they are pretty fast

Abdul Samad
  • 327
  • 3
  • 13
2

Try scaling down the emulator, it makes it a bit faster, even if it doesn't it really feels faster.

SMUsamaShah
  • 6,991
  • 21
  • 84
  • 121
1

HAXM is a way to make emulators fast for intel processors HAXM is the kernel driver part, and the user-space emulator part is based on QEMU - which means there is a branch of QEMU which uses HAXM (This QEMU branch is very android-emulator-specific (and also seems to be based on older version of QEMU).

But still when i used with my intel core i3 processor with 4 GigaBytes RAM it doesn't effect more to speed. So this wasn't a solution for me.

As i am using 4GB RAM cpu Emulator becomes RAM eater but for making it more convenient there are some ways I prefer Android*86 support based emulator. And as android studio now introduce Instant-Run So After first launch app installation became faster, but i always faced problem and seems like no-way to get out of this.

I also used Droid4x and it goes preety convenient to me but i can't found a way to install different api versions ,I used it with kitkat and it was faster then android emulator and it is also VT support enabled, So i found another way and a good solution that is Visual Studio Emulator You can read more about it here , The latest i used is LeapDroid its really a powerful See the comparisons here

I prefer to use Real device then emulators on 4GB ram PCs.

TapanHP
  • 5,097
  • 5
  • 33
  • 64
1

Firstly, you need to upgrade your RAM to atleast 8GB.

If you cannot upgrade your RAM, then try running the application on your Android Phone by connecting it via Data Cable and USB Debugging set as ON.

Also, you may use some other emulators like GenyMotion or Nox.

However, with the amount of RAM that you seem to be having, even other emulators may tend to be slow.

HarshitMadhav
  • 3,687
  • 5
  • 33
  • 43
Sumukh Bhandarkar
  • 366
  • 1
  • 5
  • 13
0

I had the same problem, but I fixed it by deleting the .android folder from C:\Users\User\.

Now everytime I start Eclipse or AVD, I delete that folder. After that my AVD boots up in 20 to 30 seconds and the emulator works smoothly with a negligible lag.

OPTIONAL : If the problem still persists, try to clone the NEXUS S AVD.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
zackygaurav
  • 3,941
  • 3
  • 23
  • 38
0

Yes, you are right since native android emulator is very slow than the other custom emulators like genymotion. I figured out that while I was running functional calabash android test.

On the native android emulator, this issue is produced when "timeout exception" occurs, so I moved to genymotion emulator who resolved the problem.

P.S: genymotion emulator is not free anymore.

JackLametta
  • 390
  • 1
  • 2
  • 18
Sofien Rahmouni
  • 2,741
  • 1
  • 16
  • 21
-1

Android Studio performance is greatly optimized in Linux. Windows system might be running different heavy programs in background. Linux is best suited to use available system resources efficiently. Recently I have install android studio in Kali Linux. The speed of emulator and studio performance is way better than windows.

And the software development tools gets downloaded faster from android SDK. As the packages are bundled in binary files. The size of binary files are low.

Suman Astani
  • 968
  • 10
  • 15