IAmGroot
IAmGroot

Reputation: 13855

Android: Copy file from PC to android device (Programmatically)

I need to copy on a sqlite DB file onto the android device. Along with other files.

This is to be done by a delphi App. Ofc I can pull up console commands.

So basically, Can I copy to and take files from the devices.

Now, I have adb option.

 C:\Users\Documents>adb devices
 List of devices attached
 4527103425FC4D7 device
 HT25ZW127890    device


C:\Users\Documents>adb push -s HT25ZW127890 test.txt /sdcard/test.txt

But no idea how to target my device. It just lists all the options as if i typed in adb. And with out the -s bit, it says multiple devices attached. What am I doing wrong? Plus...

Also: This is adb -> Android Debug Bridge. Which needs Debug mode set.

Surely this isn't the ideal way for a realised application, needing the phone in debug mode.

Upvotes: 3

Views: 6397

Answers (1)

Arioch 'The
Arioch 'The

Reputation: 16045

http://developer.android.com/tools/help/adb.html

This text suggests you have wrong positions for "-s" and "push" keywords.

The usage is: adb [-d|-e|-s <serialNumber>] <command>

Upvotes: 4

Related Questions