Android - SD Card - Emulator - Ubuntu
I need to add some files to an SD card on Android Emulator. I am using Intellij Idea on an Ubuntu system.
What I 've done so far is:
- Create SD Card image using mksdcard command -> mksdcard开发者_StackOverflow -l SD256M 256M ~/sdcard256m.img.
- Launched Android Emulator with command line option -> -sdcard ~/sdcard256m.img
However, I am unable to add files to the SD Card using DDMS - File Explorer (launched DDMS from command line).
I get the following error.
E/ddms: transfer error: Read-only file system Failed to push testfile.mp3 on emulator-5554: Read-only file system
Also, on the Emulator, under Settings > SD Card & Phone Storage Settings, I see the fllowing:
Total Space - Unavailable
Available Space - Unavailable
Mount SD Card - Insert an SD Card for mounting
Format SD Card - Format (erase) the SD Card
I am not sure if the emulator is able to pick up the SD card image that I created.
Please let me know where I am going wrong?
Thanks a lot!
The problem was with the command line parameter while launching the Emulator
~/sdcard256m.img
I had to expand "~" and changed it to
/home/username/sdcard256m.img
The SD Card got detected in the Emulator & I was able to PUSH files through DDMS File Explorer.
精彩评论