iOSMessageExport icon indicating copy to clipboard operation
iOSMessageExport copied to clipboard

Export directory empty

Open Infidaelity opened this issue 7 years ago • 7 comments
trafficstars

Hi,

I first tested this script using an older backup from 2017 and everything worked fine.

Now with a recent one the export directory is created but only the style.css file is within it. I also don't receive any error message.

Any idea on what causes this?

Best regards, Infidaelity

Infidaelity avatar May 17 '18 20:05 Infidaelity

Ok, It seems the problem occurs around line 97 in iOSMessages.pm Essentially it looks as if the Date format has changed. It is now a 18 digit integer that needs to be converted.

looks something like this

550241123454777984

Need to investigate more, however, might not have the time in the short term.

mgr34 avatar Jun 13 '18 19:06 mgr34

Any easy way to bypass it and just say get all the attachments? It's been years since I've programmed at all and I never learned Perl.

ffgandalf avatar Aug 21 '18 15:08 ffgandalf

Okay using nbornstein solution from Issue 23 works except I'm getting no attachments. It looks like they are failing to copy. For some reason line 113 is not outputing the error message, it does if I change it to copy($self->{_backup_directory}.$attachment->{'sha1_filename'}, $directory."/".$attachment->{'filename'}) or die "Copy failed for file ".$self->{_backup_directory}.$attachment->{'sha1_filename'}."\n"; (i changed or to or die) Any ideas?

ffgandalf avatar Aug 21 '18 16:08 ffgandalf

The attachments have the same issue as arnemoor in issue 28. Fix was more involved, needed to change the copy output in line 101 to adjust that everything is now in sub-directories.

ffgandalf avatar Aug 21 '18 16:08 ffgandalf

Still no idea why the error catching for the copy command is failing unless you change it to or die, which auto exits the program.

ffgandalf avatar Aug 21 '18 16:08 ffgandalf

I added the following to line 101:

substr($attachment->{'sha1_filename'}, 0, 2)."/".

so that the entire line is now:

copy($self->{_backup_directory}.substr($attachment->{'sha1_filename'}, 0, 2)."/".$attachment->{'sha1_filename'}, $directory."/".$attachment->{'filename'}) or "Copy failed for file ".$self->{_backup_directory}.$attachment->{'sha1_filename'}."\n";

Note - If you're worried about the error message after the or, you could add the substr() there as well.

Attachments are now exporting to the _export directory and showing in the html files, but there does seem to me some irregularities in the attachments put into the files. Almost like the attachment ids are not aligned with the correct messages.

daqieq avatar Oct 15 '18 03:10 daqieq

I had a backup from iOS 12.1 and the export worked with https://github.com/xerohour/iOSMessageExport/commit/f9126f6fbe3bc82ca86115eae9b86fc7440a8ee1 as is.

solsson avatar Dec 22 '18 20:12 solsson