1

Using adb, we can push files or folders. But how can I push a folder ("Music" for example) into my /sdcard/ that already contains this folder to add just the new files within Music on my computer ? It takes a lot of time to push the entire folder each time I want to add music.

2

1 Answer 1

3

Perhaps your best bet is using an alternative tool: adb-sync.

adb-sync is a tool to synchronize files between a PC and an Android device using the ADB (Android Debug Bridge).

Setup

Android

  • basically you need to allow USB debugging.

PC

  • Install the Android SDK (the stand-alone Android SDK "for an existing IDE" is sufficient). Alternatively, some Linux distributions come with a package named like "android-tools-adb" that contains the required tool.

  • Make sure "adb" is in your PATH.(If you use a package from your Linux distribution, this should already be the case; if you used the SDK, you probably will have to add an entry to PATH in your ~/.profile file, log out and log back in.)

  • git clone https://github.com/google/adb-sync
  • cd adb-sync
  • Copy or symlink the adb-sync script somewhere in your PATH. For example: cp adb-sync /usr/local/bin/

Usage

To get a full help, type:

adb-sync --help

To synchronize your music files from ~/Music to your device, type one of:

adb-sync ~/Music /sdcard
adb-sync ~/Music/ /sdcard/Music

Additionally you can play around with flags in defined in the help section to get the desired result.

Acknowledgements

1
  • adb-sync is all written and requires python 3.6+, which made it a no go for me
    – ryeager
    Commented May 7, 2019 at 21:48

You must log in to answer this question.

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