Read Me
README for the SD Recover Tools package
=======================================
A collection of tools to assist the recovery of files from a corrupt memory card.
Initial aim of this project was to recover photographic jpeg and avi files from
a corrupt SD card. However, the tools might be usable in other situations.
C Tools
-------
This package contains the following command line tools:
jpgrecover - extracts JPEG image files
avirecover - extracts AVI files
sdrecover - currently just lists information about the SD card
sdsearch - searches for file signatures and other data structures
All tools operate on a raw image file created using, for example, the dd command
line tool.
$ dd if=/dev/sda1 of=cardimage.img
The 'if' option specifies the device spec for the corrupt memory card. The copy
process may take rather a long time, and depends on the size of the memory card
and the speed of the interface. Here is the output of the command run on MacOSX:
[mirror-doors:~/src/sd_recover] steven% dd if=/dev/rdisk1 of=cardimage.img
494080+0 records in
494080+0 records out
252968960 bytes transferred in 2015.300956 secs (125524 bytes/sec)
[mirror-doors:~/src/sd_recover] steven%
Use pdisk on MacOSX to find the correct value for the device spec. You need to
run pdisk with root privilege. Thus, with the following example /dev/rdisk1 is
the required device...
[mirror-doors:~] steven% sudo pdisk
Password:
Top level command (? for help): L
pdisk: No valid block 1 on '/dev/rdisk1'
Partition map (with 512 byte blocks) on '/dev/rdisk0'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: Apple_Driver43*Macintosh 56 @ 64
3: Apple_Driver43*Macintosh 56 @ 120
4: Apple_Driver_ATA*Macintosh 56 @ 176
5: Apple_Driver_ATA*Macintosh 56 @ 232
6: Apple_FWDriver Macintosh 512 @ 288
7: Apple_Driver_IOKit Macintosh 512 @ 800
8: Apple_Patches Patch Partition 512 @ 1312
9: Apple_HFS Untitled 234439816 @ 1824 (111.8G)
10: Apple_Free 8 @ 234441640
Device block size=512, Number of Blocks=234441648 (111.8G)
DeviceType=0x0, DeviceId=0x0
Drivers-
1: 23 @ 64, type=0x1
2: 36 @ 120, type=0xffff
3: 21 @ 176, type=0x701
4: 34 @ 232, type=0xf8ff
Top level command (? for help):
Java Tools
----------
There is a Java tool from Paul Lovvik that tries to read the
filesystem and retrieve all files. It will create a complete directory structure
containing all files referenced in the filesystem. If there are any unreferenced
clusters, those will be written as files into the "unreferencedClusters" directory.
The 'files' command on UNIX/Linux can usually determine the type of file, and if
appropriate, the jpegrecover or avirecover tools can be used to extract the image
or movie.
Usage:
java -jar dist/lib/Recover.jar <sd image file> <output directory name>
Warnings and errors detected while reading the filesystem are reported.
More Information
----------------
See INSTALL for how to build and install these tools.
See COPYING for the License conditions
See TODO for my To Do list
See NEWS for latest information on these tools
Platform coverage
-----------------
The code was developed as a set of command line tools on MacOSX. A XCode project
is supplied to assist building on MacOSX, but is not required (the makefile can
still be used directly, even on macOSX).
On Linux and BSD platforms the code should also compile and function correctly.
I have tested it to a limited extent Ubuntu.
On windows the code should compile and work within MinGW and Cygwin, but I have
not tested this. Comments are welcome from anyone who has.