All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Restoring SMS-database on Android 5
PostPosted: September 28th, 2020, 8:48 
Offline

Joined: October 20th, 2014, 5:25
Posts: 138
Location: Sweden
So, my very old phone died last year. Not until today I had the time to desolder the NAND-chip to check it. The culprit was a read/write error, causing the phone lock itself when it tried to boot. I have salvaged all my files now. For SMS/MMS, I use the app "SMS Backup & Restore" but this requires a working SMS-database so I cannot pull the info out of the .db-file (and the attached MMS-files). So I bought an exact same phone for peanuts and installed the exact same firmware on it, copied /data/data/com.android.provider.telephony/* from the dead to the new one and expected this to work, so I could run the SMS Backup-app again.

Alas, it does not. Everytime I boot the new phone now I get the message as seen on the photo. Somehow the old database make the new phone go havoc but I don't know why. Everything is exacly the same so I don't know why it would complain.

So, anyway: does anyone know how I can put back the mmssms.db into /data/data/com.android.providers.telephony/ so I can make a clean backup of everything?


Attachments:
IMG_20200928_144558.jpg
IMG_20200928_144558.jpg [ 2.87 MiB | Viewed 13621 times ]
Top
 Profile  
 
 Post subject: Re: Restoring SMS-database on Android 5
PostPosted: September 29th, 2020, 18:23 
Offline
User avatar

Joined: June 11th, 2013, 17:01
Posts: 1710
Location: Phoenix, AZ USA
I don't think you can put the database back onto the new phone by just copying it. I am sure it is tied to the phone with metadata of some kind which probably prevents it from booting. You can parse the database with a tool and recover the data to an XLS or CSV file and possibly import it that way. The database is more than likely SQL Lite.

_________________
HDD, SSD, Flash and RAID Data Recovery
Founder of The Data Recovery Professionals Group


Top
 Profile  
 
 Post subject: Re: Restoring SMS-database on Android 5
PostPosted: September 30th, 2020, 6:36 
Offline

Joined: October 20th, 2014, 5:25
Posts: 138
Location: Sweden
I managed to solve it. Long story shot: you can put the db-file there and it will fetch everything from it.

However, in my case, the db-file contained errors (due to the error corruption, I assume). That's why everything went nuts. I managed to run an adb-shell, open the db in sqlite, use ".dump" and then ".read" it back. That way, all the dead records went away, and the phone could import the db-file without any hassle.

Unfortunately I lost the latest 300 SMS due to the corruption, but I can live with that. Atleast I learned something new.


Top
 Profile  
 
 Post subject: Re: Restoring SMS-database on Android 5
PostPosted: September 30th, 2020, 11:02 
Offline
User avatar

Joined: June 11th, 2013, 17:01
Posts: 1710
Location: Phoenix, AZ USA
bos wrote:
I managed to solve it. Long story shot: you can put the db-file there and it will fetch everything from it.

However, in my case, the db-file contained errors (due to the error corruption, I assume). That's why everything went nuts. I managed to run an adb-shell, open the db in sqlite, use ".dump" and then ".read" it back. That way, all the dead records went away, and the phone could import the db-file without any hassle.

Unfortunately I lost the latest 300 SMS due to the corruption, but I can live with that. Atleast I learned something new.

Well done. Thanks for sharing.

_________________
HDD, SSD, Flash and RAID Data Recovery
Founder of The Data Recovery Professionals Group


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group