问题
I'm working to ensure my app is getting tested on ICS properly using the popular Galaxy Nexus as a basis. I'd like to emulate it as faithfully as possible.
I've created an AVD with the following parameters (from config.ini). This was mostly created using the GUI (disk.dataPartition.size is a hand-edited param based on other articles I've read). The memory values may be on the low side but that's not causing a problem for me at the moment.
Since the device had no external sdcard I've said "no" for hw.sdCard, but I'm clearly not seeing anything in the /mnt/scdcard (same as /sdcard) and cannot write to it (remounting isn't the issue AFAIK: that mount doesn't exist at all).
I've tested this a few different ways, including from the adb shell. And, yes, I've searched for an answer here... much of this setup is based on answers to this related question, which eventually led me to use disk.dataPartition.size as the equivalent to the command line option (per this site).
Edit: if I set hw.sdcard to yes it gives me an sdcard to work with, but I wonder if this is the correct way to go about this (assuming there IS a correct way within this version of the emulator). Plus, this doesn't really help when emulating an ICS device with an actual external sdcard...
So (since I don't actually have a Galaxy Nexus to work with):
- What would I see for the internal "sdcard" area and mount point (/mnt/sdcard, /sdcard, both, or something else?)
- What might I do to emulate that "sdcard" correctly (since it's not really an sdcard per se)?
- Bonus: What would I also see on a device with a physical sdcard? /Removable (like in Honeycomb)? Something else?
abi.type=armeabi-v7a disk.dataPartition.size=512 hw.cpu.arch=arm hw.cpu.model=cortex-a8 hw.keyboard.lid=no hw.lcd.density=320 hw.mainKeys=no hw.ramSize=512 hw.sdCard=no image.sysdir.1=add-ons\addon-google_apis-google_inc_-15\images\armeabi-v7a\ image.sysdir.2=system-images\android-15\armeabi-v7a\ sdcard.size=64M skin.name=WXGA720 skin.path=platforms\android-15\skins\WXGA720 snapshot.present=true vm.heapSize=48
回答1:
Here are the parameters:
Resolution : 720 x 1280
Abstracted LCD density : 316
Max VM application heap size : 48
Device ram size : 1024
When creating my AVD I put:
Name: Nexus_480x800HDPI
Target: Android 4.0.3 - API Level 15
SD Card - Size: 256 MiB
Snapshot: x Enabled
Skin: x Built-in: WVGA800
For me it is just working nicely.
Here you may also find some further info: http://mobile.tutsplus.com/tutorials/android/common-android-virtual-device-configurations
I hope this help you.
回答2:
You might want to have ram 768MB . Ram greater than that can cause problems on windows environment.
来源:https://stackoverflow.com/questions/9427863/need-help-correctly-emulating-the-samsung-galaxy-nexus-with-avd