Restore SMS messages from a rooted phone with a broken screen to an unrooted phone 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!

Using:


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:


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

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 &amp; 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

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!


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

Enjoy your restored text messages and return Phone B to the friend you borrowed it from ;)