views:

1194

answers:

3

On a relatively new emulator image (AVD) I have about 40mb of free space. How can I expand this?

UPDATE: Just to be clear... I'm talking about the "Internal phone storage" size, not the SD Card size.

A: 

If you're talking about the SD card size, I believe you'll need to make a new SD card file of a larger file, then load your AVD using the new SD card you've created. They have instructions on how to create an SD card (and load it into an AVD) here: http://developer.android.com/guide/developing/tools/emulator.html#creatingm

Essentially, make the SD card:

$ mksdcard <size> <file>

Then load it into your emulator using the -sdcard argument:

$ emulator -sdcard <filepath>
Daniel Lew
No... the "Internal phone storage" size.
fiXedd
+4  A: 

I think:

$ emulator -partition-size <size>

is what you're looking for. I tried a few different values in the emulator and the "internal phone storage" setting seemed to reflect the values I passed in.

Erich Douglass
Thanks. I wonder why this isn't listed in the online docs at http://developer.android.com/guide/developing/tools/emulator.html#startup-options
fiXedd
also size is in MB, so if you do 500, you will get a 500MB internal storage.
christophercotton
A: 

There's one more "dirty" way. For each AVD created, android creates a .avd folder in the path /home/<username>/.android/avd/ (don't know bout Windows,never tried) Inside which you can find the config.ini file for that specific AVD. Its actually accumulation of the Hardware Property-Value parameters we add while creating an AVD. You can edit this config file with your favorite text editor. But.. this is dirty..I mean, you enter invalid values or properties, your emulator refuses to start. So before playing with it, keep backup of the original AVD :)

Nikhil Patil
Why mess with the config.ini when there's already a clean, accepted solution? I don't think there's a partition size parameter in config.ini anyway, at least not by default.
Christopher