I'm trying to restore my SMS text messages from my rooted Nexus 5 with a broken screen (no display or touch capabilities) to my functioning but unrooted Nexus 5X.

I can turn the rooted phone to recovery mode and run any adb command (I managed to pull the mmssms.db file using adb), however, I naturally can't run adb push mmssms.db /data/data/com.android.providers.telephony/databases/mmssms.db to my unrooted phone.

Is there any way to restore the text messages some other way?

Again, I have full root access using adb to my rooted phone.


I managed to restore my text messages using a borrowed 3rd phone that is rooted!


  • The rooted phone with the broken screen that you want to restore from (Phone A)
  • The rooted phone with the intact screen that you borrowed (Phone B)
  • The unrooted phone that you want to restore to (Phone C)

Do as follows:

  1. On Phone A:

    • Activate recovery mode and pull the mmssms.db file using adb: adb pull /data/data/com.android.providers.telephony/databases/mmssms.db mmssms-phone-A.db
  2. On Phone B:

    • Activate recovery mode and do the same: adb pull /data/data/com.android.providers.telephony/databases/mmssms.db mmssms-phone-B.db (use this later to restore the borrowed phone's text messages. Note the different file name)
    • While still in recovery mode, push the file you pulled from Phone A to the Phone B: adb push mmssms-phone-A.db /data/data/com.android.providers.telephony/databases/mmssms.db
    • Change the file owner and permission of the mmssms.db file: adb shell then chown radio:radio /data/data/com.android.providers.telephony/databases/mmssms.db and chmod 0660 /data/data/com.android.providers.telephony/databases/mmssms.db
    • Restart to regular mode
    • Install any SMS backup app (I used SMS Backup & Restore but any app would do)
    • Run the app to backup the text messages
    • Copy the backup file to some cloud service that you trust or to your desktop/laptop
  3. On Phone C

    • Copy the backup file from the cloud service or desktop/laptop
    • Install the same SMS backups app and use its restore function

Don't forget to restore the original mmssms.db to the 3rd party phone!

  1. On Phone B

    • Restart the phone to recovery mode
    • Push the mmssms.db file you pulled from Phone B back to it: adb push mmssms-phone-B.db /data/data/com.android.providers.telephony/databases/mmssms.db
    • Change the file owner and permission of the mmssms.db file: adb shell then chown radio:radio /data/data/com.android.providers.telephony/databases/mmssms.db and chmod 0660 /data/data/com.android.providers.telephony/databases/mmssms.db
  2. Enjoy your restored text messages and return Phone B to the friend you borrowed it from ;)

| improve this answer | |

This is not possible, as you need root to access the /data folder (for unrooted Nexus 5X).

This question is similar: Can adb be used to recover SMS messages while in permanent “Safe Mode”?

| improve this answer | |
  • 2
    Who said anything about directly accessing the /data folder? It is a bold claim stating that "This is not possible". – Firelord Feb 9 '16 at 19:46
  • @Firelord Well, the SMS DB is in the /data folder. If he were to access / modify the files there, he'd need to have root access. Looking at the accepted answer, a rooted phone had to be used in the end. – geffchang Feb 12 '16 at 10:47
  • The third rooted phone was a mediator because the original rooted phone was busted. The second phone was never rooted. That's the point. – Firelord Feb 12 '16 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.