Skip to content

Published

adb push and pull: copy files to and from an Android phone ​

In short: adb push copies a file or folder from your computer to an Android phone, and adb pull copies one from the phone to your computer. For example, adb push report.pdf /sdcard/Download/ puts a file in the phone's Download folder, and adb pull /sdcard/DCIM/Camera copies its photos. /sdcard is the phone's shared storage.

adb copies files over the same connection as every other command, so it works by USB or Wi-Fi without any app on the phone, and it handles big folders that a file manager struggles with.

Syntax ​

bash
adb push [--sync] local/file-or-folder /sdcard/destination/
adb pull [-a] /sdcard/file-or-folder [local/destination]
OptionWhat it does
--syncWith push: copies only files that are newer on your computer than on the phone
-aWith pull: keeps the files' dates and permissions
Several sourcesBoth accept more than one file or folder, with the destination last

Where things are on the phone ​

FolderWhat is in it
/sdcard/Download/Downloads, and a good place for files you push
/sdcard/DCIM/Camera/Photos and videos from the camera
/sdcard/Pictures/Screenshots/Screenshots on Pixel and many other phones
/sdcard/DCIM/Screenshots/Screenshots on Samsung phones
/sdcard/Documents/Documents saved by apps
/data/Apps' private data; closed to adb on normal phones

adb shell ls /sdcard/ lists what is there; paths on the phone are case-sensitive.

Examples ​

bash
# A test file into the Download folder
adb push testdata.json /sdcard/Download/

# Every photo, into a folder called phone-photos, keeping their dates
adb pull -a /sdcard/DCIM/Camera phone-photos

# Several files at once
adb push one.pdf two.pdf /sdcard/Documents/

# A file from your own debuggable app's private folder
adb shell run-as com.example.app cat files/settings.json > settings.json

Photos you push may not appear in the gallery until the phone scans its storage again, for example after a restart.

On many phones at once ​

bash
for s in $(adb devices | awk 'NR>1 && $2=="device" {print $1}'); do
  adb -s "$s" push testdata.json /sdcard/Download/
done
powershell
adb devices | Select-Object -Skip 1 | ForEach-Object {
  $serial, $state = $_ -split '\s+'
  if ($state -eq 'device') { adb -s $serial push testdata.json /sdcard/Download/ }
}

To collect from every phone, pull into a folder per phone, as the ADB command builder writes for you. In BenchFleet, each phone's page has a file browser with drag and drop, on every plan, next to the live screen.

Free for up to 3 phones, with no account. Pro adds workflows, schedules and AI for up to 25 phones from £12 a month + VAT.

Common errors and fixes ​

ErrorWhat it meansFix
remote object '…' does not existThe path on the phone is wrongCheck it with adb shell ls; paths are case-sensitive
Permission deniedThat place on the phone is protectedUse /sdcard/, or run-as for your own debuggable app
Read-only file systemThe destination is part of the systemPush to /sdcard/ instead
No space left on deviceThe phone is fullFree up storage on the phone
A Windows path with spaces failsThe shell split the path in twoPut the path in quotes

Questions ​

How do I copy a file from my computer to an Android phone with adb?

Run adb push with the file and a folder on the phone, for example adb push report.pdf /sdcard/Download/. The file then appears in the phone's Download folder.

How do I copy photos from an Android phone with adb?

Run adb pull /sdcard/DCIM/Camera. adb copies the whole folder into a Camera folder where your terminal is; add a folder name at the end to choose where it goes, and -a to keep the photos' dates.

Where is /sdcard on an Android phone?

It is the phone's shared storage, the same place a file manager calls Internal storage, with folders such as Download, DCIM, Pictures and Documents. On most phones it is also reachable as /storage/emulated/0.

Can adb pull an app's private data?

Not on a normal phone, because each app's data is private. For an app you build yourself as debuggable, adb shell run-as with its package name can read its files; other apps' data needs a rooted test phone.

Can I copy a whole folder?

Yes. adb push and adb pull copy folders with everything in them, and adb push --sync copies only the files that are newer on your computer.

Start with the Free plan

Free for up to 3 phones, with no account. Pro adds workflows, schedules and AI for up to 25 phones from £12 a month + VAT.