When you are actively working on Android development, one this you will frequently need is to copy some kind of files like test binaries, sample files etc to your android device.
The best and fastest way to copy your small files to Android is to use “adb push” command. [ You can find lot of other adb commands here ]
Use below command to push / copy your files to Android,
$ adb push your_file_name /sdcard
We have pushed our file in above command to /sdcard since /sdcard has all the necessary permissions, you can push your file / binary to any path as you want in Android’s filesystem provided you have the necessary write permissions.
$ mount -o remount,rw /system
And then push binary to system/bin as,
$ adb push your_binary /system/bin
Note: since adb push copies files over USB or Network, its a slow copy hence if you are looking for copying really large files like video etc, you should connect your device over USB as storage and then copy using file browsers to SDcard in Desktop and then use adb shell to move to any other places.
For copying from your android device to desktop, refer post “adb pull – Command to copy files from Android device”