adb push seems to push everything into the dest folder regardless of their changed/unchanged states. So it wastes a lot of time. Is it possible to sync rather than copy (i.e. to rsync rather than cp)?

I see adb has a sync option, but I'm not quite sure whether it's relevant or not.

5 Answers 5


You would use adb push --sync, for example:

adb push --sync /home/abc/ /sdcard/abc

from adb --help:

file transfer:
 push [--sync] LOCAL... REMOTE
     copy local files/directories to device
     --sync: only push files that are newer on the host than the device

but it seems that this function is available for relative newer ADB version such as version 1.0.40.


While this answer is not exactly an explanation on the usage of adb sync, it may help when your primary goal is to sync files using adb.

You may be interested in adb-sync which is a Python script that uses adb to synchronize files from your computer to your Android device or vice versa.

Example (computer -> device):

adb-sync /home/abc/ /sdcard/abc

Example (computer <- device):

adb-sync --reverse /sdcard/abc /home/abc/ 

If missing files on the source should be deleted on the target you have to specify --delete.

  • 1
    this python script works for linux only. for windows one can install bash and try winadb-sync
    – alecxs
    Commented Jun 3, 2021 at 11:29

"adb sync" is not relevant in your case. It is used to sync system partition to your connected adb device. It will only work if your phone is rooted and you first need to put system partition into writeable mode. By default it is in read-only mode. Please follow this article for more details: https://medium.com/@yigitpirildak/syncing-aosp-build-changes-using-adb-sync-885ce12e5cc7


I have made a python script that works like charm for windows.
It copies all the files from the current folder to the device(path can be edited in the code) except the files already present there.
Optionally, -l switch can be used to list the files with copy size before actual copy.

import os
import subprocess
import sys
cmd="adb shell ls -a " + devPath 
if (len(sys.argv)>1 and sys.argv[1]=='-l'):
for f in filesToCopy:
    if(not justList):
        cmd="adb push "+str(f)+" "+devPath+str(f)
    print(str(count) + ' ' + str(f))
if(not justList):
    os.system("adb shell rm "+str(devPath)+"/"+sys.argv[0])
print(str(size/1000000) + " Mb")

When running adb without any commands, you get a list of possible commands, and here it is:

adb sync [ <directory> ]     - copy host->device only if changed
                             (see 'adb help all')

Looks pretty relevant to me :)

  • 3
    Would you please give an example on how to use this? Say if I want to sync /home/abc/ on PC to /sdcard/abc/ on device.
    – Cyker
    Commented Sep 23, 2012 at 5:58
  • Did you try adb help all?
    – pzkpfw
    Commented Sep 24, 2012 at 8:36
  • 3
    Yes. It can sync system/data partition. But I just want to sync one folder on sdcard. Do you know how to do that?
    – Cyker
    Commented Sep 24, 2012 at 20:22
  • It is not implemented in version <= 1.0.31.
    – echo
    Commented Jan 29, 2013 at 1:26
  • 1
    While this command looks promising at first, I couldn't get it to work after a quick try. A real example as requested by cyker would be helpful.
    – Flow
    Commented Apr 17, 2014 at 18:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .