Closed olifre closed 2 months ago
Note: Another side effect appears to be that Seedvault actually runs backups if it is configured but not the active transport. This is quite irritating.
In case an affected user ends up here, the following commands (in an adb shell
) worked around the issue for me:
pm disable-user --user 0 com.stevesoltys.seedvault
bmgr scheduling true
In case you want to switch back to Seedvault at some point, use:
pm enable com.stevesoltys.seedvault
why is there no in-app or system option to disable seedvault there is no reality where needing adb to disable an app should be required
I've noticed the same thing, which I started investigating when receiving phantom notifications, which turned out to be the Seedvault "Backup running" notification.
I have never started or configured Seedvault since installing Lineage.
The entry in the JobScheduler workdb shows it was added the same day I did the LineageOS update.
Another side effect appears to be that Seedvault actually runs backups if it is configured but not the active transport.
Does it run its own backup? If so, does it seem to work/succeed?
Does it run its own backup? If so, does it seem to work/succeed?
Yes, as far as I tested, it seemed to work — note that's only if it is configured and then another transport was chosen afterwards.
Full story:
I did not "fully" test, i.e. did not try to restore, but significant backup data was present.
@grote Thanks for the PR!
However, I believe that this is not a full "fix" for the common case described here — other backup transports usually do not touch framework scheduling nor expose a way to do so, so it might never be reactivated.
Test case (which would still leave the "normal" user in a problematic situation after this patch):
I simulated this by:
bmgr scheduling false
. dumpsys backup
still reports framework scheduling is disabled
. (this was on a system with the seedvault app disabled via pm disable-user --user 0 com.stevesoltys.seedvault
to ensure there is no interference to the test)
I am not sure what the best fix would be:
Good ideas welcome.
Yes, as far as I tested, it seemed to work
Thanks for the full story!
However, I believe that this is not a full "fix" for the common case described here — other backup transports usually do not touch framework scheduling nor expose a way to do so, so it might never be reactivated.
I am aware that this may be an issue. However, we suffer a lot from the undocumented backup API in AOSP. There are so many corner cases and surprising behavior. Being able to do our own scheduling was a great relive in one small area. Since Google introduced the ability to turn off framework scheduling in Android 14, I was imagining that they do this for their own proprietary backup transport. They usually don't put much thought into coexistence of different transports either and I don't think we even get notified that the user has chosen a different transport and we are no longer active which would be the moment to turn framework scheduling back on.
Long story short, in absence of better ideas, I prefer to leave it to other transports to set the framework scheduling to a state they need.
Document the issue and advice users to re-enable framework scheduling themselves if switching away from Seedvault to a transport which does not toggle framework scheduling. But it's questionable where to document this (as users which have issues with another transport will likely not check Seedvault's documentation).
Yeah it is tricky. We have a wiki, in case you'd want to put something there: https://github.com/seedvault-app/seedvault/wiki
@mikeNG potential issue for LineageOS to be aware about ^
Yeah it is tricky. We have a wiki, in case you'd want to put something there: https://github.com/seedvault-app/seedvault/wiki
Thanks, I fully agree with all the points you raised — I'll look into adding something to the wiki. While it is questionable whether users will look there, I think a short explanation e.g. in the FAQ may be helpful, even if only for linking from threads whete users ask about the problem.
What is your preferred way for Wiki contributions (since GitHub does not offer PRs for that as far as I am aware)?
I've added a patch file below, but of course I can also push the Wiki change into a fork and ping you to pull from there.
0001-FAQ-add-FAQ-entry-on-framework-scheduling-and-other-.patch.txt
One way to handle this would be the Settings app. We already patch it to offer backup transport selection, and it's also how you switch transports anyways - which is when you need to handle scheduling.
So, we could expand that patch to also tweak framework scheduling based on currently selected transport (mainly just enable it if disabled for any non-seedvault transport)
After a recent LineageOS update, I noted my scheduled backups using another transport (not Seedvault) stopped being scheduled. I found that framework scheduling was disabled — it seems this happens whenever I reboot my device, even if I activate scheduling manually again.
This is likely a consequence of: #628
It seems Seedvault is disabling framework scheduling even if it is not the active transport, breaking other backup transports which may rely on framework scheduling.