mohan
mohan

Reputation: 13165

Moving files to SDcard on Android

How do I put a file onto an sdcard using command line? I tried by using the adb push command but it's not working. My file is in D:/sample.ogg. I have written:

adb push sample.ogg/sdcard/sample.ogg 

It's not working. Any help would be appreciated

Thanks

Upvotes: 1

Views: 1246

Answers (1)

DeRagan
DeRagan

Reputation: 22920

In Command prompt type the following...

  mksdcard -l test 10M c:/test1.img

try starting the emulator and loading the SDcard from command prompt by typing...

  emulator -sdcard c:/test1.img

once emulator is started open another command prompt instance and try copying a file to SDcard by typing

  adb push e:/test.png sdcard/test.png

Later try retrieving the same file from sdcard to your system by typing

  adb pull sdcard/test.png d:/

see if the file has been copied in your d:/ ..try and tell me if it works for u:)

You can check my post here

http://www.anddev.org/error_while_writing_on_sdcard-t2997.html?sid=c01c1a23f34eb6bb7f97b6af99ca9816

Edit--

In the newer Android SDK's you can directly create an SD Card and start your emulator from your AVD in eclipse. You can neglect step 1 and 2 in that case and try push and pull commands directly

In your case it should be

adb push d:/sample.ogg sdcard/sample.ogg 

Upvotes: 3

Related Questions