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.
adb you can do this easily!
1. Locate your Android
platform-tools directory. Usually this is where you store your Android SDK.
2. You may need to start adb server:
* adb devices * daemon not running; starting now at tcp:5017 * daemon started successfully List of devices attached 574d312345483498 device
3. Example: Copy IMG_9363.jpg from 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 where the file is exactly, you can run
adb shell and
cd to the directory 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)