SMS Backup&Restore is a great Android app when you need to back up and restore your messages. However, it doesn't always deal well with duplicates, and when you have, say, hundreds of duplicate messages on your phone after a failed data merge, deleting them all by hand is not really an option :)
The goal of Dupe Buster is to provide a minimal-impact solution that automatically identifies and deletes duplicates in your file without busting your whole SMS/MMS backup.
It is a simple program written in C++, that uses Lee Thomason's TinyXML2 library in order to parse SMS B&R's backup files and identify duplicate messages.
The code is extremely rudimentary (not to say horrendously basic), so do not expect too much of it :)
- Identifies duplicates in a SMS Backup&Restore XML backup file and deletes them
- SMS and MMS support
- Requires duplicates to be positioned one after another in the backup files (which means save files generated by SMS Backup&Restore should be handled properly, but a manually modified save might cause problems)
- Special characters and emoji support is unknown
- Code is quick and dirty
- International prefixes not handled (French prefix handling is hard-coded at the moment)
- TinyXML2's XML auto-formatting when writing may cause issues in MMS in some cases (needs further testing)
- Back up your messages using SMS Backup&Restore. As mentioned above, the behaviour of the program is not guaranteed with manually modified saves, so do not edit the .xml file before running Dupe Buster!
- Compile Dupe Buster (feel free to enrich the terrible makefile if you wish to)
- Run Dupe Buster:
dupe_buster YOUR_SAVED_FILE.xml TARGET_FILE.xml
- Transfer the cleaned-up file generated by Dupe Buster to your phone (the way you do it is unimportant, what matters is that the file is reachable by SMS Backup&Restore; a safe way is to make it end in your phone's
Downloads
folder) - Use SMS B&R to delete all messages on your phone (this is why it is important to make a backup, should Dupe Buster fail!)
- Restore your messages using the XML save file generated by Dupe Buster that you transferred to your phone beforehand
- As usual with a SMS B&R restore, wait a little while for your Android phone to restore all your messages, and voilà! You're all set :)
Dupe Buster is licensed under the Unlicense:
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to http://unlicense.org/
Long story short, you can do anything you want with this small piece of code. Of course, any form of credit would be appreciated, but do not feel obliged to do so :)