Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9859] Android: increase AVD storage size to reduce [FAILED_INSUFFICIENT_STORAGE] errors

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2013-10-17T08:37:44.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sn/a
ComponentsCLI, Tooling
Labelsandroidbuild, ay-verified, cb-verified, core, insight
ReporterTim Poulsen
AssigneeChris Barber
Created2012-07-02T12:19:20.000+0000
Updated2017-03-22T17:50:01.000+0000

Description

Expected results:

I should be able to build and install more than a few Ti apps to an Android emulator.

Actual results:

Due to defaults defined in builder.py, I can fit only a couple of Ti apps before the emulator runs out of storage space. This results in a [FAILED_INSUFFICIENT_STORAGE] error. I can delete other apps to free space. However, if I need to work on multiple apps, I end up having to delete/install frequently.

Fix

In builder.py (in my version, line 491) increase the partition size value. Current value is 128 (MB). I suggest at least 1024.

Comments

  1. Neeraj Gupta 2012-07-02

    We should expose a configurable parameter.
  2. Ingo Muschenetz 2012-11-06

    We should take care of this in the new CLI.
  3. Chris Barber 2013-08-27

    We have decided to NOT increase the size of the AVD, but rather improve installation errors when there's insufficient space (TIMOB-14701).
  4. Tim Poulsen 2013-08-27

    Gaahhh! Curse you Perry the Platypus!
  5. Ingo Muschenetz 2013-08-27

    [~cbarber] Wait...what about the idea of adding a configurable parameter? That would be very important for Studio users who could choose a new default.
  6. Shawn Lipscomb 2013-08-27

    Yes! Thank you Ingo! When I'm using the emulator, I just want to be able to install all/any of my apps, and keep their data intact.
  7. Stephen Feather 2013-08-27

    if we aren't going to make it configurable, at least document your build scripts so we know where to start hacking again. Have hacked build scripts for 3+ years to build a decent sized AVD or sdcard image to work with.
  8. Ingo Muschenetz 2013-08-27

    [~skypanther] Would you suggest those be command-line flags, or just changes in how we create the defaults? Also, do you think that 1024 MB really is the bare minimum now?
  9. Tim Poulsen 2013-08-27

    From private comment, orientation/accelerometer and keyboard emulation should be enabled by default. As for AVD size, average development-version APK size is running around 50 MB these days. So, 10 apps would be ~512MB. I'd say that's the bare minimum. Perhaps the better way to handle this is to: - Create a basic AVD using the defaults I listed - Add a command-line flag (expose in Studio UI too) that lets the developer target a specific AVD that he/she has created manually. The Android tooling lets you create AVDs that emulate specific devices or include various hardware emulations.
  10. Stephen Feather 2013-08-27

    Tim's math is based upon 10 unique apps pushed x number of times to the emulator. ADB doesn't always clean up after itself on an install (sometimes at all/sometimes slowly). If the original apk is locked myapp(1).apk then when the update is pushed myapp(2).apk the first one may not be deleted. This occurs less often with newer android tooling and new titanium tooling. However, you could have a single app, built multiple times, fill a 64-512mb with as few as 1-10 failed pushes. (and lord knows with the android emulator, there aren't enough chickens or pentagrams to keep those failures at bay) I won't even bring up the 50+mb debugging logs that adb can accumulate without cleaning up after itself.
  11. Ingo Muschenetz 2013-08-27

    [~sfeather] We were curious--what hacking did you do on the build scripts?
  12. Tim Poulsen 2013-08-28

    In case Stephen doesn't respond, I used to do the same thing: edit the AVD definition command in the python script. I had to re-apply the fix with each new release of the SDK. But it was worth the trouble. Following up on Stephen's comment about ADB not cleaning itself up: I'm debugging interapp communication on Android, which requires two apps. I can install both once. But any subsequent builds for the second app give me the insufficient space error -- buried within a ton of other Android console output. It's easy to miss the fact that you're not really running the new version which didn't get installed because there wasn't space. I have to delete the second app after each test run, then build the new version. ADB not cleaning up is obviously not our problem. But, a larger AVD size and better error messaging, would lessen the impact of ADB's failings.
  13. Ingo Muschenetz 2013-08-28

    One discussion we had was that by upping the size of every AVD, that could consume significant additional space. An alternate approach was for us to reuse the existing AVDs that come with the Android SDK rather than creating new ones ourselves. Thoughts?
  14. Ingo Muschenetz 2013-08-28

    [~skypanther] And you're editing approximately line https://github.com/appcelerator/titanium_mobile/blob/eb183c0991900c73c01513c0c4861c9498519ecf/support/android/builder.py#L603?
  15. Shawn Lipscomb 2013-08-28

    > One discussion we had was that by upping the size of every AVD, > that could consume significant additional space. "Additional space" where? On my hard drive? I've got hundreds of GB free.
  16. Ingo Muschenetz 2013-08-28

    [~bitshiftr] You do, but not everyone does, and I don't like making the assumption that I could grab an extra 10 GB off someone's SSD. That's why I'd prefer to it be a preference of some kind over a stock value.
  17. Tim Poulsen 2013-08-28

    Ingo, yes, line 603 that you referenced. Reusing existing AVDs would be great. Keep in mind that none are created by default with a new install. Still, having the option to use one I define myself would be wonderful. It could be a build option.
  18. Shawn Lipscomb 2013-08-28

    Agreed about the additional HD/SSD space. I'm still a fan of the idea of making it a Ti Studio preference. Then if I want to up the size of every AVD, I can do it.
  19. Chris Barber 2013-10-17

    In Titanium SDK 3.2.0, we no longer create AVDs. You must create your own AVDs. This way you can reuse emulators, configure them as you see fit, and avoid creating a dozen "titanium_*" AVDs. As apart of TIMOB-14701, we now display a helpful error message when there's insufficient space.
  20. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source