iOSMessageExport
iOSMessageExport copied to clipboard
Export directory empty
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
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.
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.
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?
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.
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.
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.
I had a backup from iOS 12.1 and the export worked with https://github.com/xerohour/iOSMessageExport/commit/f9126f6fbe3bc82ca86115eae9b86fc7440a8ee1 as is.