Checkpointed Android folder backup and sync over adb.
Project description
AndroidMigrate
Checkpointed Android folder backup and sync over ADB.
AndroidMigrate keeps a local mirror of folders on your Android device, tracks changes with content-addressed blob storage, and creates checkpoints so you can restore any previous state back to the phone.
Features
- Incremental sync -- pulls only changed files from device using SHA-256 content hashing
- Checkpoints -- automatic snapshots after every sync, with configurable retention
- Restore -- push any checkpoint back to the device, or restore individual files
- Clone restore -- migrate a checkpoint to a different device under a new profile
- Conflict detection -- detects phone vs local edits and archives local copies for manual resolution
- Local mirror recovery -- rebuild a corrupted or lost mirror from checkpoint blobs
- Backup folder change -- relocate the mirror directory with automatic rebuild from phone or checkpoint fallback
- Root management -- add, disable, or remove sync roots (e.g. DCIM, Documents) per profile
- Terminal UI -- curses-based dashboard for managing profiles, running syncs, browsing checkpoints, and resolving conflicts
Requirements
- Python 3.12+
- ADB (
adb) installed and onPATH - Android device with USB debugging enabled
Installation
PyPI (all platforms)
pip install androidmigrate
AUR (Arch Linux)
yay -S androidmigrate
Homebrew (macOS)
brew tap MachineLearning-Nerd/tap
brew install androidmigrate
From source
git clone https://github.com/MachineLearning-Nerd/AndroidMigrate.git
cd AndroidMigrate
pip install -e .
Quick Start
# List connected devices
androidmigrate devices
# Create a profile
androidmigrate profile create myphone \
--device SERIAL \
--mirror ~/android-backup
# Add folders to sync
androidmigrate profile add-root myphone /sdcard/DCIM
androidmigrate profile add-root myphone /sdcard/Documents
# Run a sync
androidmigrate sync myphone
# Launch the TUI dashboard
androidmigrate tui
CLI Commands
| Command | Description |
|---|---|
devices |
List connected Android devices |
profile create |
Create a new backup profile |
profile add-root |
Add a device folder to sync |
profile list |
List profiles and their roots |
sync <profile> |
Sync files from device to local mirror |
checkpoints <profile> |
List available checkpoints |
restore <profile> <id> |
Restore a checkpoint to the device |
repair-local <profile> |
Rebuild local mirror from checkpoint data |
clone-restore <profile> <id> |
Clone a checkpoint to a different device |
conflicts <profile> |
List unresolved file conflicts |
resolve <profile> <id> |
Resolve a conflict (keep phone/local/both) |
tui |
Launch the terminal UI |
TUI Keybindings
| Key | Action |
|---|---|
j/k or arrows |
Navigate profiles |
e |
Edit sync roots |
m |
Change backup folder |
y |
Run sync |
c |
View checkpoints |
i |
View issues |
l |
View run history |
r |
Refresh |
? |
Help |
q |
Quit |
Configuration
State is stored in .androidmigrate/ in the current directory by default. Override with:
export ANDROIDMIGRATE_HOME=~/path/to/state
Architecture
src/androidmigrate/
cli.py -- CLI entry point and argument parsing
tui.py -- Curses-based terminal UI
tui_render.py -- TUI rendering primitives (panels, badges, themes)
sync_engine.py -- Core sync, restore, and checkpoint logic
storage.py -- SQLite repository and content-addressed blob store
transport.py -- ADB transport layer (device communication)
models.py -- Domain data classes
config.py -- Path helpers and state directory layout
mirror_path.py -- Backup folder validation and autocomplete
root_manager.py -- Interactive root browser and management
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file androidmigrate-0.1.0.tar.gz.
File metadata
- Download URL: androidmigrate-0.1.0.tar.gz
- Upload date:
- Size: 44.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75681430b6dc2d61d39e5f2c429f0e20ee2493e69deb37e738a3721d0a4dc03a
|
|
| MD5 |
81f99d0a59d54f3f1a584f0485031559
|
|
| BLAKE2b-256 |
e2169a0a16a88270909c154fc9d6dafc4ab7648b096ad233030d6a46e907de96
|
Provenance
The following attestation bundles were made for androidmigrate-0.1.0.tar.gz:
Publisher:
release.yml on MachineLearning-Nerd/AndroidMigrate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
androidmigrate-0.1.0.tar.gz -
Subject digest:
75681430b6dc2d61d39e5f2c429f0e20ee2493e69deb37e738a3721d0a4dc03a - Sigstore transparency entry: 1102187657
- Sigstore integration time:
-
Permalink:
MachineLearning-Nerd/AndroidMigrate@80b6a3753b993d635d5a110b9f96d381ebe730a1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/MachineLearning-Nerd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@80b6a3753b993d635d5a110b9f96d381ebe730a1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file androidmigrate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: androidmigrate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 41.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6de0a7138ea9d207ffa2c6551053d5c64ba8cbebafc1af0a202b935b951b43c0
|
|
| MD5 |
5a65c2958b6c1ed686037d54c09177cd
|
|
| BLAKE2b-256 |
e820e16a150f25add97e5b9ea85fc91b1bc05e541636e16b2b2f3030451354fa
|
Provenance
The following attestation bundles were made for androidmigrate-0.1.0-py3-none-any.whl:
Publisher:
release.yml on MachineLearning-Nerd/AndroidMigrate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
androidmigrate-0.1.0-py3-none-any.whl -
Subject digest:
6de0a7138ea9d207ffa2c6551053d5c64ba8cbebafc1af0a202b935b951b43c0 - Sigstore transparency entry: 1102187658
- Sigstore integration time:
-
Permalink:
MachineLearning-Nerd/AndroidMigrate@80b6a3753b993d635d5a110b9f96d381ebe730a1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/MachineLearning-Nerd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@80b6a3753b993d635d5a110b9f96d381ebe730a1 -
Trigger Event:
push
-
Statement type: