A program kind of like git, meant to mirror my music library from my Desktop -> DAP
Find a file
2026-10-11 03:39:08 +02:00
adb_sync chore: fix module imports 2026-10-11 03:39:08 +02:00
.editorconfig Initial commit of a somewhat working product 2026-08-30 14:35:06 +02:00
.gitignore Initial commit of a somewhat working product 2026-08-30 14:35:06 +02:00
pyproject.toml Initial commit of a somewhat working product 2026-08-30 14:35:06 +02:00
README.md fix readme again 2026-08-30 15:01:55 +02:00
uv.lock Initial commit of a somewhat working product 2026-08-30 14:35:06 +02:00

adb-sync

adb-sync mirrors a local folder to an Android device over ADB. It keeps an index of file hashes, watches the source tree for changes, and applies updates to the device.

What it does

  • Mirrors files from a local source directory to an Android destination path
  • Watches for filesystem changes with inotify
  • By default, reconciles only added and deleted files during startup, which is faster than hashing everything again
  • Use --full-rescan when you want to hash matching files too and detect modified files during reconcile
  • Removes empty directories from the mirror when their files are deleted

Requirements

  • Python 3.14+
  • adb available on your PATH, or pass a custom binary with --adb-path
  • Linux with inotify support for live watching

Usage

python -m adb_sync --source /path/to/music --dest /sdcard/Music

Common options:

python -m adb_sync --source=/path/to/music --dest=/sdcard/Music --full-rescan
python -m adb_sync --source=/path/to/music --dest=/sdcard/Music --dry-run
python -m adb_sync --source=/path/to/music --dest=/sdcard/Music --no-watch
python -m adb_sync --source=/path/to/music --dest=/sdcard/Music --adb-path=/usr/bin/adb

Notes

  • --skip disables the initial reconcile step and only watches for changes.
  • --full-rescan is opt-in and slower, because it rehashes matching files to detect modifications.
  • The default reconcile mode only checks for added and deleted files, which is much faster on large trees.

Development

The project is configured with pyproject.toml and can be run directly from the repository root. The project also uses uv for dependency/venv management.

python -m adb_sync --help