Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Android Emulator - No space left on device

I got this error message when trying to run my app in the Android 1.6 emulator.

[ERROR] /Developer/android-sdk/tools/adb failed to copy '/Developer/Appcelerator/Olsson/build/android/bin/app.apk' to '/data/local/tmp/app.apk': No space left on device

Anyone else got this error and found away to solve it?

— asked November 27th 2010 by David Aberg
  • android
  • mobile
0 Comments

6 Answers

  • David

    If your app is large and so you really need a virtual device with a lot of storage, you can amend the one that Titanium has created, using the android virtual device manager. To do this:

    • close all emulators and Titanium Developer
    • run android at the command line
    • choose the "virtual devices" category on the left
    • press the "new" button
    • create a new device, with exactly the same name as the one created by Titanium (it will have a prefix of "titanium_")
    • set a size, ie 512
    • set the built-in skin (which you will choose on Titanium's "Run Emulator" screen), ie "WVGA800"
    • ensure that "Override the existing AVD with the same name" is ticked
    • press "Create AVD"

    Now you will see that the AVD image in /path/to/$YOUR_HOME_DIR/.android/avd/$AVD_NAME/sdcard.img will be roughly the size you set.

    See this screenshot for an example:

    screenshot

    — answered November 27th 2010 by Paul Dowsett
    permalink
    2 Comments
    • The option to override was unfortunately greyed out.

      — commented November 29th 2010 by David Aberg
    • David

      It will only be greyed out if the name isn't exactly the same as an existing device.

      — commented November 29th 2010 by Paul Dowsett
  • I followed this answer and it did the trick. Hope somebody finds it helpful.

    — answered November 20th 2012 by Sufian Babri
    permalink
    0 Comments
  • David

    Are you certain that you need 1.6? I always select "APIs 2.2". See this screenshot:

    screenshot

    — answered November 27th 2010 by Paul Dowsett
    permalink
    1 Comment
    • Furthermore, I presume you haven't run out of resources on your local machine? Just in case, on linux you would check this by issuing these commands:

      df -h
      df -i
      

      — commented November 27th 2010 by Paul Dowsett
  • This issue is caused in several forms but there are generally only two underlying causes.

    1) the emulator is actually too full to copy the new .apk

    2) there is not enough room to unpack the new .apk to do the install.

    Simply uninstall one or more of your applications on the emulator and you should be able to push successfully again.

    — answered November 27th 2010 by Don Thorp
    permalink
    1 Comment
    • I tried uninstalling in emulator by click-holding the app icons and dragging to recycle bin. Nothing got uninstalled.
      The emulator have something like 30mb of apps total. My hard drive have 100gb of free space.
      I use Mac btw.

      — commented November 29th 2010 by David Aberg
  • Thanks for the answers!

    I have removed the .android folder and reinstalled the android-sdk with 1.6 and 2.2.
    The "No space left on device" is now gone.

    Now I get this instead: [ERROR] Failed installing com.xxx.xxx: pkg: /data/local/tmp/app.apk

    I have tried running in both APIs 1.6 and APIs 2.2 but with no success.

    — answered November 29th 2010 by David Aberg
    permalink
    2 Comments
    • My app is only 19mb large btw.

      — commented November 29th 2010 by David Aberg
    • Perhaps worth to mention is that I run the Titanium 1.4.2 SDK.

      — commented November 29th 2010 by David Aberg
  • David

    Removing the .android folder is fine and will solve your issue, but bear in mind it may be temporary if your applications need more space than is provided in the default device image that Titanium creates. On my system this seems to be about 55MB. Your app of 19MB plus the OS and default apps may well be approaching this capacity.

    If I were you, I would delete everything relating to android in /data/local/tmp. Thus, on my system, I would remove:

    /tmp/android
    /tmp/adb.log
    
    — answered November 29th 2010 by Paul Dowsett
    permalink
    2 Comments
    • Thanks, sounds reasonable then. Where is the /data/local/tmp located ?

      — commented November 29th 2010 by David Aberg
    • David

      Well, the path seems to suggest that it's an absolute path, so literally /data/local/tmp. However, you could run a search on your whole system for directories called tmp and check for android-related files (including adb.log) in there.

      — commented November 29th 2010 by Paul Dowsett
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.