Cdacians

Cdacians
Cdacians

Tuesday 14 August 2012

Android : How to insert Images, Songs or any files in emulator's SD card


Steps to insert Images, Songs or any files in Android emulator's SD card:

1. Start Android Emulator.



2. Open list of Applications. Open Developer Tools from list of Applications.


3. Open Terminal Emulator from list of Developer Tools. It is same as the Linus Terminal.



4. Type following commands.

(i) 
ls - It will provide list of directories and files in your $home directory. Check whether sdcard is present or not in the list. If sdcard is not present that means your emulator does not have sdcard. Go to Android SDK and AVD Manager and Edit your AVD and Select SD card support and specify size of SD card.

(ii) 
cd sdcard - Change your directory to sdcard.

(iii) 
mkdir audio - Create a new directory named Audio


5. If Terminal Emulator gives error as "mkdir failed for audio - permission denied", then do following steps.

(i) Open 
Command Prompt.

(ii) Go to 
\android-sdk\platform-tools\ directory.

(iii) Type 
adb shell, you will get same Linux Terminal which is provided by Terminal Emulator.

(iv) Now follow the steps given above in Step - 4, i.e, ls, cd sdcard, mkdir audio.



6. Now open Eclipse IDE and follow the steps given below.

(i) In 
Eclipse, go to Window Menu, select Open Perspective, from submenu selectDDMS.

(ii) You can see 
DDMS tab opened in right top corner of your Eclipse IDE. (As shown in image below).


(iii) Now go to File Explorer tab in DDMS(Make sure that your simulator is running otherwise you will not be able to see anything in your File Explorer).

(iv) Expand 
sdcard folder. Now, you can see the Audio folder in the tree. You can also see the Permissions of the folder.


(v) Select Audio folder. After selecting Audio folder click on Pull a file onto the device, which is available on right top corner as shown in below image.

(vi) A window will popup asking to select a file. Select any audio file. It will be stored in Audio folder in sdcard.


7. If you are unable to view Audio folder in your Emulator's Gallery then you mustunmount SD card and mount it again.
Go to Settings -> Storage -> Unmount SD card and then Mount SD card.

Such that Emulator re-searches files in SD Card.

Thanks
akm
www.cdacians.com

No comments:

Post a Comment