What does adb Backup exactly save

Hi there all,

i’ve seen that there is some alternatives to google android are coming, so i’ve take a look at backup possibilities to be prepared! :wink:

I’m looking essentially to backup some app config (K9-mail, Davx5 and Nextcloud), and the general setting of my phone.

I’ve done this with ADB (adb backup -apk -shared -all -f backup.ab), but i’m not really sure that this backuping exactly all that i want. On the jungle of the web i don’t find a simple answere to this question…

thanks.

1 Like

I can’t answer the question what is stored in the adb backup.

But if it is “just” the three apps plus general phone settings, you probably don’t need to do a backup at all.

Background: I often test different systems on a secondary device and have to set up the same things again and again and again. I have a list of things to do and that only has 18 entries (e.g. only 5 general phone settings where I don’t use the defaults).
That’s because all the real data is stored elsewhere and I only need to log in to my accounts after installing the respective app.
Yes, that is some work but probably still easier than finding out (the hard way) about the adb backup :wink:
And probably even faster than doing the actual adb backup.

1 Like

I don’t exactly know, what the adb-backup saves, but I know a backup this way is not the yellow from the egg as this article (unfurtunatelly only in german) says.
I would recommend to either manually backup your data (export contacts to a vcf-file, copy pictures etc. to a PC) or use a cloud solution.
It seems also possible that Google will remove the adb-backup feature in the future

3 Likes

My two cents:

  • adb backup is unreliable at the best of times. I’ve seen enough backups that seemed successful at the time but cannot be restored. At the worst of times it’ll not work. Reinstalling apps from backup is reported not to work on Android 9 and higher. Adb backup as a whole is deprecated, meaning this won’t be fixed.
  • it is difficult to verify or selectively extract data from an adb backup file, so if any part of your backup is not compatible with the new system you plan to install you will be unable to restore anything. It’s not possible to predict with certainty that the backup will be compatible.
  • copying general settings over from one operating system version to another may lead to unintended side effects and instability that will take more time to diagnose than it would have cost to configure from scratch.
2 Likes

At least for K9 there is an internal backup possibility for the settings, which works good. You only need to reenter the passwords.

3 Likes

Hi @frederiiiic,
I just did a reset and attempted restore using Google account and ADB restore. In short, it was very unsatisfactory. The main things to remember are that

  1. There is no perfect backup solution
  2. Many apps refuse to take part in Google’s backup or ADB backup methods

What I recommend is (note I’m not an expert, this is just benefit of my hindsight from last weekend!):

  • Go through every single app you have and see if it includes an option to backup, export, sync, or similar your data either locally or to the cloud somewhere you can retrieve it from
  • Make sure all the locally exported/backed up data is stored on your SD card
  • Copy all files in your internal storage to SD card
  • Copy all files in your internal storage AND SD card to a computer (if you have one available)
  • Use Google backup - you might as well, even if you won’t restore it immediately it gives you a snapshot
  • Install helium backup app - a bit of a pain to open, and not open source, but it does tell you clearly which apps refuse to allow backups - “not allowed”. You can get around this if you have root access, but if you have root access then I believe the best solution is Titanium backup
  • Install and use SMS Backup and Restore to backup your text messages - Google backup doesn’t backup MMS, only SMS. I’m sure there are other SMS/MMS backup apps too.
  • Use adb backup -all -apk -obb (no need to use -shared, because you’ve done that manually yourself, but you can do it anyway if you like)
  • Run adb shell pm list packages to list all apps installed on your phone. Many will be system apps and therefore can be ignored, but the full list will allow you to check later which apps have been missed from various Google and adb restore
  • WARNING - at this point I’ll suggest things that mean you might mess up your phone, so make sure you’re happy you have everything backed up before proceeding
  • Use adb restore to confirm that the backup you did worked!
  • If it didn’t restore properly, then do the adb backup step again.
  • If you still can’t get it to restore properly, (and even if you can, you can do this) use Android Backup Extractor to decompress the adb backup file so you can see what it’s backed up and see if you’re happy with that. I found that my backup was imcomplete and didn’t complete restore properly, but it would restore app data just not install the APKs for some reason
  • At this point I don’t think there’s much else you can do, time to reset!
  • If you are signing into your Google account (you said you weren’t, but if you are) then do this and ask to restore - this is your only chance, if you don’t do it now then you’ll not get another chance!
  • Run adb restore
  • Install all apps which have not been restored by Google and adb
  • Insert your SD card
  • Copy all the data your want to your internal storage
  • Go through each of the apps you manually backed up settings for and see if you want to restore the data from your manual backups, or if you’re happy with the state Google and adb left them in
  • Go through every app and see if it’s in the state you want it to be
  • If there’s anything not working or missing your data then ask the app support if they’ve got any suggestions, as I think this is pretty much the last resort.

After all that, I hope it’s worked as you hoped!

Cheers :slightly_smiling_face:

3 Likes

Just as a reference, here’s what you could do with an unlocked bootloader (a procedure needing some sensible thought about security implications beforehand, and which forces a factory reset, and which Apps relying on Google SafetyNet compliance like e.g. many banking Apps might not like afterwards):

Backup …

Restore …

  • Boot TWRP.
  • Use TWRP’s Restore feature to restore your backup.
  • Copy Internal Storage back to the phone via USB (you can do that when TWRP is booted)… and/or boot Android and sync your stuff back using something like MyPhoneExplorer.
3 Likes

thanks a lot for all your full answers, i’m seeing it more clearly now! And sure this will be usefull for more than me!

I’ve finally made it simple to be prepared, made some app backup for Silence (SMS), K9-Mail and a list of app via F-Droid and manually (i don’t get a lot of them). All the orther important things sync with my cloud.

following your advises, i’ve decided to made it soft for the moment, and waiting to get a way to be rooted to try other solutions. Some automated, with cloud syncing will just be perfect to me!

nobody is speaking about OandBackup, this need root too, but look like it can be automated and select every app you’ll need. I think it’s a good solution in combo with a Folder syncing. Anyway i’ve seen a lot of people using Titanium so i’ll try it too. what you think?

edit : @madbilly i will still not use google tool, speciallly for backup, for sure there is too many informations i don’t want google to have access to! But your complete post i full of tested advises!

3 Likes

Hi @AnotherElk yes it’s a lot simpler with an unlocked bootloader!

And @frederiiiic yes it’s also a lot easier with root access.

The problem is that if, like me, you’ve already got your phone set up, lots of apps each with their own data and settings etc, then getting an unlocked bootloader or root normally requires a reset, which we don’t want to do before we’ve done a backup…

I think next time I get a new phone I will try and unlock the bootloader straight away, then I can do one of these simpler backup methods whenever I want. Until then I’ve got to continue with the convoluted method when/if I next reset.

Cheers :slightly_smiling_face:

2 Likes

Just keep this in mind …

1 Like

Yes I think that somewhere on their website Google say that ADB backup is deprecated and may not work at some point in the future.

Yet another way to lockdown Android :wink:

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

I know this is a rather old topic but I had used Seedvault on a test device/OS and according to their website uses the same internal API that adb backup uses. And Seedvault seems to work rather well. IIRC correctly it also backups system settings, so I wonder if that is included in an adb backup, too.

2 Likes

See