Edit SMS and call log history 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!
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.

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).

Make sure sqlite3 is working.

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.