Torsten Grote
7d4fd105bf
Fix finishing RequireProvisioningActivity when provisioning is aborted
...
On Android 11 this worked fine, but on Android 12 onStart() happens before activity results get delivered. We finish the activity when receiving a cancelled result. However, when onStart() gets called before we know the result, we relaunch an activity required for provisioning again instead of finishing.
2022-01-04 21:46:42 +05:30
Torsten Grote
a717ebaf9c
Merge pull request #323 from chirayudesai/12
...
Android 12 - 12-3.0 - new backup format!
2021-12-15 16:10:43 -03:00
Torsten Grote
46da90b100
Merge pull request #343 from mikeNG/system-ext-move
...
Move Seedvault to /system_ext partition
2021-12-15 16:09:40 -03:00
Torsten Grote
27b45875d7
Merge pull request #341 from grote/dav-x5
...
Allow DAVx5 DocumentsProvider by default
2021-12-15 16:09:18 -03:00
Michael Bestas
dfec39ee05
Move Seedvault to /system_ext partition
...
Change-Id: I5a1d33dec45ade9a30925b471652878bfa39404f
2021-11-24 20:18:35 +02:00
Torsten Grote
0746af4304
Allow DAVx5 DocumentsProvider by default
2021-11-12 14:34:00 -03:00
Chirayu Desai
e972956929
Android 12 - 12-3.0
...
* Bump version following versioning scheme
* 3.0 now following new backup format
* Add initial entry to changelog
Change-Id: Ifca1b3feac0f510890450a1999b42897894d58ee
2021-10-13 18:06:30 +05:30
Torsten Grote
b0c6eeb9f7
Clean up stuck notifications when service gets killed
2021-10-13 17:16:16 +05:30
Torsten Grote
c7880b8a8b
Don't crash when no store app is installed
2021-10-13 16:25:41 +05:30
Torsten Grote
c5a295d31c
Allow storage backups to launch foreground service from background
2021-10-13 16:25:41 +05:30
Torsten Grote
b184f208c4
Show storage backup notification immediately
2021-10-13 16:25:41 +05:30
Torsten Grote
97398f1c5c
Build build storage backup lib within AOSP
...
This removes the AAR binary from the repo as it isn't needed anymore. Also room schema migrations will need to be one manually in the future as schema export doesn't seem to work in AOSP.
2021-10-13 16:25:41 +05:30
Torsten Grote
5662409ef5
Fix icon colors
2021-10-13 16:25:41 +05:30
Torsten Grote
75d4c7d05c
Don't use setUnlockedDeviceRequired() on the backup key
...
as importing it with Android 12 GSI fails. This key is only used to restore old backups anyway and the new one doesn't use this restriction.
2021-10-13 16:25:41 +05:30
Torsten Grote
579919d5e7
Code style and lint after Android 12 version bumps
2021-10-13 16:25:41 +05:30
Torsten Grote
e80d89f0a2
Use our transport flags when creating RestoreSets
...
This hopefully prevents apps skipping restore that require end-to-end encrypted backup transports.
3762670bb7
2021-10-13 16:25:41 +05:30
Torsten Grote
7f4b565d2a
First version bumps for Android 12
2021-10-13 16:25:41 +05:30
Torsten Grote
b029b0b029
Improve behavior of @pm@ backups when we can't do backups
...
Before, we were faking a backup and just returned true, but remembering that next time, we need to do a fresh non-incremental @pm@ backup.
Now, we backup to local cache, but don't upload it. On next run, when we can do backups again, we will upload the updated cache. This simplifies things and reduces the special logic required.
2021-10-13 16:15:20 +05:30
Torsten Grote
36c35d6f98
Force backup initialization when we have no cached metadata
...
as it can happen after clearing app data
2021-10-13 16:15:20 +05:30
Torsten Grote
c59a006a00
Remove @pm@ optimization from BackupNotificationManager
...
as it shouldn't be needed anymore
2021-10-13 16:15:20 +05:30
Torsten Grote
b8b6882484
Don't try to clear data of NO_DATA system apps
...
This speeds up the backup quite a bit since there's many such apps
2021-10-13 16:15:20 +05:30
Torsten Grote
79777a7b6f
Close K/V DB after restoring records
...
also don't log stack trace when not finding backup type
2021-10-13 16:15:20 +05:30
Torsten Grote
ef5d1c3bc8
Port auto restore optimization from legacy v0 code to new v1 code
2021-10-13 16:15:20 +05:30
Torsten Grote
3c5e4120c7
Refactor Storage Plugin API
2021-10-13 16:15:20 +05:30
Torsten Grote
50066f0317
Let ApkBackup and ApkRestore use the new storage plugin API
2021-10-13 16:15:20 +05:30
Torsten Grote
183e34afd2
Remove legacy backup plugin code
2021-10-13 16:15:20 +05:30
Torsten Grote
1885021c1c
Move backup of APKs of opt-out apps to after uploading @pm@ DB
2021-10-13 16:15:20 +05:30
Torsten Grote
a0f3c6b45f
K/V restore using single file
2021-10-13 16:15:20 +05:30
Torsten Grote
0c915e5eb8
K/V backup using single file
...
Tests are still broken until restore has also been implemented with single file approach
2021-10-13 16:15:20 +05:30
Torsten Grote
23bb385190
Use new storage API for full restore
2021-10-13 16:15:20 +05:30
Torsten Grote
674568ca11
Use new storage API for full backups
2021-10-13 16:15:20 +05:30
Torsten Grote
4bdaaa0ce9
Make RestoreCoordinator use the new storage API with salt and backup type
...
This breaks restores until all the other required changed have been implemented.
2021-10-13 16:15:20 +05:30
Torsten Grote
75cf014e5d
Add crypto method to get salted names for package data and APKs
...
This will only hide installed apps from naive attackers as the APKs are still not encrypted and even then other attacks would be possible.
However, it allows us to simplify our storage plugin API.
2021-10-13 16:15:20 +05:30
Torsten Grote
793663acb5
Add salt and backup type to metadata
2021-10-13 16:15:20 +05:30
Torsten Grote
39cb0c6443
Factor getting secure random bytes into Crypto interface
2021-10-13 16:15:20 +05:30
Torsten Grote
a77d927624
Remove deprecated methods from BackupPlugin
2021-10-13 16:15:20 +05:30
Torsten Grote
db4103e752
Move code to get available backups from RestorePlugin to BackupPlugin
2021-10-13 16:15:20 +05:30
Torsten Grote
5d1e3debd1
Define new and simpler BackupPlugin API
...
leaving the old one in place still
2021-10-13 16:15:20 +05:30
Torsten Grote
2932af463c
Check version of backup files against expected version from metadata
...
and throw security exception if it does not match
2021-10-13 16:15:20 +05:30
Torsten Grote
5523e57fe7
Add current metadata to RestoreCoordinator state
...
so we know which backup version we need to expect during restore
2021-10-13 16:15:20 +05:30
Torsten Grote
bcb245531c
Refactor fetching of restorable backups
...
so that we don't go through the BackupManager API, but use RestoreCoordinator directly
2021-10-13 16:15:20 +05:30
Torsten Grote
aeafc80bb9
Clean up after moving all backup code to new v1 version
2021-10-13 16:15:20 +05:30
Torsten Grote
f4dc776ed3
Do full backups with new version 1 with new crypto
...
Restoring still supports version 0 with old crypto
2021-10-13 16:15:20 +05:30
Torsten Grote
0c3ea7679b
Do K/V backup with new version 1 with new crypto
...
Restoring still supports version 0 with old crypto
2021-10-13 16:15:20 +05:30
Torsten Grote
3ffb79b04f
Write metadata with new version 1
...
Reading still supports version 0
2021-10-13 16:15:20 +05:30
Torsten Grote
0f241f7d25
Ensure that we have the main key for v1 crypto
...
We ask the user to generate a new key, because actively asking for the old one is training bad security habits, but technically verifying the old key will also work.
2021-10-13 16:15:20 +05:30
Torsten Grote
7dceb98670
Add test for decrypting and reading version 0 metadata
2021-10-13 16:15:20 +05:30
Torsten Grote
b707d7f9d0
Add test for full and k/v restore of version 0 backups
2021-10-13 16:15:20 +05:30
Michael Bestas
1cae6dc60e
Bump version to 11-2.3
...
Change-Id: I792a1b1039f2ffcf23301334914b9c1fc75244ef
2021-10-05 01:34:35 +05:30
Michael Bestas
bfdf69c2f0
Switch all translations references to github.com/seedvault-app
...
Change-Id: I400b831c64ca72aa07940e323885595e864b2745
2021-10-05 01:34:35 +05:30