Giter Site home page Giter Site logo

samueltardieu / recoverjpeg Goto Github PK

View Code? Open in Web Editor NEW
74.0 6.0 13.0 112 KB

Recover lost JPEGs and MOV files on a bogus memory card or disk

Home Page: http://www.rfc1149.net/devel/recoverjpeg

License: GNU General Public License v2.0

C 58.21% C++ 22.71% Python 5.18% Shell 10.52% Makefile 1.90% M4 1.48%
pictures sdcard filesystem recovery-tools hacktoberfest

recoverjpeg's Introduction

Installation

To install recoverjpeg, run

./configure
make
sudo make install

To use sort-pictures, you need to install:

Usage

Look at the manual pages for recoverjpeg(1), recovermov(1) and sort-pictures(1).

What to do if the medium is physically damaged?

Mike Ingle wrote about working with a drive that cannot be read because of errors:

The hard drive was more complicated because recoverjpeg would abort on the first bad sector it hit. I tried using a named pipe and that did not work, so I did:

dd if=/dev/sdc of=recovery-image bs=65536 conv=noerror

and that made an image file while skipping over the bad blocks without aborting. Then I would end up with a 500 GByte file which I ran recoverjpeg on, and it worked.

Another option suggested by Florian Schmaus is to use the dedicated ddrescue which may cope with even more desperate situations where multiple passes are needed in order to recover the physical medium content.

History

recoverjpeg was written on 23 December 2004 after a huge mistake: a disk containing pictures was repartitioned and a new operating system was installed on top. recoverjpeg and sort-pictures ran on this 80GB disk and rescued 19222 pictures (11GB):

  • 9538 pictures sorted by date (a few of them were corrupted in a way that no software can detect as they are valid JFIF files) and taken on 337 different days

  • 1310 JFIF files without date (some of them were correct pictures whose exif data had been corrupted)

  • 8301 JFIF files too small to be digital pictures (no error there, most of them were thumbnails of real pictures previously made by software such as gqview)

  • 71 invalid JFIF files

  • 4 pictures recorded at a date of 0000-00-00 (probably a bug in the camera used to take the pictures)

Of course, I had a backup of everything, but I cannot seem to remember where I put it.

On January 2010, Jan Funke added the recovermov(1) program to the package to recover lost movies.

On April 2012, Samuel Tardieu added the -d option to recoverjpeg(1) to circumvent arbitrary limits set on the number of files per directory on certain limited filesystems. Also, support of compilation with clang(1) was added.

Portability

You need to ensure that the off_t type from the C library and the lseek() function support offsets of at least the size of the device you want to recover pictures from.

Contact information

Home page: https://rfc1149.net/devel/recoverjpeg

Authors:

Development

If you got this software using your revision control tool, you can build the autogenerated files by using:

autoreconf --install

Thanks

The following beta-testers and contributors are warmly thanked:

recoverjpeg's People

Contributors

bors[bot] avatar mibe avatar samueltardieu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

recoverjpeg's Issues

Featurerequest: Possibility to continue a half searched partition

Hi!

I have no idea if the search is sequentially... but if it is, it should be great to just say:
-c 1000g
to start the search at that position. For me it should be combined with -i 10598, then I could have searched the nightly search of a 2TB disk without restarting it (needed computer at work).

(My idea of "-c" is "continue")

Thanks for a fabulous program!
/Erik s

Preserving the timestamp

Because I use make install, I found that install without -p option.

Can you add it? I can manually install with -p but I think this should be fixed.

sort-pictures always fails

Hi,

I am the current Debian maintainer of recoverjpeg. The bug #766496, available here[1], reports about an issue when testing the 'identify' presence. To solve the problem, I made a patch for Debian.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766496

Please, see the following patch.


--- recoverjpeg-2.3.orig/sort-pictures
+++ recoverjpeg-2.3/sort-pictures
@@ -32,7 +32,7 @@ dependencies () {
exit 1
}

-identify > /dev/null 2>&1 || dependencies
+[ -f /usr/bin/identify ] || dependencies
exif --version > /dev/null 2>&1 || dependencies

for i in image?????*.jpg; do

Thanks in advance.

Regards,

Eriberto

recovermov stops reading the disk using 100% CPU

I'm using recovermov to recover a 2TB disk like this:

sudo recovermov -o /mnt/videos1 /dev/sdc

After 2 tries, I have exactly the same symptoms: after this message:

mov file detected
writing to video_844.mov
recovery of video_844.mov finished

The process is using 100% CPU and I don't see any reading activity through iotop.

tomo@misti:~$ pidstat -dl | grep recovermo
15:35:34        0    363667     -1,00     -1,00     -1,00 2938223  recovermov -o /mnt/videos1 /dev/sdc 
tomo@misti:~$ ps aux | grep recover
root      363661  0.0  0.0  14852  3316 pts/0    S+   févr.10   0:00 sudo recovermov -o /mnt/videos1 /dev/sdc
root      363667 91.8  0.0   5888   996 pts/0    R+   févr.10 5563:45 recovermov -o /mnt/videos1 /dev/sdc
tomo@misti:~$ sudo strace -p 363667
strace: Process 363667 attached
[nothing is displayed]
^Cstrace: Process 363667 detached

Let me know how can I debug this further.

Thanks ! And thanks a lot for the great tools recoverjpeg and recovermov.

COPYING is outdated

Please update the COPYING file.
The Free Software Foundation address is incorrect.

Permission for reading block device

I run recoverjpeg as a regular user:

% recoverjpeg /dev/sdd1
recoverjpeg: unable to open /dev/sdd1 for reading (Permission denied)

Sure, I can't read from a block device. Only root can.
So, please install recoverjpeg to ../sbin/ and rename recoverjpeg.1 to recoverjpeg.8 and install to ../man8/

Probably the same with recovermov.

OSX functionality?

Have you received any feedback on whether or not this builds (and works) with OS X? Here's my situation: I have an old SATA HD connected to my late 2014 iMac with a powered adapter cable. Using Disk Utility, OS X recognizes the HD, can see the multiple partitions, has assigned them /dev device IDs, but can't mount them. I'll be using dd to copy the raw bits off the partition and trying to mount the resulting file as a loopback device, and if for some reason it still can't be read then I'd like to use recoverjpeg on it.

I have (Ubuntu) Linux running under VMWare Fusion, but for whatever reason it doesn't recognize either the adapter or the attached HD (at least as far as I can tell, and I'm no Linux novice), so I can't use this tool there.

Makefile issue

Hi,

I'm packaging it into Fedora at here: https://bugzilla.redhat.com/show_bug.cgi?id=956737

Now the reviewer said there are problem:

One upstream issue:
Makefile.am contains this:
recovermov_LDADD = -lstdc++

libstdc++ is an internal implementation detail of c++, which means c++-compilers will pull it in when needed and also means libstdc++ should not be explictily linked against.

Consider a fix?

Thanks.

Makefile issue: impossible rebuild after a dist-clean

Hi,

The 'make dist-clean' command removes the recoverjpeg.1 file. After this, the 'make' command will fail. To fix, I suggest to remove the following line from Makefile.am:

CLEANFILES = recoverjpeg.1

Thanks a lot in advance.

Regards,

Eriberto

How to use this on a Mac device

I tried to run the ./configure command but got the below error

amal@Amalendus-MacBook-Pro recoverjpeg-2.6-2.3 % ./configure
zsh: no such file or directory: ./configure

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.