How to transfer files using adb push/pull command in Android

This article will introduce how to transfer files from adb push and pull command in Android.

With these command, you can copy files from the device/PC to the PC/device.

1. "adb push FILE_PATH DEVICE_PATH": Copy from PC to Device

In this example, The following command copies the screenshot.png file on the PC to the /sdcard path on the device.

$ adb push screenshot.png /sdcard/
screenshot.png: 1 file pushed, 0 skipped. 224.4 MB/s (2023568 bytes in 0.009s)

You can check if the file has been copied with the adb command or you can check with File browser app.

$ adb shell ls /sdcard/screenshot.png
/sdcard/screenshot.png

2. "adb pull DEVICE_PATH": Copy from Device to PC

The following command downloads the file /sdcard/Pictures/IMG_20210711_140802.jpg from the device to the PC.

$ adb pull /sdcard/Pictures/IMG_20210711_140802.jpg
/sdcard/Pictures/IMG_20210711_140802.jpg: 1 file pulled, 0 skipped. 4.0 MB/s (36850 bytes in 0.009s)

You can check what has been copied to the PC like this command in Linux. or You can check it with a File browser app in you PC.

$ ls
IMG_20210711_140802.jpg

Related Posts

codechachaCopyright ©2019 codechacha