Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Initial support for backup of D2D-only apps #478

Closed
wants to merge 4 commits into from

Conversation

t-m-w
Copy link
Collaborator

@t-m-w t-m-w commented Nov 22, 2022

(It was proposed that a more minimal initial-support PR be opened, vs #473, to make it easier to test functionality on-device.)

Allow backup of apps that would otherwise only support device-to-device migration. This is an initial-support patch to help determine the viability of this approach.

Known issues / TODO:

  • System-scheduled backups will not handle D2D-only apps, unless accompanied by a framework change forcing OperationType.MIGRATION. Backups triggered by the connection of a USB device or by Seedvault's StorageBackupService (files) scheduling are not affected, so they will back up D2D-only apps as expected; otherwise, the user may need to perform a backup manually via Backup Now.
  • Apps with allowBackup="false" will appear in Backup Status under "Installed Apps" rather than "Apps that do not allow data backup", and their status will always be blank until they have been backed up. If they are not eligible for migration, it will never change.

Other notes:

  • The unit test for excluding the Storage Plugin provider from backups was discussed, deemed unnecessary, and removed.

Co-authored-by: Oliver Scott olivercscott@gmail.com
Change-Id: I5a23d68be66f7d8ed755f2bccb9570ab7be49356

@chirayudesai
Copy link
Member

My goal was to have this be enough to actually test this functionally on the device, and we could continue further refinements on the original PR

@chirayudesai
Copy link
Member

14597: [D2D] System-scheduled backups act as migrations | https://review.calyxos.org/c/CalyxOS/platform_frameworks_base/+/14597

@t-m-w
Copy link
Collaborator Author

t-m-w commented Nov 27, 2022

Adding my testing notes...

Apps for testing:

Verify:

  • Data gets backed up for OpenTasks (allowed by app), Safe Notes (disallowed by app, but migration allows)
  • Data does not get backed up/restored for Shopping List by SECUSO (excluded, allowed by app), Tor Browser (user-excluded, disallowed by app, and not migration-eligible), Bromite (user-excluded, disallowed by app, but migration-eligible), Peanut Encryption (disallowed by app, not migration-eligible).

Ways of triggering a backup:

  • Scheduled backup via adb shell bmgr run (K/V only?) / adb shell bmgr backupnow --all (all).
  • Manual backup via Backup Now.
  • Backup via plugging in USB.

Other things to look at:

  • Force Stop behavior
    • Does Force Stop of an app influence backup behavior? Does it still get backed up? It shouldn't, apparently.
  • UI: Backup status screen: Before test.
  • UI: Backup status screen: During test.
  • UI: Backup status screen: After test.
  • UI: Backup errors reported.
  • UI: Restoration errors reported.

@chirayudesai chirayudesai changed the title Initial support for backup of D2D-only apps [DO NOT MERGE] Initial support for backup of D2D-only apps Nov 28, 2022
chirayudesai added a commit to chirayudesai/backup that referenced this pull request Dec 29, 2022
* Bump version
  * 33030020 -> 13-3.2
  * 33030021 -> d2d test seedvault-app#478
  * 33030022 -> This, to go back to normal build after testing
* This is to allow going back to a build without D2D safely,
  because otherwise to uninstall the update to an app you
  have to wipe data.
* Also set the testing property to false

Change-Id: I1a9530102c851ac8ea05711b947ef7390e3a0dc8
chirayudesai added a commit to chirayudesai/backup that referenced this pull request Dec 30, 2022
* Bump version
  * 33030020 -> 13-3.2
  * 33030021 -> d2d test seedvault-app#478
  * 33030022 -> This, to go back to normal build after testing
* This is to allow going back to a build without D2D safely,
  because otherwise to uninstall the update to an app you
  have to wipe data.
* Also set the testing property to false

Change-Id: I1a9530102c851ac8ea05711b947ef7390e3a0dc8
chirayudesai and others added 4 commits December 30, 2022 05:32
* Spread out the version code a bit to allow for more
  releases per one name

Change-Id: I70b6ba92e359a1f229ee470f4032c04b9fd25e5b
Change-Id: Ieab13cb15b64e09798ec0c1081d3b3cd975e0811
Allow backup of apps that would otherwise only support device-to-device
migration. This is an initial-support patch to help determine the
viability of this approach.

Known issues / TODO:
* System-scheduled backups will not handle D2D-only apps, unless
  accompanied by a framework change forcing OperationType.MIGRATION.
  Backups triggered by the connection of a USB device or by Seedvault's
  StorageBackupService (files) scheduling are not affected, so they
  *will* back up D2D-only apps as expected; otherwise, the user may
  need to perform a backup manually via Backup Now.
* Apps with `allowBackup="false"` will appear in Backup Status under
  "Installed Apps" rather than "Apps that do not allow data backup",
  and their status will always be blank until they have been backed
  up. If they are not eligible for migration, it will never change.

Other notes:
* The unit test for excluding the Storage Plugin provider from backups
  was discussed, deemed unnecessary, and removed.

Co-authored-by: Oliver Scott <olivercscott@gmail.com>
Change-Id: I5a23d68be66f7d8ed755f2bccb9570ab7be49356
* Bump version
  * 33030020 -> 13-3.2
  * 33030021 -> This, d2d test seedvault-app#478
  * 33030022 -> Next, to go back to normal build after testing seedvault-app#489
* Set the testing property to true so that the system
  sends us the right app list
  14597: Optionally have System-scheduled backups act as migrations | https://review.calyxos.org/c/CalyxOS/platform_frameworks_base/+/14597

Change-Id: I278091b6659db095716e01b6c3894ce345219283
@nettnikl
Copy link
Contributor

nettnikl commented May 19, 2023

Hi @chirayudesai @t-m-w , could you update on the current status? What is the current status? Needs testing, needs review, needs to have some known bugs resolved, ...?

@chirayudesai
Copy link
Member

Hi @chirayudesai @t-m-w , could you update on the current status? What is the current status? Needs testing, needs review, needs to have some known bugs resolved, ...?

Hey. All 3 of those are currently on our list. For testing we have a plan to release it in a way that would make public testing easier, but that'll take some time to setup.

stevesoltys pushed a commit that referenced this pull request Nov 1, 2023
* Bump version
  * 33030020 -> 13-3.2
  * 33030021 -> This, d2d test #478
  * 33030022 -> Next, to go back to normal build after testing #489
* Set the testing property to true so that the system
  sends us the right app list
  14597: Optionally have System-scheduled backups act as migrations | https://review.calyxos.org/c/CalyxOS/platform_frameworks_base/+/14597

Change-Id: I278091b6659db095716e01b6c3894ce345219283
stevesoltys pushed a commit that referenced this pull request Nov 1, 2023
* Bump version
  * 33030020 -> 13-3.2
  * 33030021 -> This, d2d test #478
  * 33030022 -> Next, to go back to normal build after testing #489
* Set the testing property to true so that the system
  sends us the right app list
  14597: Optionally have System-scheduled backups act as migrations | https://review.calyxos.org/c/CalyxOS/platform_frameworks_base/+/14597

Change-Id: I278091b6659db095716e01b6c3894ce345219283
stevesoltys pushed a commit that referenced this pull request Nov 1, 2023
* Bump version
  * 33030020 -> 13-3.2
  * 33030021 -> This, d2d test #478
  * 33030022 -> Next, to go back to normal build after testing #489
* Set the testing property to true so that the system
  sends us the right app list
  14597: Optionally have System-scheduled backups act as migrations | https://review.calyxos.org/c/CalyxOS/platform_frameworks_base/+/14597

Change-Id: I278091b6659db095716e01b6c3894ce345219283
stevesoltys pushed a commit that referenced this pull request Nov 30, 2023
* Bump version
  * 33030020 -> 13-3.2
  * 33030021 -> This, d2d test #478
  * 33030022 -> Next, to go back to normal build after testing #489
* Set the testing property to true so that the system
  sends us the right app list
  14597: Optionally have System-scheduled backups act as migrations | https://review.calyxos.org/c/CalyxOS/platform_frameworks_base/+/14597

Change-Id: I278091b6659db095716e01b6c3894ce345219283
stevesoltys pushed a commit that referenced this pull request Jan 3, 2024
* Bump version
  * 33030020 -> 13-3.2
  * 33030021 -> This, d2d test #478
  * 33030022 -> Next, to go back to normal build after testing #489
* Set the testing property to true so that the system
  sends us the right app list
  14597: Optionally have System-scheduled backups act as migrations | https://review.calyxos.org/c/CalyxOS/platform_frameworks_base/+/14597

Change-Id: I278091b6659db095716e01b6c3894ce345219283
@stevesoltys
Copy link
Member

Resolved via #562.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants