Amit
Amit

Reputation: 1560

Copy file from Computer to Android Phone

I try to copy file from my PC to Phone but it gets IOException error. I have written the following code for this task:

Runtime rt = Runtime.getRuntime(); rt.exec("adb pull mnt/sdcard/Samsung/Music/test.mp3 E:/");

Upvotes: 0

Views: 1232

Answers (2)

Nirali
Nirali

Reputation: 13805

You can also push a file into device using DDMS tool in eclipse. Select mnt/sdcard from file explorer and then click on push file button.

Upvotes: 0

Kazekage Gaara
Kazekage Gaara

Reputation: 15052

There can be two reasons:

  1. You may not have the permission to access that file.

  2. You working directory doesn't have access to adb. Try running the command as:

    "cmd /c /pathtoadb/adb.exe pull /pathtofile e:/tryadifferentdirectory/"

Upvotes: 1

Related Questions