Friday, 25 November 2011

1. How to create a new Virtual SD card in emulator in ANDROID?
Many times we may have not enough memory for our application to run on the emulator.
So what we do?
One method is to create new virtual device with more memory.
Another method is to extend the device’s internal memory.
Third method is to create an SD card for the emulator.
Here is how you create a new SD card for the emulator.
First you have to navigate to you android installation directory and go to tools from there execute this command
C:androidtools>mksdcard -l mySdCard 1024M mySdCardFile.img
A file image named “mySdCardFile” will be created with about 1024 MB memory or you can give it in KB also.
Now SDCard created.Check your C:androidtools directory and confirm that the image has been created.
SDcard created

2. How to start emulator with the created SDCard?
Try this in the command prompt
Note: Make sure your emulator(Here VD1.6 created by me) is not running.
C:androidtools>emulator -avd VD1.6 -sdcard mySdCardFile.img
Now go to Eclipse Open DDMS on the right top of the window and open the File-Explorer from the Window-Menu
There you will see the SDcard

If you are not starting the emulator with the sdcard you will not see the sdcard here.

No comments:

Post a Comment