X
    Categories: android

How to recover previous SMS/MMS on NexusOne backup archive

Make sure you had the backup archive downloaded to somewhere safe before doing anything with the phone’s
firmware.

There is one app inside the market that allow the full backup.
search for “Titanium Backup”.
But that may need “root” (can be either “SoftRoot” first).

Transfer the archive files from sdcards into your pc/laptop.
It would be something like “data.img”.

Then download the “extractor” from below :

http://code.google.com/p/unyaffs/downloads/list

It may need to recompile first.
would be something like ..

gcc -o unyaffs unyaffs.c 

or if you had svn client ..

svn checkout http://unyaffs.googlecode.com/svn/trunk/ unyaffs
cd unyaffs
gcc -o unyaffs unyaffs.c

then to extract the data.img is just

./unyaffs /home/namran/data/data.img

(path to file should reflect the path to file ..)

it shall then created the folder and extracting all the content inside that archive.

something like below :

namran@nb-namran:~/nexus-one-data$ ls -l
total 175368
drwxr-xr-x   2 namran namran      4096 2010-09-19 03:43 anr
drwxr-xr-x   2 namran namran      4096 2010-09-19 03:43 app
drwxr-xr-x   2 namran namran      4096 2010-09-19 03:43 app-private
drwxr-xr-x   5 namran namran      4096 2010-09-19 03:43 backup
drwxr-xr-x   2 namran namran     16384 2010-09-19 03:43 dalvik-cache
drwxr-xr-x 179 namran namran     12288 2010-09-19 03:43 data
-rw-r--r--   1 namran namran 179055360 2010-09-19 03:42 data.img
drwxr-xr-x   2 namran namran      4096 2010-09-19 03:43 dontpanic
drwxr-xr-x   3 namran namran      4096 2010-09-19 03:43 local
drwxr-xr-x   2 namran namran      4096 2010-09-19 03:43 lost+found
drwxr-xr-x   9 namran namran      4096 2010-09-19 03:43 misc
drwxr-xr-x   2 namran namran      4096 2010-09-19 03:43 property
drwxr-xr-x   8 namran namran      4096 2010-09-19 03:43 system
drwxr-xr-x   2 namran namran      4096 2010-09-19 03:43 tombstones

the SMS/MMS database reside somewhere under the following folders.
“/data/com.android.providers.telephony/databases/mmssms.db”

and all the attachment from MMS is stored under
“/data/com.android.providers.telephony/app_parts/”

namran@nb-namran:~/nexus-one-data/data/com.android.providers.telephony$ find .
.
./databases
./databases/telephony.db
./databases/mmssms.db
./shared_prefs
./shared_prefs/preferred-apn.xml
./lib
./app_parts
./app_parts/PART_1284111258517
./app_parts/PART_1284683678596
./app_parts/PART_1284683731880
./app_parts/PART_1284685457572
./app_parts/PART_1284685355626
./app_parts/PART_1281176217164
./app_parts/PART_1284689627986
./app_parts/PART_1284720974895
./app_parts/PART_1280655729505
./app_parts/PART_1284685390163
./app_parts/PART_1284111252801
./app_parts/PART_1280652806795
./app_parts/PART_1284685387300

and yes. it is a SQLLite DB i think.


to restore this SMS/MMS database to your phone.

Just re-transfer them to your phone

adb push ./data/com.android.providers.telephony/databases/mmssms.db /data/com.android.providers.telephony/databases/mmssms.db
adb shell 'chown radio.radio /data/com.android.providers.telephony/databases/mmssms.db'
adb shell 'chmod 775 /data/com.android.providers.telephony/databases/mmssms.db'

adb shell 'mkdir -p /data/com.android.providers.telephony/app_parts/'
adb push ./data/com.android.providers.telephony/app_parts/ /data/com.android.providers.telephony/app_parts/
adb shell 'chown radio.radio -R /data/com.android.providers.telephony/app_parts'
adb shell 'chmod 775 -R /data/com.android.providers.telephony/app_parts'

for WIFI setting and password :

adb push ./misc/wifi/wpa_supplicant.conf /data/misc/wifi/

if the “Messages” is having “force close ” problem.. after restoring backup database.
you may need to run “Fix Permission” once. and reboot the phone.

or possibly can be fixed with just the following

adb shell 'chmod 775 /data/com.providers.telephony/mmssms.db'
adb shell 'chmod 775 /data/com.providers.telephony/app_parts/*'

Namran Hussin: a soft spoken guy... with exceptional interest in computers and technology. I love to learn new thing and also love to break thing for the sake of learning.. but I do abide to the self-imposed limitation or certain thing such as social thing in life, thing can be done and thing that must be avoided at whatever cost such as drug,illegal tracking, smoke,illicit activity..etc.muahahaha let's share what we had in this short term of the life.! make it worth of the living.~

View Comments (2)

Leave a Comment