Adb restore does nothing

Good day!
I used my FP4 for a couple of weeks now without issue. It was rooted using Magisk which also worked fine untile the last update to A.099 after which Wifi stopped working, it didn’t want to activate for some reason.
So I made a backup using
adb backup -apk -shared -all -nosystem -f backup.ab
and uninstalled Magisk. After that I got stuck in a boot loop. Switching the active slot and flashing the factory image A.064 brought me back to where I came from.
Up to this point everything is working again as I expected, however, I seem to be unable to restore the backup. After just doing
adb restore backup.ab
a bunch of messages show up in logcat which say things like
02-06 22:32:49.321 1222 8921 I BackupManagerService: Package com.mgoogle.android.gms not installed; requiring apk in dataset 02-06 22:32:49.321 1222 8921 D BackupManagerService: APK file; installing 02-06 22:32:49.321 1222 8921 D BackupManagerService: Installing from backup: com.mgoogle.android.gms
which looks okay to me. It also claims to copy my data, images etc…
But afterwards the entire system is completely unchanged. My question is: Did I do somthing wrong? Is this supposed to work? Or is it somehow deprecated?
Thanks,
Philipp

In my opinion because of the encrypted partition

In theory, perhaps. In practice it doesn’t work too well if you want to believe the internet (and my personal experience).

ADB backup is officially deprecated for a long time now.
If the adb command you use is halfway recent it should have displayed a message accordingly.

https://www.xda-developers.com/adb-backup-and-restore-depreciated/

It’s no way forward anyhow …

2 Likes

Thank you for your response!
Doesn’t look to promising indeed. However, it still is quite bizarre to be honest. I installed the latest version of adb and it also just runs without any complaint. It takes about 20 minutes to do the alleged “restore” and it shows a bunch of messages in the log, saying that it’s reinstalling apps and copying data. I mean, I can get my data to the phone by just pushing it, but I don’t know how to properly restore the apps and their data. And why would adb not complain? There should be some message telling me that the restore can’t be performed or adb could at least crash in some way, but it actually pretends to do something? That’s so odd.
Anyway, thanks for your help, I guess I have to set everything up manually.

adb is a developer tool first and foremost. It will happily perform a lot of potentially dangerous or even useless operations, because it expects you to know the outcome beforehand.

As @AnotherElk mentioned adb backup has been broken for quite some. I can’t even remember when it last worked without problems, might be almost a decade at this point.
Anyone who suggest you use adb backup for anything hasn’t dealt with modern Android before.

Sadly that’s the way to go these days… :roll_eyes:
If you trust Google you can enable Google Cloud Backup on both devices, that will get you most apps, there’s also Seedvault, if you jump from one Lineage based OS to another.

3 Likes

Just curious… Where did you get this image?

I believe they are talking about a factory boot image.
That’s available on the kernel page.

If not, I would be really interested as well :smiley:

1 Like

Yes, the boot image :smiley:
In the meantime I got my phone set up again, so there is nothing for me to complain about anymore.
However, I’m still very confused. The restore ran for 20 minutes and pretended to copy data and install apps, that’s really weird to me :smiley:

1 Like

IMHO it could actually have copied something, but to an older place that was used in previous versions of Android and is outdated now… It happens often with Android, for example I had trouble restoring my SMSMMS database. Searching for a solution (never found one) I read this (long) article in french that in (addition to some SMS database technical explanations) describe the difficulty for an app developer to maintain his app:

C’est quelque chose que je déteste profondément chez Google : ils n’arrêtent pas de changer d’avis sur tout (au moins sur les questions techniques). Sans arrêt. Ils prennent des décisions, et en changent, et encore, et encore, et encore. Android est notamment victime de cette Google-girouette : quand j’avais programmé une petite application merdique pour Android, j’avais suivi la documentation et les consignes contenue dedans ; à la version suivante, tout étant différent, la manière dont j’avais fait les choses était devenue obsolète : j’ai commencé mollement à me renseigner sur comment mettre à jour mon application, mais à la version suivante d’Android, tout avait de nouveau complètement changé ; et ainsi de suite.

1 Like

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