The camera asked “Format card?” and someone pressed OK. A quick format writes a fresh, empty FAT32 over the old one, but it does not erase the photos: their bytes are still on the card, only the names and the cluster chains are gone. Getting them back means carving: reading the card from start to end and recognising files by their content.

This walkthrough carves a quick-formatted camera card with Loosha Data Recovery 1.4.3, explains the REASSEMBLED-, PARTIAL- and UNVERIFIED- names, and checks every result against the original photos by SHA-256. The card image is a download, so you can repeat every step.

Download the formatted SD card image Download Loosha Data Recovery

Before you start

Take the card out of the camera and do not take another picture: every new shot overwrites old ones. Put the card in a reader, and save results to a different disk. If the card gives read errors, image it first (see image a failing disk with a ddrescue map) and carve the image.

What is on the sample card

sd-card-formatted.img is a 304 MiB card image: an MBR, and FAT32 at 4 MiB with 4 KiB clusters, labelled EOS_DIGITAL like a Canon card. Photos were written to DCIM/100CANON and some were deleted along the way, so later files were split into pieces around other files, exactly as on a well-used card. One JPEG has a 4 KiB block of garbage in the middle. Then the card was quick-formatted.

Original fileOn the card before the format
IMG_0001, 0003, 0004, 0007, 0009.JPGone piece each
Screenshot_02.png, MVI_0014.MP4one piece each
Screenshot_03.png2 pieces, with Screenshot_02.png in between
IMG_0005.JPG2 pieces, with IMG_0003 and IMG_0004 in between
IMG_0010.JPG3 pieces, around IMG_0007 and IMG_0009
IMG_0011.JPG (progressive JPEG)2 pieces
IMG_0012.JPGone piece, with one damaged 4 KiB block
MVI_0013.MP42 pieces

The SHA-256 of every original is listed at the end, so you can check your own results.

Step 1 — Open the card and start a content search

Unzip the image, start Loosha, and in Wizard step 1 Source choose the image (or, for a real card, the card reader’s disk). In step 2 Scan, click Find lost photos, videos and documents. You do not need to scan for filesystems first: after a format the only filesystem on the card is the new, empty one.

The dialog lists the type groups. Leave all of them on and keep Rebuild fragmented photos and documents (JPEG, PNG, DOCX/XLSX/ZIP) when the pieces can be checked ticked. Choose a new folder on another disk and click Start search.

Find lost files by content dialog with all type groups ticked and fragment rebuilding on

The 304 MiB sample took about 36 seconds on Linux and 42 seconds on Windows. Most of that time goes into trying to put fragmented JPEGs back together, so a real card takes at least as long as reading it end to end, and longer when it holds many split photos.

Content search finished: 13 files found, 8 checked complete, 1 unverified, 4 partial, 1 rebuilt from several fragments

Step 2 — Read the file names

Carved files have no original names; they are named by the byte offset where they start on the card, for example 00000049d000.jpg. The prefix tells you how much to trust each one:

  • No prefix — the file was contiguous and passed its validator. For JPEG and PNG that includes decoding the whole image.
  • REASSEMBLED- — the file was rebuilt from several pieces and the result validated. The pieces are listed in carving.json. For PNG (chunk CRCs) and ZIP-based files (member CRCs) that check is a checksum, so a passing file is byte-exact by proof. For JPEG it is a full decode, which is strong evidence but not a checksum.
  • PARTIAL- — the start of a file was found but the rest could not be proved. Loosha keeps a bounded prefix so you can try to salvage it: up to 32 MiB, or only up to the point where another file starts inside it. Expect a damaged or grey image.
  • UNVERIFIED- — the file was found but failed its check; here an MP4 whose moov and mdat disagree. Treat it as raw material, not as a recovered file.

carving.json in the output folder lists every finding with its offset, length, validation result and the evidence in plain words, such as “structure parsed; contiguous file; JPEG entropy-coded data checked strictly; image decodes”.

Step 3 — Check against the originals

We hashed every output and compared it with the original photos. Windows and Linux produced the same files:

OriginalCarved asResult
IMG_0001.JPG00000049d000.jpgidentical
IMG_0003.JPG00000052a000.jpgidentical
IMG_0004.JPG00000058a000.jpgidentical
IMG_0007.JPG000000678000.jpgidentical
IMG_0009.JPG0000006bc000.jpgidentical
Screenshot_02.png00000079b000.pngidentical
Screenshot_03.png (2 pieces)REASSEMBLED-000000776000.pngidentical, PNG CRCs prove it
MVI_0014.MP4000000848000.mp4identical
IMG_0005.JPG (2 pieces, other photos in the gap)PARTIAL-00000050c000.jpgfirst 122,880 bytes identical, then stops
IMG_0010.JPG (3 pieces, other photos in the gaps)PARTIAL-000000667000.jpgfirst 69,632 bytes identical, then stops
IMG_0011.JPG (progressive, 2 pieces)PARTIAL-000000839000.jpegprefix only
IMG_0012.JPG (damaged block)PARTIAL-0000008c6000.jpegprefix only
MVI_0013.MP4 (2 pieces)UNVERIFIED-00000087c000.mp4not playable as is

