I like the idea to create backup without any other tools and without require root - so "adb backup" seems to be the perfect solution.
But for some strange reason it creates just almost empty backups for some apps.
The command I use is:
adb backup -f ${APP}.ab -apk -share -nosystem ${APP}
Around 50% of my apps are suffered. I can't see any rule. Neither this are just payed apps, nor it depends whether they are from playstore or FDroid. What can be the reason for that?
I use that one on my ubuntu linux machine: Android Debug Bridge version 1.0.39 Version 1:8.1.0+r23-5ubuntu2 Installed as /usr/lib/android-sdk/platform-tools/adb
Tested different parameters - no change.
I created a script that create backup for each user app (so skip these in priv-app and system folders). Maybe that is useful for others. A complete backup is not very usefull, as there is no command to restore a selection out of the backup - all or nothing. The script has two issues:
- not all apps get backup
- there is need to unlock for each app (tip on phone to confirm)
To create a list I used that command:
adb shell pm list packages -f | grep -v priv-app | grep -v '/vendor' | grep -v '/system' | rev | cut -d = -f 1 | rev | sort
Edit:
Think I could find the reason. In each APK there is an AndroidManifest.xml file that can/must (?) have a setting: android:allowBackup
Whether to allow the application to participate in the backup and restore infrastructure. If this attribute is set to false, no backup or restore of the application will ever be performed, even by a full-system backup that would otherwise cause all application data to be saved via adb. The default value of this attribute is true.
Bummer! I think two ways to workaround that. Either change that on phone (which might be not possible or need root) or to manipulate that before installing it. It that will work I guess it has to repeat after each update.
Anyone has a solution? Are backups without root/google cloud possible?