Can I tweak my android emulator to make it fast?

AndroidEmulationTweak

Android Problem Overview


I am using the android emulator to run my programs. But its really slow. It takes around 90 seconds to startup and show the home screen. Can I tweak it so that I can reduce this time considerably? Thanks

Android Solutions


Solution 1 - Android

I was having a similar problem (thread here). However, mine was taking 10-15 mins. 90 seconds is blazing fast considering a lot of threads in the Android discussion groups. The emulator is slow by nature and the only recommendation I read was to keep the emulator open instead of closing it and rerunning it. However, as mentioned in my thread, if you have a physical Android device, you can just run it on that. It's what I'm doing at the moment and it was top-notch advice. No long waiting time. If you don't have a physical device, then I can only suggest you don't close the emulator between code changes, as the system will recognise the change.

Solution 2 - Android

use those 3 options.

emulator --cpu-delay 0 --no-boot-anim --cache ./cache --avd avd_name

the first two are obvious. the third one will make the memory of the emulator kind of persistent. you can point it to any file that does not get destroyed by boot (such happens with /tmp) it's like a always-on hibernating device.

Solution 3 - Android

If you absolutely cannot use a physical Android device, what you can do is run the Android OS on Virtualbox, and then get the IP address of the emulated Android. Then you'd connect ADB to the emulator using that IP address. That's the jist of it. I've written a more detailed guide to this approach on my blog. http://www.bobbychanblog.com/2011/07/faster-android-emulator-alternative-using-virtualbox/

Solution 4 - Android

  1. The -no-boot-anim parameter is good.
  2. Don't turn the emulator off, just re-launch your app.
  3. For further speedups, try the new snapshot feature, which is described here.

Solution 5 - Android

Scaling the emulator down made my emulator load faster...

emulator -cpu-delay 0 -no-boot-anim -cache ./cache -scale 0.8 -avd avd_name

Solution 6 - Android

actually these are all great answers, but have u thought of changing the ram from the default 96mb to something like 512? works for me :)

Solution 7 - Android

If you have the mobile device with you, it's much quicker (and more reliable) to compile it via USB to the device. It takes around 5 seconds to compile and install on your phone, I never use the emulator anymore - it's just to slow.

Not only is it slow but anything other than static widgets (animation) will struggle to run on the emulator and you will notice lag.

Solution 8 - Android

I recommend you to use Genymotion . It's a very fast emulator (less than 10 seconds to run in my case)

It has Google Apps installed also including Google Play App which give the chance to download any app. This is a good feature for testing apps with Maps Api.

Solution 9 - Android

You need to install Intel HAXM

  • open you SDK and install

enter image description here

  • Create a new AVD

enter image description here

  • Now when run it you should get this

enter image description here

if not then you will need to install Accelerated Execution Manager

See this Running the new Intel emulator for Android on how can you do this

enter image description here

see how much faster do you get Video

Solution 10 - Android

While developing my game, Elastic World, I was suffering from the same problem. After waiting minutes for the emulator to startup, the game was running at 20 FPS maximum. Even on low end android devices I could easily get 60 FPS.

So I moved to a VMWare Android machine, following the instructions from this site: http://www.android-x86.org/documents/installhowto/

The same game loop now runs at 250 FPS. (it's not playable at this speed and I have the game limited to max 60 FPS, but overriding this limitation it gives 250 FPS)

Solution 11 - Android

Try to use a smaller resolution for your emulator as for example HVGA. The emulator gets slower the more pixels its needs to render as it is using software rendering.

Also if you have sufficient memory on your computer, add at least 1 GB of memory to your emulator. This is the value "Device ram size" during the creation of the AVD.

Also set the flag "Enabled" for Snapshots. This will save the state of the emulator and let it start much faster.

Solution 12 - Android

Just enable "Snapshot" checkbox in your AVD Manager. It will save the state of your AVD when you close it. So, once you run the emulator again, that saved state will be loaded. Hence the boot up time of your AVD will be considerably reduced.

Solution 13 - Android

  1. First I follow this introduction
  2. Run emulation with command : emulator -cpu-delay 0 -no-boot-anim -cache ./cache -avd <adv-name> -gpu on (follow link and link)

results is run ~2-3x faster

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBohemianView Question on Stackoverflow
Solution 1 - AndroidkeyboardPView Answer on Stackoverflow
Solution 2 - AndroidgcbView Answer on Stackoverflow
Solution 3 - AndroidBobbyView Answer on Stackoverflow
Solution 4 - AndroidTomas AndrleView Answer on Stackoverflow
Solution 5 - AndroidsulabhView Answer on Stackoverflow
Solution 6 - AndroidjayView Answer on Stackoverflow
Solution 7 - AndroidRickyView Answer on Stackoverflow
Solution 8 - AndroidMongi ZaidiView Answer on Stackoverflow
Solution 9 - AndroidMina GabrielView Answer on Stackoverflow
Solution 10 - AndroidPedro SoaresView Answer on Stackoverflow
Solution 11 - AndroidbilalhaiderView Answer on Stackoverflow
Solution 12 - AndroidcommanderdileepView Answer on Stackoverflow
Solution 13 - AndroidnguyênView Answer on Stackoverflow