开发者

android: adding audio files to android emulator [update] permission denied

For debugging purposes, I wanted to have a couple of mp3 files located somewhere "in" my android emulator. Is there anyway to directly push files from my OS file system to the storage system of android?

If so, which directory does android keep audio files?

if not, how can I access an SD card via emulator?

[update2]: The probl开发者_运维技巧em in update1 solved. Should use adb push. [update1]: I followed kgiannakakis's advice to create an sdcard for my avd. However, I got Permission denied error when I try to create new directory inside it.

$ cd sdcard
$ ls
LOST.DIR
$mkdir musics
mkdir failed for musics, Permission denied
$ su mkdir musics
su: uid 10016 not allowed to su


You can find directions for emulating an SD card here.

I believe that the easiest way to copy files to the SD card is to use the adb utility.

See here for a more advanced solution.


Regarding instructions at http://android-er.blogspot.com/2009/10/create-sd-card-in-android-emulator-and.html on creating the 'pictures' folder, you can run the same commands from the adb shell, instead of running them from inside the emulator.

So get a command line at e.g. C:\Program Files (x86)\Android\android-sdk-windows\platform-tools (on 64bit windows), and run adb shell. Then you can run the same commands:

#cd sdcard
#mkdir pictures

and create the directory successfully with no permission denied error.

Following same instructions, in DDMS I had to browse to \mnt\sdcard to find the SD card volume.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