Where is the db of contacts in SGS2? - Android Software/Hacking General [Developers Only]

Hello
someone can tell me, where exactly the contacts are saved in the file-system of an Samsung Galaxy S2 with 2.3.5?
I have a rooted phone and I am trying to get an address out of a nandroid backup done some weeks ago.
So I unpacked the data.img with unyaffs and now I have all the subfolders of the /data/ directory but I don't know now, how to access my contacts and where they are.
Which file is it?
Is it a sqlite database?
Ok, I could restore the nandroid backup (done with CWM Manager v2.0) but this takes a long time, just to find a phone number (and address).
frank

Took some time digging around but I found it. Here you go - /data/data/com.android.providers.contacts/databases/contacts2.db
Sent from my Desire HD using xda premium

sashank said:
...
/data/data/com.android.providers.contacts/databases/contacts2.db
Click to expand...
Click to collapse
Good heaven! That is great, tnahk you!
I digged and digged and found notting!
+++!
I could open the db with SQLite Manager (the Firefox Add-On or other apps will do it) and export it as a SQL-File (database / export database), now I could search with a text editor through the whole database, as I don't know the structure.

Related

Moving SMS from windows mobile to android

Hi - i know this question has been asked many times but I was not able to find the correct one - so is there free and working way to backup my sms messages from winmo and transfer them to android ?
I don't know if there's a program for this in winmo, but SMS Backup+ backups your SMSs to your gmail account so maybe you can find a winmo program which does the same
Sent from my GT-I5700 using XDA App
Sprite Migrate is the application you need
missparker76 said:
Sprite Migrate is the application you need
Click to expand...
Click to collapse
Yeah i know but the beta is over and i cant find download link
You're right, I didn't know. I used it a few months ago.
I have no other solution. I remember I had spent much time searching how to transfer everything and had only found that solution for SMS.
Maybe there's a way if you can export your SMS to your SIM card then import them?
Use PIM Backup to backup
Do not 'compress' and do not 'binary backup' the file.
Rename the PIMBackup_xxxxxxxx.phb to *.zip
Unpack this *.zip
Rename any *.* to *.txt to view its content and start processing cq converting it device specific further on your road *cough* success,
SMS Transfer from Winmo 6.5 to Android ICS
backup
Senax said:
Use]PIM Backup[/URL] to
Do not 'compress' and do not 'binary backup' the file.
Rename the PIMBackup_xxxxxxxx.phb to *.zip
Unpack this *.zip
Rename any *.* to *.txt to view its content and start processing cq converting it device specific further on your road *cough* success,
Click to expand...
Click to collapse
HI,
can you please explain in details "start processing cq converting it device specific" how to do it.
I have tried Mobiledit Phone Copier and successfully transferred all SMS from my WinMob 6.5 to Android ICS. but all SMS is showing only RECEIVED DATE but unable to show RECEIVED TIME....I have more that 16000 SMS since year 2009. All are very important to me....Kindly suggest if anyone have any solution for my query...:crying:

[Q] [ANDROID] Copy files/dirs by schedule

Hi there,
I was wondering (and searching different boards) if there is no option to copy files from internal/sdcard flash by schedule. I do a titanium and sms backup every sunday and would like zip/rar these folders and copy the saved archives to any folder on my network (a nas, which I have already mounted in my android).
Commandline with the terminal emulator wouldn´t be a problem, but I dont know how to run scripts by schedule.
Edit: If someone knows how to copy these archives to the installed dropbox sync, this would be awesome too!
Thanks!
shrewm said:
Hi there,
I was wondering (and searching different boards) if there is no option to copy files from internal/sdcard flash by schedule. I do a titanium and sms backup every sunday and would like zip/rar these folders and copy the saved archives to any folder on my network (a nas, which I have already mounted in my android).
Commandline with the terminal emulator wouldn´t be a problem, but I dont know how to run scripts by schedule.
Edit: If someone knows how to copy these archives to the installed dropbox sync, this would be awesome too!
Thanks!
Click to expand...
Click to collapse
For scheduled commandlines , google for cron / cronjob.
Well I did a simple script with GScript Lite and copied the dirs to a smb-share which I mounted with mountmanager. Did work pretty well, but then I stumbled up on the DropSpace-App which works exact the way I want to.
Thanks anyway, darken

[Q] where is the SMS data file stored ?

excuse my noob idea
i need the exact location of SMS data file
does anyone know ?
if we can use "Advanced Explorer" tool to browse/export/import WP7 files
then why we can't export SMS file and import it to other devices or same device (after hard reset) ?
i managed to export
.\Applications\Install\1A0EE8C2-xxxxxxxxx\Install\
from my hd7 to my pc and i found all htc app's files and dll's
then i thought maybe i can backup SMS file in the same way
i tried to export all the files to my pc so i can search all the files from my pc
but there is some issue with advanced explorer i can only export small files
maybe it is more complicated than i think
does anyone have any idea ?
all what i need is :
-export sms folder to my pc
-flash my hd7
-import sns folder without modifying any file
does it work like that or not ?
sorry for my long post and thanks in advance

[TOOL] yaffs extractor, mmssms.db & contacts2.db converter

Some time ago I sold my old android phone and forgot to make a backup of SMS messages and call logs, but kept a complete image backup made by clockworkmod recovery (system.img, data.img, etc.). I wanted to import my SMS messages and call logs to a new phone, but without a reasonable backup this seemed to be impossible. Some quick search over the internet showed that a question about extracting/importing SMS messages from mmssms.db is not so uncommon, but there are no tools to do this. So I wrote one, and decided to share
Sources are available at github.com abbot/android-restore-tools.
It requires Python 2.6 and above to run.
I've also made compiled binaries for windows, attached to this post.
[Binaries last updated on 12.04.2011]
Thanks for the tools. Nice work.
Sent from my GT-I8150 using XDA
Hello,
I'm trying to use your tool to extract SMS from a nandroid backup.
I'm using the data.yaffs2.img file from the backup.
When I choose #2 for mmssms.db and then "s" to extract SMS I get the following error:
Failed to extract messages: file is encrypted or is not a database
DatabaseError('file is encrypted or is not a database',)
Warning: failed to remove temporary file...
What does this mean, and is there a solution?
Hi,
This may be caused by two things: either my tool can't properly read/extract the image file, or it can't read the database.
Please try to extract the image (extract -x data.yaffs2.img). If this does not produce any errors, find the mmssms.db file in the extracted data, it will probably be in data/com.android.providers.telephony/databases/mmssms.db. Then try to run extract -s mmssms.db. Please post if you get any errors doing these steps.
There was an error while extracting the image...it got through partway, but then failed at some bluetooth directory with colons in the path.
So I used a different tool to extract it, which went successfully.
Then I ran extract -s mmssms.db which came with the same error.
I'm pretty sure there isn't some weird encryption since I opened it up with Notepad ++ and I could read bits and pieces of conversations.
Anything else to try?
This might be caused by an older sqlite3 version bundled with binaries. I have updated the binaries in the first message to a newer version, could you download it and try again, extract -s mmssms.db?
Different error this time:
Failed to extract messages: no such column: failure_cause
OperationalError('no such column: failure_cause',)
Warning: failed to remove temporary file...
FYI the first thing at the top of the file when I open in Notepad++ is SQLite format 3 and this is from an HTC device running Android 4.x does that help at all?
This is much better and now makes sense: android 4.0 usually has sqlite 3.7.x, previous binary build of this tool had sqlite 3.6.21, and that was the reason for the 'file is encrypted or is not a database' error.
Now it looks like mmssms.db format in Android 4.0 has changed a little bit. I will have a look on these changes and update the app accordingly. Hope it will not take too much time
abbot2 said:
This is much better and now makes sense: android 4.0 usually has sqlite 3.7.x, previous binary build of this tool had sqlite 3.6.21, and that was the reason for the 'file is encrypted or is not a database' error.
Now it looks like mmssms.db format in Android 4.0 has changed a little bit. I will have a look on these changes and update the app accordingly. Hope it will not take too much time
Click to expand...
Click to collapse
That would be awesome, perhaps keep the old version available for other folks too though
If you can get this working I'll be sure to send a couple bucks your way. Thanks!
I have updated the extractor again, did some limited testing with android 4.0.3 on the emulator - seems to work. This database has a number of fields removed on android 4 compared to android 2, however everything required for xml dump is still there - just had to remove some unused stuff. Download the new version and try again.
Regarding the older versions, no reason to keep them - new one works fine with old database formats.
Awesome works perfectly! Send me a PM where to donate.
Sent from my GT-I9000 using xda premium
Thanks! It really works perfectly. Any plans to include MMS?
Sorry for the noobish question but I'm not familiar with Python.
Installed newest version of Python and also got the extracted mmssms.db and contacts2.db (used Nandriod Browser to extract them), which command lines do I need/what do I have to do? :s
€dit: Downloaded the zip from github and got as far as opening mmssms2xml.py which gives me an error when opening the mmssms.db
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1410, in __call__
return self.func(*args)
File "D:\Downloads\abbot-android-restore-tools-bc8584d\abbot-android-restore-t
ools-bc8584d\mmssms2xml.py", line 99, in open_file
self.messages = read_messages(filename)
File "D:\Downloads\abbot-android-restore-tools-bc8584d\abbot-android-restore-t
ools-bc8584d\mmssms2xml.py", line 33, in read_messages
c.execute("SELECT _id, thread_id, address, person, date, protocol, read, pri
ority, status, type, callback_number, reply_path_present, subject, body, service
_center, failure_cause, locked, error_code, stack_type, seen, sort_index FROM sm
s ORDER BY date DESC")
OperationalError: no such column: priority
Click to expand...
Click to collapse
€dit2: No problems with contacts2.db?!
€dit3: Well..this should be the last, found this explanation of rani2001 over here (http://forum.xda-developers.com/showpost.php?p=25173166&postcount=7). That did it for me!
Dude you just made my day
Can you please compile a new windows version with the latest files from github?
Or give us a manual how to use the .py files.
I think this will help many of us.
Thank you very much.
BTW: Your tool worked perfectly with my mmssms.db but failed with contacts2.db. Maybe the new files requested above will help me.
Got all my sms back thanks to you.
Amazing script, Thanks for sharing and explaining and updating.
60% There
I was just wondering if there was anything special I had to do to merge my old SMS list and the ones from the new list. I didn't see an option there for it and I don't want to just paste it in there and load it. Many thanks ahead of time
Hi I want to extract the data.yaffs2.img from my HTC Desire nandroid backup but get the error message:
> extract.exe -s data.yaffs2.img
Failed to extract messages: file is encrypted or is not a database
Any ideas?
I tried this tool yesterday evening and I'm truly grateful for your work!
I was ready to spend the whole night to work with these damn tables when I found your work. Many thanks! :highfive:
Where is the file stored after i run it? This is what I got.
Code:
C:\Users\Damastah>C:\Users\Damastah\Downloads\yaffs-mmssmsdb-calls-extractor\ext
ract.exe -s D:\S3_recovery\mmssms.db
Read 1782 messages
Save as (empty=sms-20130330111807.xml): y

[Q] How to extract SMS from ROM backups?

Hi all,
well, the heading says it all - I need to extract the text messages stored in my several ROM backups and maybe integrate them with my current ROM if possible. The backups were done with 4EXTrecovery
So far I found the info that these text messages are stored in /data/data/com.android.providers.telephony/databases/mmssms.db - but how do I get to those inside the backups? Anyone here know a way to combine several of these files into one?
Any help greatly appreciated
i'm interresting too wait for any anwsers !
This question has been asked and answered many times, you can do a search to find many possible solutions.
If you have root and are comfortable playing around with the files, the file you listed is a simple sqlite database. You can extract it and merge it on a PC using an sqlite manager application. (Be sure not to duplicate any repeated messages!) Copy the merged file back to /data/data/com.android.providers.telephony/databases/ and you're done!
superatrain said:
This question has been asked and answered many times, you can do a search to find many possible solutions.
If you have root and are comfortable playing around with the files, the file you listed is a simple sqlite database. You can extract it and merge it on a PC using an sqlite manager application. (Be sure not to duplicate any repeated messages!) Copy the merged file back to /data/data/com.android.providers.telephony/databases/ and you're done!
Click to expand...
Click to collapse
I'm glad I found this reply, but I got stuck at the stage where sqlitemanager asks me for a password as the data.yaffs2.img file is encrypted. My backup was performed using CWM backup and I figured that I'll find the "com.android.providers.telephony/databases/" under there but as I already said, I can't open the data.yaffs2.img to access "com.android.providers.telephony/databases/".
Please help
I too was wondering the same thing, that's awesome! I will give it a try...
Sent from my Galaxy Nexus using xda premium

Categories

Resources