-
-
Save isDipesh/5374061 to your computer and use it in GitHub Desktop.
Android SMS backup/restore w/ adb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Backup: | |
adb remount | |
adb pull /data/data/com.android.providers.telephony/databases/mmssms.db mmssms.db | |
#Restore: | |
adb remount | |
adb push mmssms.db /data/data/com.android.providers.telephony/databases/mmssms.db |
This works fine for sms and text in mms but it doesn't seem to backup photos/pictures sent via mms.
I'd really appreciate instructions on how to also backup photos & pictures from mms.
Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I hope you perceive my comment as on topic.
I want to rely solely on local backups and no cloud backups, and not achieve this with custom recoveries (physical security loophole) such as CWM, etc.
I noticed that on stock Android 4.3
adb backup -apk -all -system -f /path/to/my/backup.ab
is all but complete! All 3rd party apps are properly backed up and restored, but sms, call log and contacts, practically all basic phone features, are NOT backed up!Then I tried CyanogenMod and set Settings > Developer options > Root Access (duplicate entry also under: Settings > System > Superuser > Settings > Superuser Access) to "Apps and ADB".
Then tried your command line, which failed with:
failed to copy '/data/data/com.android.providers.telephony/databases/mmssms.db' to '/my/path': Permission denied
Obviously "Root access to ADB" means something else (what???) but not "Run ADB as Root".
To run the adb deamon on the Android device as root can be achieved by adb insecure.
Then I could pull and push properly! After the push, the sms app still showed the for test purposes intentionally emptied state, but after a restart (of the app or the whole system), it showed the proper restored state.