2

I read this great answer about how sets work, but I'm seeing behavior I don't understand in this app.

I just installed on a device that has never had the app installed (I think, see bottom) and nothing was restored. Through adb, I tried the command bmgr restore <package_name> and it said "unable to restore".

So then I did bmgr list sets and saw that there was only one set available (from a different device). I thought, "well that's got to be the one it's trying to use and failing." But then I ran bmgr restore <set token> <package_name> and restore worked! And now restore works without the token name either.

If there was only one set to use, why didn't it restore properly? Was there another hidden set? It's possible the app was installed before, but I called bmgr wipe <package_name> and toggled bmgr enable true/false to clear any pre-existing data.

NSouth
  • 121
  • 1
  • 2

1 Answers1

1

bmgr restore package doesn't reinstall an app: it sends a signal to the installed app to make it restore its data from backup. If the app isn't installed, you get the error message you saw.

It's the Play Store app that's responsible for installing other apps. If you like, you can think of the list of installed apps as Play Store's backup data, and it restores from that backup by installing all the apps in the list. This takes some time and happens silently in the background, since the backup mechanism is designed to be invisible to the user.

It's possible that Play Store managed to install your target app in between your first and last bmgr restore commands, or that toggling bmgr enable triggered it to reinstall the app at that point.

Dan Hulme
  • 35,070
  • 17
  • 92
  • 158