Wednesday, May 12, 2010

Android_Out of memory error

I got a wierd problem with 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)
 
Solution:
 
 

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 @b

What I am wondering is why the system partition on the emulator has 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.

No comments: