HUB
Sign inSign up

bokic78/dslr_jpen_recovery

By bokic78

•Updated 26 days ago

Fast, lightweight tool to recover JPEG photos from SD cards and disk images.

Image
Data science
0

214

bokic78/dslr_jpen_recovery repository overview

⁠DSLR JPEG Recovery

A fast, lightweight, and camera-agnostic tool designed to carve and recover valid JPEG photos directly from corrupted SD cards or raw disk images.


⁠Features

  • Structural Validation: Scans the media at every 512-byte sector boundary and walks the JPEG marker chain from Start of Image (FF D8) through End of Image (FF D9) to extract whole, uncorrupted files with exact byte sizes.
  • EXIF Date Recovery: Reads EXIF metadata (DateTimeOriginal, tag 0x9003) to name files with their original capture timestamps.
  • Universal Camera Support: Works independently of camera make or filesystem corruption (FAT32, exFAT, ext4, etc.).
  • Flexible Input: Accepts either raw disk images (.img, .raw, .dd) or direct physical block devices (e.g. /dev/sdb, /dev/mmcblk0).
  • Minimal Footprint: Built on Alpine Linux with a container image footprint under 10 MB.

⁠Output Naming Convention

Recovered photos are written to the target destination folder as:

  • IMG_YYYY:MM:DD HH:MM:SS.jpg — when an EXIF capture date is detected.
  • IMG_<sector_offset>.jpg — when the image does not contain an EXIF date tag.

⁠Quick Start

⁠1. Recover from a Disk Image

Mount your current working directory containing the image file into /data:

docker run --rm -v "$(pwd):/data" bokic/dslr_jpen_recovery sdcard.img ./recovered
⁠2. Recover Directly from a Physical SD Card Device

Pass the physical block device into the container using --device:

docker run --rm --device /dev/sdb:/dev/sdb -v "$(pwd):/data" bokic/dslr_jpen_recovery /dev/sdb ./recovered

Important: Always unmount the SD card filesystem before scanning (umount /dev/sdb*). Never write recovered files back onto the damaged SD card.


⁠CLI Usage

Usage: dslr_jpen_recovery <img_file> <dest_dir>
  • <img_file>: Path to the disk image file or block device node.
  • <dest_dir>: Directory where recovered JPEGs will be saved.

⁠Source Code & Issues

Tag summary

Content type

Image

Digest

sha256:06091c2de…

Size

3.5 MB

Last updated

26 days ago

docker pull bokic78/dslr_jpen_recovery