tmo1 / sms-ie

SMS Import / Export is a simple Android app that imports and exports SMS and MMS messages, call logs, and contacts from and to JSON / NDJSON files.
GNU General Public License v3.0
360 stars 39 forks source link

MMS not imported/exported correctly #79

Closed Throun closed 1 year ago

Throun commented 1 year ago

When importing my messages on an old phone, none of the MMS imported appear correctly. The SMS apps I tested show that a message exists, from the correct contact and sent or received at the correct time. However, the message itself does not appear.

The app does show that MMS is being backed up when exporting and importing. Regular SMS messages from the same backups don't seem to be affected. Screenshot_20221201-213346

tmo1 commented 1 year ago
Throun commented 1 year ago
tmo1 commented 1 year ago

Okay - I've never seen or heard of something like this. Would you please post some JSON that demonstrates the problem, as per the guidelines here?

Throun commented 1 year ago

messages-redacted-2022-12-07.json.txt

Ok, here's the JSON, saved as a text file.

tmo1 commented 1 year ago

Thank you. I'm working on this - I'll report any progress.

tmo1 commented 1 year ago

The problem was the presence of tags named sef_type in the MMS parts. These are not present in the Android Telephony.MMS.Part table, and they therefore caused the part inserts to fail. I have no idea what these tags are - perhaps they were introduced by one of the messaging apps (QKSMS or Simple Mobile Tools: Simple SMS Messenger) used on the source system?

In any event, the solution was to add a routine to drop all tags not present in the destination MMS part table (something we previously had to do for the basic SMS and MMS tables).

Throun commented 1 year ago

Sorry for bumping this, but would it be possible to make a new release to get this fix?

tmo1 commented 1 year ago

Done.