Skip to content

Alessandro201/adbpuller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdbPuller

Copy files from Android folders using ADB.

Features

  • Copy files from Android folders using ADB, by default skipping already copied files
  • Copy metadata such as last modification date by default
  • Run a dry run to preview what would be copied
  • Skip paths listed in one or more skip files
  • Include/Exclude files using regex patterns
  • Copy common folders using presets:
    • Android media: DCIM and Pictures
    • WhatsApp media
    • WhatsApp backups and databases

Usage

adbpuller [OPTIONS] <--sources [...]|--copy-media|--copy-whatsapp|--copy-whatsapp-backups>

Options

-s, --sources [...]
    The folder(s) or item(s) to copy.

-m, --copy-media
    Add /sdcard/DCIM and /sdcard/Pictures to the sources.

-w, --copy-whatsapp
    Add WhatsApp media folders to the sources.

-b, --copy-whatsapp-backups
    Add WhatsApp backup and database folders to the sources.

-d, --dest <DEST>
    The folder in which to copy the files.
    Default: .

--skip [...]
    Read paths to skip from one or more text files.
    Each skip file must contain one Android path per line.

-I, --include [...]
    Include only files whose Android path matches at least one regex.
    Include filtering is applied before exclude filtering.

-E, --exclude [...]
    Exclude files whose Android path matches at least one regex.

-n, --dry-run
    Print which files would be copied and where.

-f, --force
    Overwrite files already present in the destination folder.

--no-metadata
    Do not copy metadata such as the last modification date.

--output-prefix [PREFIX];
    Write successfully copied paths to PREFIX.txt and failed paths to PREFIX_failed.txt.
    If omitted, no log files are written.

-h, --help
    Print help.

-V, --version
    Print version.

Examples

Copy Android media folders into the current directory:

adbpuller --copy-media

Copy WhatsApp media and WhatsApp backups into ./WhatsApp:

adbpuller --copy-whatsapp --copy-whatsapp-backups --dest ./WhatsApp

Copy /sdcard/Download into ./AndroidDownloads, overwriting existing files:

adbpuller --sources /sdcard/Download --force --dest ./AndroidDownloads

Copy only .jpg and .png files:

adbpuller --sources /sdcard/DCIM --include '\.jpg$' '\.png$'

Copy everything except thumbnails and cache files:

adbpuller --sources /sdcard/DCIM --exclude 'thumbnail' 'cache'

Use a skip file:

adbpuller --sources /sdcard/DCIM --skip skipped_files.txt

Example skipped_files.txt:

/sdcard/DCIM/Camera/IMG_0001.jpg
/sdcard/DCIM/Camera/IMG_0002.jpg

Run a dry run:

adbpuller --sources /sdcard/DCIM --dry-run

Presets

--copy-media

Copies files from:

/sdcard/DCIM
/sdcard/Pictures

--copy-whatsapp

Copies files from:

/sdcard/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Audio
/sdcard/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Images
/sdcard/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Video
/sdcard/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Voice Notes
/sdcard/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Video Notes
/sdcard/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Documents

--copy-whatsapp-backups

Copies files from:

/sdcard/Android/media/com.whatsapp/WhatsApp/Backups
/sdcard/Android/media/com.whatsapp/WhatsApp/Databases

Output files

After a copy operation, AdbPuller writes:

files_done.txt
files_failed.txt

files_done.txt contains successfully copied Android paths.

files_failed.txt contains paths that failed to copy.

Requirements

The only requirement are the ADB drivers.

AdbPuller first tries to find the adb binary in the same folder as the adbpuller executable. If it cannot find it there, it searches for adb in your PATH.

Install ADB

On Ubuntu or Debian-based Linux distributions:

sudo apt install adb

Alternatively, download Android Platform Tools from Google and add them to your PATH.

On Windows, download Android Platform Tools for Windows from Google and extract them into a folder.

If you place adbpuller in the same folder as adb, the folder may look like this:

platform-tools/
├── adb
├── adbpuller
├── fastboot
└── ...

On Windows, the binaries will usually be named:

adb.exe
adbpuller.exe
fastboot.exe

Installation

You can download the latest binary from the release page.

Alternatively, you can build from source.

Build from source

Requirements:

  • Rust

Clone the repository and build the binary:

git clone https://github.com/Alessandro201/adbpuller.git
cd adbpuller
cargo build -r

The binary will be available at:

target/release/adbpuller

Setup

Enable USB debugging on your Android device.

Connect the device to your computer with a USB cable, then run:

adb devices

Accept the authorization popup on the phone, then run the command again:

adb devices

Expected output:

List of devices attached
12ec6c18 device

You are now ready to use AdbPuller.

About

Copy content from android folders

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages