Reputation: 659
I wanted to debug some SMS issues for a project, and wanted to see the SMS data in my phone. So first, I pulled out the data.
adb pull /data/data/com.android.providers.telephony/databases/mmssms.db ~/Downloads/mmssms.db
So I tried with the SQLite Database Browser 20.b1 on my Mac (OS X 10.6.8), but when I open the file I see nada. Then I tried sqlite3
, and I still see nothing but get a little reminder of how much an idiot I am.
mbp62:~ sillyusernamehere$ sqlite3 ~/Downloads/mmssms.db
SQLite version 3.6.12
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
Error: file is encrypted or is not a database
sqlite>
So is it possible to decrypt the database at all? Google-fu has not divined to me much info on the mechanism or how to do this off the phone.
Upvotes: 0
Views: 11186
Reputation: 55525
I wrote a tutorial on how to change your hostname in android for wifi networks. In this tutorial I explained how to use sqlite3.
I do not believe your "mmssms.db" should be encrypted. I've looked at other databases on my Android phone as well and they were not encrypted.
View here:
http://blog.burrowsapps.com/2011/09/android-change-hostname.html?q=hostname
file settings.db
sqlite3 settings.db
sqlite> .databases
sqlite> .tables
sqlite> .schema secure
sqlite> select * from secure where _id = "24";
sqlite> select * from secure where name = "android_id";
sqlite> select * from secure where value = "";
sqlite> update secure set value = 0 where _id = 24;
sqlite> .exit
How to View (more examples):
http://forum.xda-developers.com/archive/index.php/t-448361.html
http://forum.xda-developers.com/archive/index.php/t-1453840.html
Please let me know if this helps! Also, can you tell me your phone and other info to help generate a more robust answer.
Is it possible you corrupted the file?
Upvotes: 0
Reputation: 31
The database is not encrypted. You are using a database version unsupported by the SQLite Database Browser 20.b1 program.
Easy solution:
Download the SQLite dll file from http://www.sqlite.org/sqlite.html
Download the SQLite Administrator from http://sqliteadmin.orbmu2k.de/
Extract SQLite Administrator and replace the bundled sqlite3.dll with the latest version downloaded from sqlite.org
Run the SQLite Administrator program.
Open your android database.
Done.
--- Further Information --
The android database can opened using the sqlite windows binary, which is a shell program.
sample commands from windows cmd prompt:
c:> c:\sqlite3.exe c:\mmssms.db
sqlite> .tables
tables get listed out
sqlite> .mode column
sqlite> select * from sms
sms table gets listed out in column view
ctrl-c
program exits
refer to the sqlite documentation to get data dumps.
Upvotes: 3