[HOWTO] extract and import sms from old NAND backup to your new device

matmutant

Senior Member
Mar 17, 2011
3,379
4,741
0
~/
andrux-and-me.blogspot.com
Long story short : I needed to get my sms from my old motoG and transfer them to my new motoG5. Here is how:​

This can be done without any third part app, only a capable recovery and adb is needed.
Get your old SMS
  1. take you Nand backup you hopefully did before your device died.
  2. find the mmssms.db file that you can find in :
  3. Code:
    data.f2fs.win000
    Use :
    Code:
    tar –xf data.f2fs.win000.tar.gz
    Android 6:
    Code:
    /data/data/com.android.providers.telephony/databases/
    Android 7:
    Code:
    /data/user_de/0/com.android.providers.telephony/databases/
  4. Copy mmssms.db to your computer.

Import your database to your new device
==> root is needed for that operation
  1. Push mmssms.db to your device (depending on you android version, see above)
    e.g.:
    Code:
    adb push ./mmssms.db /data/user_de/0/com.android.providers.telephony/databases/mmssms.db
  2. Delete any journal.db you may find in the same folder.
  3. Wipe cache and art-cache
  4. Reboot.
  5. Delete sms-mms application data
  6. Start the sms-mms app
  7. Voilà!


An alternative way that doesn't require root is available here. (thx to @Mirhawk)
also thx to @dlegit for the new directory.
 
  • Like
Reactions: tekwarfare

TheFixItMan

Senior Member
Jul 8, 2012
7,654
3,922
253
London
If you could convert the db file into xml format you should be able to use an app to restore without needing root

Edit
Just noticed you posted another guide which mentions that
 
Last edited:
  • Like
Reactions: matmutant