How to increase hw.ramsize for an emulator?

891 views
Skip to first unread message

zyrikby

unread,
Dec 6, 2011, 8:05:41 AM12/6/11
to android-...@googlegroups.com
Hello.

I have the following problem. I add my own service to the Android framework. After the build I run emulator with the built image. (It is possible just to use emulator command, but I use the following script:
out/host/linux-x86/bin/emulator -sysdir out/target/product/generic/ -system out/target/product/generic/system.img -ramdisk out/target/product/generic/ramdisk.img -data out/target/product/generic/userdata.img -kernel prebuilt/android-arm/kernel/kernel-qemu -sdcard sdcard.img -skindir sdk/emulator/skins -skin WVGA800 -scale 0.7

But sometimes there are not enough memory and my service is killed and restarted constantly. I know that by default RAM size is 96 Mb. Can I increase RAM memory using emulator option? (for instance, can I use adb setprop hw.size 512 or this option won't change the RAM size?)

I also know that it is possible to create an avd with the defined RAM size but I do not know how to run built image with this avd.

Thank you in advance.

David Turner

unread,
Dec 7, 2011, 5:27:39 AM12/7/11
to android-...@googlegroups.com
Yes, try "-memory 256" to get 256 MB or RAM.

Generally speaking, use "emulator -help" for a list of options, including other help options, like "emulator -help-<option>" for more detailed help for a given option.

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/xJCOdQ4dJxAJ.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

zyrikby

unread,
Dec 11, 2011, 4:42:35 AM12/11/11
to android-...@googlegroups.com
Thank you!

I forgot to check an obvious option )
Reply all
Reply to author
Forward
0 new messages