Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

adb

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.

like image 898
IAmGroot Avatar asked May 27 '26 13:05

IAmGroot


1 Answers

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>

like image 125
Arioch 'The Avatar answered May 30 '26 07:05

Arioch 'The



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!