A program kind of like git, meant to mirror my music library from my Desktop -> DAP
- Python 100%
| adb_sync | ||
| .editorconfig | ||
| .gitignore | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
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-rescanwhen 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+
adbavailable on yourPATH, 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
--skipdisables the initial reconcile step and only watches for changes.--full-rescanis 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