The default android emulator is ridiculously slow and resource hungry, which makes it an impractical solution.
How can I speed up the default emulator?
Android development was initially done on a desktop simulator. It has never been an official part of the release, and the code is usually published to the AOSP site in a somewhat broken state, but it's there. The feature that kept it alive was valgrind, since (until recently) that wasn't usable on ARM.
If you look at these docs and scroll down to "Working with the desktop build", you can see some instructions for using the sim-eng build to run a simple Dalvik program.
Running "simulator" launches the wxWidgets-based front-end. From there you can start the system. Source code for that, and a bit of fanciness that does run-time interception of various system calls, can be found in the source tree.
Update: the simulator was removed entirely from the sources for the Ice Cream Sandwich release, so you need to look through the 2.3 (Gingerbread) sources to see it.
Granted - Android emulator is slow. But the upside is that when you develop an app, you instantly see where it is slow/lagging, while on last-gen 1GHz+ devices this might not be apparent.
Also, when I test my apps I run them on 2G network to see the delays and where they need to be optimized. If I'd only run them on 10Mbit+ WiFi then delays would not be noticeable.
When developing you have to plan (and test) for the worst conditions, not ideal ones. So, in a sense, slow emulator is actually helpful ;)
Android Emulator Slow? I got two solutions for you..
Optimize and upgrade your system:
Give ample ammount of time for the Emulator to be ready
tools.android.com/recent/emulatorsnapshots try Emulator Snapshots, it works fine as well.
10-50% Boost of performance.
Find a Junk PC, Install Android x86
If you have or can afford an old PC, something like Pentium 4 1GHz or more give this a shot.
Open Up the CPU Box,
Both SATA or PATA Work Well.
Get the Latest Stable Generic Build from android-x86.googlecode.com Here is the Latest Stable(At the time of posting) ISO of 2.2, http://android-x86.googlecode.com/files/android-x86-2.2-generic.iso
Download this ISO and Burn it to a CD. Be sure to download the Generic iso build. This build works for most of the PCs.
+ Unknown Sources - Selected + USB Debugging - Selected + Stay awake - Selected + Allow mock locations - Selected
Amazon.com usb cable
Now type the following in terminal or command-prompt, adb devices
Now you can see your device connected to the adb. Now when you run/test/debug your application in this device.
You can also do this Virtualbox but I'm not sure about how to connect it to the adb. However look at my blog post abt installing it to virtualbox
My Experiment Setup & Result:
Boot-up-Time 13 Secs (Aug 31, 2011 - 2.3.5 Tested on PC, Boot up time is just under 8 Seconds.. Amazing...)
Time for installing an app into device Almost negligible
PC Specs Used For testing:
Pentium 4 @ 2.90GHz With HT.
915G Chipset
2GB RAM
USB Keyboard & USB Mouse
All Serial, PS2, Parallel ports were disabled.
For Photos and more please take a look at my Blog post at sree.cc ----
http://www.sree.cc/google/installing-android-in-pc-virtualbox
100% Boost of performance.
http://code.google.com/p/android-x86/downloads/list
Android 4.0 had been released. Chk out.
It's possible to run Android in a virtual machine - I've done it using the Android x86 port (http://www.android-x86.org/). You can download ISOs that can be loaded up into any decent VM software (I use VMWare on my Mac to do it).
Performance is, as you'd expect, very good. Not technically emulation or simulation, since you're actually running Android, but it's the fastest way to run Android on a PC*.
I'm not entirely convinced it's a suitable environment for development - I've actually used it for running large screen versions of apps on non-standard hardware (1080p touchscreens, etc).
At the very least, I think it's the best solution to your question: you can compile Android code, load it into the virtual machine, and run it at normal speed.
*Short of actually booting into it...
Update: Google are now providing Android emulator images that add GPU and native x86 support, so a lot of this advice is hopefully now moot!.