Guide
Using rsync with an Android phone and a Mac
rsync needs a folder at each end. Once the phone is mounted as a volume it is one, and rsync runs as it does on any drive, with two small changes for Android's storage.
rsync cannot reach a phone that lives inside an app's own window, the way Android File Transfer and OpenMTP show it, because it needs a path on each side. Mount the phone as a volume instead, and copying the camera roll to the Mac is one command:
rsync -av --progress "$PHONE/DCIM/Camera/" ~/Pictures/Phone/
From the phone to the Mac, that works as it stands. Towards the phone, use -rt in place of -a, because the phone's storage cannot keep Mac permissions, and symbolic links cannot be made on it. Try anything new with -n first, and handle --delete with care. Without mounting, adb's own pull and push, and a tool called better-adb-sync, do part of the same job.
Finding the phone's path
SideMount mounts the phone over the USB cable as a volume that Finder shows like a drive (setting it up takes a few minutes). It does not live in /Volumes: it is a folder named after the phone inside ~/Library/Application Support/SideMount/Volumes/. The phone's internal storage is the top of the volume, and an SD card is a folder named SD Card inside it.
You do not need to type that path. In Terminal, type PHONE= with no spaces, drag the phone's volume from Finder into the window, and press Return. Terminal writes the path for you, with a backslash before each space. From then on, "$PHONE" stands for the phone in every command in that window. Keep the double quotes: the path has a space in it.
Copying photos off the phone
rsync -av --progress "$PHONE/DCIM/Camera/" ~/Pictures/Phone/
-acopies the folder and everything in it, and keeps each file's modification time.-vlists each file, and--progressshows how far each one has got.- The slash at the end of
Camera/matters. With it, the photos land straight in~/Pictures/Phone. Without it, rsync makes~/Pictures/Phone/Cameraand puts them there.
Run the same command next week and rsync copies only the new photos: it compares each file's size and modification time on both sides and skips the ones that match. Screenshots are usually in Pictures/Screenshots or DCIM/Screenshots, and take the same command with that path.
A folder of thousands of small files takes longer than its size suggests. Every file has a fixed cost on the cable, whatever tool copies it, so a few hundred photos go quickly and a messaging app's media folder does not.
Trying it first with -n
rsync -avn "$PHONE/DCIM/Camera/" ~/Pictures/Phone/
-n, or --dry-run, lists everything rsync would copy and copies nothing. Use it whenever you change a path or add a flag, and every time before --delete.
Mirroring with --delete
--delete makes the destination an exact copy of the source: any file on the destination that is not on the source is deleted. That suits a folder of music you keep on the Mac and want the phone to match, as in copying music from a Mac to Android. Dry run first, then the real thing:
rsync -rtn --delete --exclude '.DS_Store' ~/Music/Phone/ "$PHONE/Music/"
rsync -rt --delete --progress --exclude '.DS_Store' ~/Music/Phone/ "$PHONE/Music/"
Read the dry run before you run the second line. A wrong path, or a missing slash after the source, can aim --delete at a folder you did not mean, and it deletes for good: nothing goes to a bin on either side. Never use it on a backup taken from the phone, either. A photo you delete on the phone would then vanish from the backup on the next run, which defeats the backup.
The --exclude '.DS_Store' is there because Finder leaves those files in Mac folders, and a phone has no use for them.
Leaving out thumbnails
rsync -av --progress --exclude '.thumbnails' "$PHONE/DCIM/" ~/Pictures/Phone-DCIM/
Gallery apps on older phones cache thumbnails in DCIM/.thumbnails, which can grow large and which the phone rebuilds when it needs to. A pattern without a slash matches at any depth, so --exclude '.thumbnails' skips that folder wherever it is. --exclude '.*' goes further and skips every hidden file and folder.
Why -a is the wrong habit towards the phone
-a is short for -rlptgoD. On a Mac disk all of those make sense. On a phone's shared storage several do not:
-p,-oand-gcopy permissions, owner and group. Android's shared storage does not keep these per file, so there is nothing for them to set. The mounted phone accepts the request and ignores it, so the copy goes through, but rsync finds the same difference on the next run and asks again.-lcopies symbolic links as links, and a link cannot be created on the mounted phone, so each one fails. If your folder has links,-Lcopies the files they point to instead.-Dcopies device files, which a photo or music folder never has.
What matters from the rest is -r and -t. So towards the phone use -rt, or keep -a and add --no-perms --no-owner --no-group. Keep -t whichever you choose. The phone keeps modification times, and without them every file looks changed, so each run copies everything again.
One time quirk is left, on SD cards. A card formatted as FAT32 stores times only to two seconds, so a file can look a second out and be copied again every run. Add --modify-window=1, which tells rsync to treat times a second apart as the same.
Leave out -c (--checksum) too. It reads every file in full on both sides to compare them, which on the phone means pulling every file across the cable. Size and time are enough.
The rsync your Mac has
Run rsync --version on a recent Mac and it answers:
openrsync: protocol version 29
rsync version 2.6.9 compatible
Since macOS 15.4, Apple ships openrsync, a rewrite under a BSD-style licence, in place of the GPL rsync 2.6.9 it had kept for years. It accepts a subset of rsync's options, and every command on this page works with it. For rsync 3's extras, such as --info=progress2 for a single progress line for the whole run, install it with Homebrew (brew install rsync); Homebrew's copy usually comes first in Terminal after that.
Without mounting: adb's own tools
| Tool | Copies only what changed | Dry run | Mirror with deletes | Exclude patterns |
|---|---|---|---|---|
| rsync, phone mounted with SideMount | Yes, by size and time | Yes, -n | Yes, --delete | Yes, --exclude |
adb pull -a | No, copies everything | No | No | No |
adb push --sync | Towards the phone, by timestamp | Its -n still sends the data | No | No |
| better-adb-sync | Yes | Yes, -n | Yes, --del | Yes, --exclude |
All of these need USB debugging on the phone; turning it on takes a minute. The adb tools also need Google's Android platform tools on the Mac.
adb pull -a /sdcard/DCIM/Camera ~/Pictures/copies the whole folder into~/Pictures/Camera, keeping each file's time and mode. It copies everything, every time.adb push --synccopies files to the phone and skips those whose timestamps already match. It never deletes.- better-adb-sync is the closest thing to rsync over adb:
pip install BetterADBSync, thenadbsync pulloradbsync push, with--dry-run,--excludeand--del. It began as a rewrite of Google's own adb-sync, which was archived in March 2025 and now points to it.
Only one program can hold a phone's adb connection at a time. If SideMount has the phone, eject it first, which lets go of the phone. If your adb server was already running before the eject, run adb kill-server once so it looks for the phone again.
Questions
Can rsync copy files from an Android phone without mounting it?
No. rsync needs a path on each side, and an MTP app such as OpenMTP shows the phone only inside its own window. Mount the phone as a volume so it has a path, or use an adb based tool such as adb pull or better-adb-sync, which talk to the phone directly.
Why does rsync -a misbehave when copying to an Android phone?
-a asks to copy permissions, owners, groups and symbolic links, and a phone's shared storage keeps none of them. Use -rt towards the phone, or -a --no-perms --no-owner --no-group. Keep -t, so rsync can tell which files changed.
Which rsync comes with macOS?
Since macOS 15.4 it is openrsync, which reports "openrsync: protocol version 29" and "rsync version 2.6.9 compatible". It handles -rt, -n, --progress, --delete and --exclude. For the full rsync 3, install it with brew install rsync.
Is rsync --delete safe to use with a phone?
Only after a dry run. Run the same command with -n first and read the list, because files it deletes are gone for good. Use it to make the phone match a folder on the Mac, never on a backup taken from the phone, where it would delete photos you removed from the phone.
Why does rsync copy every file again on each run?
Usually because -t is missing, so the copies carry the time they were made and never match the originals. On a FAT32 SD card, times are stored only to two seconds; add --modify-window=1 so rsync treats times a second apart as equal.