• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Restoring contacts.db & sms.db

Decod2015

Lurker
I have updated from 2.3.6 to 4.0.3 on my Huawei G300. Before update I backed up the above contacts and sms resulting in two .db files. (Backed up by the automatic option before installing the update). I have tried opening them on the phone but they are "unable to open".
I rooted the phone and using a file manager tried to copy the old .db into the data/data/...... Etc Folders for respective files but my sms and contacts remain blank, can anyone help me please? Anything at all would be appreciated! Thanks
 
How did you back them up? Just copy the files from /data/data/...? That's what your message implies, but it also implies you rooted afterwards which would be inconsistent with this. And how did you do the update?

As long as the formats are compatible just putting them back and rebooting should do it, but if it's a major update carried out via a custom ROM I would not guarantee this.

The apps that will most easily read it are the original ROM's apps. So if you did the update via a custom recovery, did you take a NAND backup first? If so it's easy: take a new one, restore the old one (so old ROM and data), use a message backup app/export contacts from contacts app (saves as vcard file), restore new ROM backup, restore messages and import contacts.

If you didn't take a nandroid first, can you take one now and install the old ROM or something very similar? If so that might be able to read the databases, after which you could use more portable backups as above.
 
The back up was done before the phone was rooted, just a standard option that I was presented with before updating. It left me with a backup.zip folder containing the two files amongst a few more .db files. The update was done through the phone 'Online Upgrade' option.

I then rooted the phone and tried placing the files into the relevant directories but it doesn't seem to do the trick, I still remain with blank SMS and contacts.

Unfortunately I did not take a NAND backup before updating, I'll take one of the current ROM and attempt to downgrade to my old firmware and report back.

Thanks for the assistance Hadron!
 
OK, I don't know what type of backup that was then - I've not met a phone that offers to backup before doing an over the air update, nor one which just copies the db file. Can you tell me the names of these files? I assumed they would be just copies of the databases, but if it was some unknown app which made them then maybe not.
 
For the record, the normal names and locations of the databases would be

/data/data/com.android.providers.telephony/mmssms.db

and

/data/data/com.android.providers.contacts/contacts2.db

(there are some other files in those directories, which you may also have in your .zip).

If the names differed from mmssms.db and contacts2.db then they'd need renaming at least before use.

My worry is not knowing what backup app made these I'm just assuming that they are simple copies of the originals.
 
Hi, i am using Huawei G610 - Android 4.2.1.

Today i have reseted my phone, before reseting it asked me to take backup of call log, sms, settings, weather, etc on SD Card. It created folder name HuaweiBackup folder on SD Card having some folders and backup files with extension .db (calllog.db, sms.db, etc). My question is how to restore these backup files? I am unable to find any option in settings to restore them. Please let me know if anyone can help.

Thanks and regards,

m@s00d
 
Hi Terry, thanks for your response. Unfortunately there is only one option available which is "Backup & Reset", I am unable to find any other option to restore backup.
Regards,
m@s00d

Hi Masood. Try to find a built in app named "Backup" on your Huawei. You can restore your backup data with it.
 
Back
Top Bottom