Error running Android virtual device

About a week ago I ran into an error whilst following an android SDK tutorial (http://developer.android.com/training/basics/firstapp/index.html), google search seemed to indicate that the error means that you hard drive is full which I initially thought was bullshit but then I check the /tmp directory and found it was only 100M.

A little background, I am running Sabayon which is a linux distribution based on Gentoo, now apparently someone at Sabayon or Gentoo decided to implement /tmp as ‘tmpfs’ filesystem, tmpfs is a MEMORY-based filesystem so things that need to write to /tmp get to write to memory instead of disk so it’s pretty fast, but downside is that it takes up memory.

Anyway by default tmpfs is only 100M which is causing this problem.

error:

Starting emulator for AVD ‘vAndroid’
NAND: could not write file /tmp/android-mick/emulator-M2JFc8, Resource temporarily unavailable

solution:

Edit /etc/fstab as root and comment out the /tmp line, so from the command line run the following command as root:

gedit /etc/fstab

And comment out the following line with a hash (#):

tmpfs /tmp tmpfs noexec,nosuid,nodev,size=100M 0 0

Now reboot and you should be able to run the virtual device, /tmp will now be on your root partition which will give you plenty of space however /tmp access will be much slower, alternatively you could increase the size.

Advertisements