seedvault-app / seedvault

A backup application for the Android Open Source Project.
1.19k stars 73 forks source link

Allow choosing which apps will get restored #670

Closed grote closed 1 week ago

grote commented 1 month ago

This adds quite a bit of plumping around the restore process. E.g. we now separately store all the icons of apps we back up, as well as their names and system app status. Apps during restore are now also (mostly) sorted by name.

This then leads to a bit of changes in how we display backup status, e.g. check-boxes instead of switches, show system data instead of system apps and include launch-able system apps in list.

Testing

Closes #309, #624

t-m-w commented 3 weeks ago

with system app restore and without (while restoring some shown system apps and others not)

When restoring, I see a "System apps" toggle under "System data", but I do not see the ability to select or deselect individual system apps. What I'm looking for is e.g. Chromium, but I don't see it. Am I missing something?

Edit: I do see some, such as Phone and Music, mixed in with other user apps (that's the part I wasn't expecting, but it's fine). It turns out that Calculator, Chromium, Clock, and some others are "Waiting to back up..." for some reason. I do have D2D on, currently.

t-m-w commented 3 weeks ago

UX: As I scroll around the list of apps to restore, when I scroll down, including when I reach the bottom, there is no clear way to proceed with restoration, as the "Restore backup" button hides itself when you scroll down. I need to scroll up a bit to make the floating "Restore backup" button reappear, which is a bit unintuitive.

grote commented 3 weeks ago

When restoring, I see a "System apps" toggle under "System data", but I do not see the ability to select or deselect individual system apps. What I'm looking for is e.g. Chromium, but I don't see it. Am I missing something?

Edit: I do see some, such as Phone and Music, mixed in with other user apps (that's the part I wasn't expecting, but it's fine). It turns out that Calculator, Chromium, Clock, and some others are "Waiting to back up..." for some reason. I do have D2D on, currently.

We do show launchable system apps like regular apps now. Other non-userfacing system apps are behind that "System apps" toggle as an all or nothing.

UX: As I scroll around the list of apps to restore, when I scroll down, including when I reach the bottom, there is no clear way to proceed with restoration, as the "Restore backup" button hides itself when you scroll down. I need to scroll up a bit to make the floating "Restore backup" button reappear, which is a bit unintuitive.

Maybe @theimpulson knows a coordinator layout behavior that works better here. Because of the long app list and the need to go through all of it, I didn't want to steal precious screen space for that button and hence let it float above the list.

t-m-w commented 3 weeks ago

When trying to restore an older backup (from CalyxOS 5.7.1, Pixel 8a akita), I do not see app names or icons, only package names and generic icons. Waiting a while does not cause them to load.

grote commented 3 weeks ago

When trying to restore an older backup (from CalyxOS 5.7.1, Pixel 8a akita), I do not see app names or icons, only package names and generic icons.

Yes that is expected. Only the new code does store names and icons. As we don't control old installs and old backups, there's no way we can retroactively store those things. So restoring old backups will need to live without icons and app names.

Both do exist in the APKs, if available, but downloading all APKs before the user can select something is a bit much, so we didn't do it.

t-m-w commented 3 weeks ago

Okay, everything checks out to me except for one thing which isn't really a Seedvault problem / not related to this change. I left a bullet next to it.

grote commented 3 weeks ago

Thanks a lot for testing @t-m-w!

If you do an existing-install restore with ##RESTORE##, it's okay, except that it immediately fails for apps which have no APKs backed up, even if those apps were installed in the interim - so you tap to install, go back without doing anything, and the app moves to the bottom with a green checkmark. Unrelated issue I think, I believe I've seen it before.

Right, that's unrelated and one of the items of https://github.com/seedvault-app/seedvault/issues/671