4

I have a bunch of friends who have changed their phone numbers. I have already updated their numbers in the contact list, but the call log and the SMS conversations still have the old number, and thus they are not linked to my friends contacts anymore.

Is there any way to edit the SMS messages from past conversations? Is there any way to edit the call log?

Bonus points if I can use a regexp search-and-replace for that!

  • 4
    The point behind that is: though the persons behind are the same, those communications have been made with different numbers, so they are not intended to be changed. The easiest work-around would be keeping the old numbers in your contacts' records (and mark them in a way to easily tell they're old). That way the connection stays, and you have the up-to-date information there at the same time. – Izzy Oct 31 '13 at 12:02
  • 1
    @Izzy What you say is true and I agree. But what really happened is that a ninth digit is being gradually added to all mobile numbers of the country. So, in fact, the old number has migrated to the new one, and no one will ever use the old number again. – Denilson Sá Maia Oct 31 '13 at 15:10
2

Personally I had done this for a few times, plus transmitting the changed data from an Android 4.1 to an Android 5.1 device, but the method I used might be a little complex for normal users.

  1. Root your phone and install a terminal emulator, if your phone has sqlite3 binary preinstalled then I'd recommend Terminal Emulator for Android, otherwise Termux is better (it has an APT repo where SQLite3 is available).
  2. Make sure sqlite3 is working.
  3. Copy out the database from /data/data/com.android.providers.telephony/databases/smsmms.db. Find a tutorial on how to run SQL queries and do your desired operations. Then put the modified database file back to the original place. Take note of its original access conditions and chmod and chown them back.

    With this method and a few knowledge of SQL anything can be easily manipulated and ported to another system, despite some difficulty.

Edit: SQLite Editor is a better choice than CLI sqlite3 if you only want to do basic modifications rather than transforming, while the CLI sqlite3 provides full SQLite functions.

  • Hey. Are calls also recorded in the smsmms.db file? – Marc.2377 Jun 13 at 19:45
0

I haven't tried this, but it might work:

The GO SMS Pro app has an export and import feature. You could export the conversation to an XML file, do a search and replace of the number, and import it back.

I have no idea if it will override the conversation of the new number, so better do a back-up first. Or you might as well export both conversations (old and new numbers) and merge them. Just take note though that the XML file has an SMS count; you might want to update this value.

As for the call log, I have no idea. I think call logs are not very useful anyway.

0

The above mentioned GoSMS method will work. Export them to XML. Get a useful XML reader. I've done it with notepad but its a lot harder to read. You need to find all of the old number, and replace all with the new number. Save. Then delete all conversations on your phone. This will help you get a clean slate for messages to be added. Then Import to your device.

I've done this with "SMS Backup & Restore" app and it works.

It is also worth noting that you can export and combine the conversations too. Between old and new number. But you will have to change more in the XML such as the total number of SMS messages usually in the beginning of the XML.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.