Nothing was handed back as good that was not. The four incomplete JPEGs and the split video are clearly labelled, and the one rebuilt PNG comes with a checksum proof.

IMG_0005 and IMG_0010 are the hard case: the gap after their first piece holds other complete photos. Loosha notices that another JPEG starts inside them and cuts the prefix there, then looks for the missing continuation. On this card more than one candidate decoded cleanly for IMG_0005, and none did within the search limit for IMG_0010, so it kept the verified first part instead of guessing. carving.json gives the reason for each.

Step 4 — Look inside a result

In Expert mode, Workbench tools → Inspect opens a carved file read-only and shows what Loosha thinks it is, its dimensions and a preview. For the rebuilt screenshot it reports a 660 × 420 PNG and draws it:

Expert Workbench Inspect on REASSEMBLED-000000776000.png: type PNG, 660 by 420, with an image preview

Inspect works on videos and partial files too. The split video is reported as MP4, marked partial, with the reason: its sample table expects video data at an offset where the card holds something else. The good video passes the same check; a PARTIAL- JPEG is reported as a JPEG that stops early.

Expert Workbench Inspect on UNVERIFIED-00000087c000.mp4: type MP4, partial, with the moov and mdat inconsistency explained

Step 5 — Look at the raw sectors (optional)

To see where a photo starts on the card, open Expert → … → Sector view, click Open read-only and go to an LBA. PARTIAL-00000050c000.jpg starts at byte 0x50C000, which is LBA 10336 with 512-byte sectors. The sector shows the JPEG header (ff d8 ff e0, “JFIF”) and the camera’s Exif block (“Canon EOS R50”). The auto template recognises partition tables and boot sectors only, so for file data it says “No matching template” and shows raw hex. Nothing is written to the card.

Expert Sector view at LBA 10336 of the SD card image: JPEG header and Canon Exif data in hex, with No matching template

Why some photos come back only in part

  • Fragmentation. A camera writes each photo into the first free clusters. After deletions, a new photo can be split around older ones. The format destroys the map of those pieces, so the carver has to guess the order and prove it.
  • Progressive JPEGs are stored as several scans over the whole image, so a missing piece cannot be detected by decoding up to a point. Loosha keeps them as PARTIAL- rather than rebuilding them blind.
  • Videos. MP4/MOV fragments are not reassembled in 1.4.3; only contiguous videos are recovered whole.
  • Overwritten data is gone. Photos taken after the format, or files deleted and overwritten before it (four on this card), cannot be carved by any tool.

The same search from the command line

LooshaDataRecoveryCLI carve -image sd-card-formatted.img -dest E:\Recovered\sd-card -carve-reassemble

-carve-types jpeg,png limits the search to photos, and -carve-cluster 4096 sets the cluster size used to rebuild pieces when there is no filesystem to read it from.

SHA-256 of the originals

e775f1f031d4253542f2d2b528fb4645b1d4b446770d5eb1d68d8de6fb5aad54  IMG_0001.JPG
aa7301265583684a89fd480617601ed62705a7cd506b1fd3fe4a2b23de0f44b6  IMG_0003.JPG
118cbf6b265c192170cd8727b841059c6cd799d0f0e940b27bc27204e929242d  IMG_0004.JPG
4511d8ce8dd8afadba030a51623c4b20f44fa9cc671fa653b4d9654ffe84655b  IMG_0005.JPG
6e53432d279086493338f43139775d42b5e621e5f39d3fbd7207c2f6028f2940  IMG_0007.JPG
168152f152cc2d3a04a65e658df6cc21895481bcd3a593bb16cb86eb12532c1d  IMG_0009.JPG
d95ad1da0e3f08770a0de00068c0b98196d5beb46d2e838a669e32ef80186973  IMG_0010.JPG
8103fbcd6eded1744c66e1919cc88479ee7f4742189c5647178930d2ce9c7e3a  IMG_0011.JPG
afbdcef2274d2d0a402370d52a213c85a3f0f182ff1cd6716ab1507c410975e3  IMG_0012.JPG
251acf8e52774c939eae9007bf8c5b432b8493e6293548dc5d951bb0255d8c06  MVI_0013.MP4
56df2e8a025a0aa529fb79cb12f48d871d12ffec6f589771396bc88e1e7d1337  MVI_0014.MP4
c49b7388edba3f571ae179d118fce1a6ffacd599aea628e2d3625dae4b44a387  Screenshot_02.png
112d537ae378a789c30ce7e8de404f034b1bc15167841533caf16352210a605b  Screenshot_03.png

Related: recover deleted files from a USB stick and prove them with SHA-256, and image a failing disk with a ddrescue map.

Download the formatted SD card image Download Loosha Data Recovery