Search code examples
androidemulationadb

Android emulator system partition no space from start


I have a weird problem with the Android emulator. I have created a virtual device through Android AVD manager (newly created emulator with platform 2.1 and API level 7). I have tried with standard settings and with added hardware parameter for larger (256 MB) device RAM size but nothing changed.

I need to come files to the system partition to test a project (called haggle), but for some reason the system partition has no space from start.

aa a@aaa /home/haggle-0.2-android
$ adb -s emulator-5554 shell

 # df
df
/dev: 47084K total, 0K used, 47084K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 73600K total, 73600K used, 0K available (block size 4096)
/data: 65536K total, 18464K used, 47072K available (block size 4096)
/cache: 65536K total, 1156K used, 64380K available (block size 4096)

As you can see the system partition has 0K space available. When a connect a non-rooted HTC Nexus One and do the same I get these values:

/dev: 108896K total, 0K used, 108896K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 148480K total, 116364K used, 32116K available (block size 4096)
/data: 200960K total, 22296K used, 178664K available (block size 4096)
/cache: 97280K total, 1852K used, 95428K available (block size 4096)
/sdcard: 3864064K total, 118496K used, 3745568K available (block size 32768)

Why does the system partition on the emulator have 0K free space from beginning, and what can I do to change that? Even if I make the partition write-able with mount/remount I get the same 0K values.

Any tips?


Solution

  • Found the answer :)

    When starting the emulator you can specify the partition size by -partition-size x emulator_name.

    done through the terminal that is. Example:

    emulator -partition-size 125 @AVD1
    

    OR

    emulator -partition-size 125 -avd AVD1
    

    Note that the size must be bigger than your current system partition size. For the Android4.0.3 emulator the default size is already 168 so set your new partition-size to something bigger like 256