Copy files to/from an Android Device using adb

Copy from an Android Device
I recently wanted to copy a file from an Android device using a command line, because I couldn’t get Android File Transfer to work on macOS. Using adb you can do this easily!
- Locate your Android
platform-toolsdirectory. Usually this is where you store your Android SDK. - You may need to start the adb server:
adb devices
daemon not running; starting now at tcp:5017
daemon started successfully
List of devices attached
574d312345483498 device
- Example: to copy
IMG_9363.jpgfrom my phone’s SD card, run this command:
adb pull /sdcard/Download/IMG_9363.jpg
/sdcard/Download/IMG_9363.jpg: 1 file pulled, 0 skipped. 34.0 MB/s (14945785 bytes in 0.419s)
If you’re not sure exactly where the file is, you can run adb shell and cd to the directory where you’d like to find the file you want to copy.
Copy to an Android Device
adb push CopyMeToAndroidDevice.jpg /sdcard/Download/
CopyMeToAndroidDevice.jpg: 1 file pushed, 0 skipped. 32.2 MB/s (14945785 bytes in 0.443s)