How to speed up Android Emulator on uX system - UPDATED
If you are developing for Android, you probably have already abandoned the emulator that comes with Android SDK, and are testing and debugging on a real device. I cannot blame you - the emulator is awfully slow. Well I have good news for you - you can speed it up, if you are using uX system (Unix like - Linux, Mac OS X, BSD).
The trick is very simple - and I suppose some of you have already activated it - mount /tmp folder into memory. The reason why the emulator is much more faster - is that when the emulator is started, the image is expanded into /tmp folder - and all the communication goes through there. Normally it goes through DiskIO, and the trick is to do it through much faster channel - memory.
Here is the way to do it in Linux:
sudo gedit /etc/fstab
add the following line at the bottom:
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
This will mount your /tmp folder into memory.
Now you can type:
sudo mount /tmp
or restart the system. Enjoy the difference.
And here how it is done under Mac OS X (you can visit one article here - http://laclefyoshi.blogspot.de/2011/05/tmpfs-on-linux-and-mac.html):
sudo hdid -nomount ram://256000
this will give you something like /dev/rdisk2 - then use “2” in the following command instead of “X”:
sudo newfs_hfs /dev/diskX sudo mount -t hfs /dev/diskX /tmp
This is something you should do every time you restart the system.