Skip to main content

ADBackup

Actually a good way to back up photos and videos from an Android phone to your PC over ADB, keeping the real capture date on each file.

Why

It always annoyed me that there's no proper way to sync photos and videos off a phone with adb. adb pull makes you download everything again, adb sync throws away the picture capture dates, and either way you're typing out commands by hand every time. So I made this: point it at a folder, pick what you want, and it copies only what's missing and fixes the dates afterwards.

Your phone is only ever read from - ADBackup never deletes, moves, or renames anything on it.

Using it

  1. cd into the folder where you want the files saved.
  2. Plug in your phone with USB debugging on.
  3. Run adbackup.

It finds the phone (approve the debugging prompt if it asks), then shows a little folder browser, DCIM is at the top, folders above files. Move with the arrow keys, Enter to open a folder, Backspace to go up, S to pick the folder you're in, Q to quit.

Then it asks a few things (arrows + Enter): include subfolders, update or redownload everything, correct the dates, and how many files to copy at once (just press Enter for 4). It shows how many are new vs already backed up, you confirm, and it copies them with a progress bar and stamps each file's Created/Modified date to when the photo or video was actually taken.

The folder you picked is recreated by name in your destination, e.g. picking /storage/emulated/0/DCIM/Camera gives you a Camera\ folder.

Installing

You need ADB on your PATH (Android platform-tools - check with adb version) and USB debugging enabled on the phone. Then:

py -m pip install --user pipx
py -m pipx ensurepath      # then open a new terminal
pipx install adbackup

pipx ensurepath puts the adbackup command on your PATH, so after that it just works from any folder.

Latest from source instead: pipx install git+https://github.com/EmilHaase/adbackup.git

Speed

Files are pulled in batches of up to 100 per adb process instead of one command per file, so transfer time isn't eaten by process startup. Every file is still size-verified and retried individually if needed. Live speed and ETA are shown in the progress bar.

I recommend using a good USB 3 cable - with one I usually get about 250 MB/s. Of course lots of smaller files download slower than a small amount of big ones, since each file has a fixed per-file cost.

Disclaimer

I have to apologise for a limitation I could not work around: photos and videos taken before January 1, 1601 cannot be dated correctly. Windows file timestamps simply do not go back any further, and there is nothing I can do about it. Files with a capture date before 1601 are treated as having no readable date - if you picked the option to move such files, they will be sorted into the _ADBackup_errors folder and you will unfortunately have to date them manually. I am genuinely sorry to everyone affected by this.

Notes

  • Dates come from EXIF for images (JPEG, HEIC, RAW, …) and the container creation time for videos. If a file has no readable date you choose up front what happens - keep it with the file's own date, move it to an _ADBackup_errors folder, or skip it. Nothing is ever removed from the phone.
  • Anything skipped or failed is listed at the end and written to _ADBackup_report.txt in the destination.
  • Re-running is safe: in update mode it skips whatever's already there.
  • Edge cases are handled: filenames Windows doesn't allow are renamed safely (and still recognized on re-runs), and paths longer than Windows' 260-char limit work fine.

About

Thought up by me, Emil, and yes, even the the cool name. The actual code was writen with Claude (Opus 4.8 and Fable 5) and tested it properly myself - I actually use it. MIT licensed.

Metadata

Release files for adbackup 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adbackup 1.0.0
File Size Uploaded
adbackup-1.0.0.tar.gz 23.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adbackup 1.0.0
File Interpreter ABI Platform
adbackup-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.4 kB

Release files / adbackup-1.0.0.tar.gz

Download URL adbackup-1.0.0.tar.gz
Size 23.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cd6167a79cf5e6d3f3a2fedac16482ef556950b21b8fbc9106bf92b59cbebe16
BLAKE2b-256 checksum
How to use checksums
10362151b86da0452c5bf52ae900b06d8e974fa168c98aea2c614fd3d90c2f41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.

Transparency log

Release files / adbackup-1.0.0-py3-none-any.whl

Download URL adbackup-1.0.0-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f05aa7717868b9b87e99d08b02005bff881b3d4a9326d8bd60f43a5e2fb44e1f
BLAKE2b-256 checksum
How to use checksums
d469a8ddcf1fc0a425d20a8f08a9c4ed36e5e0e978cb9949330521477844df06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page