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
Chirayu Desai
38f01765ec
Allow launching restore through a dialer code
...
* We don't show Restore in menu by default since it's
not the best idea to restore a running system
* However, at the same time, it's good to have a way to do
that for those who'd like to restore anyway, and the only
current way is adb, which is not ideal
* Dialing "*#*#RESTORE#*#*" will launch the restore activity
Change-Id: I258fead82f7e916a4de0b314e1840d7aa4b3746c
2021-09-29 18:57:14 +05:30
Torsten Grote
a5a3a85c6c
Add expert settings with an option for unlimited quota
...
Change-Id: Iebaea41ce4e69912f7cb723bd92e94e4396aa657
2021-09-28 22:02:04 +05:30
Torsten Grote
d2a748c34a
Prevent screenshots of recovery code
...
This is may be inconvenient for some people, but it is way more secure as screenshots can be accessed by malicious apps that look our for BIP39 codes. Better to store the code on paper.
2021-09-24 02:55:56 +05:30
Torsten Grote
6e838978e3
Ask for system authentication before storing a new recovery code
...
This will help to prevent data extraction via seedvault when somebody gets hold of an unlocked phone. However, it will not help against someone able to force you to provide fingerprints or other device secrets.
2021-09-24 02:55:56 +05:30
Torsten Grote
e0f728205d
Split up validating, verifying and storing of recovery code
2021-09-24 02:55:56 +05:30
Michael Bestas
26516d72a2
Disable Nextcloud restore when not installed and no store available
...
Attempting to install Nextcloud in SetupWizard on a device
that has no app store installed results in a crash.
Disable the option and use an appropriate summary.
Change-Id: Ie3dff8d85ed68b27858fa37b3efb97eb345fa372
2021-09-24 02:53:10 +05:30
Luca Stefani
bc24c7804d
Don't backup on metered networks
...
* We better not overuse metered networks as such connections
* are usually sensitive to heavy data usage due to monetary costs and/or data limitations.
2021-08-25 14:59:49 +02:00
Torsten Grote
05640ebb63
Replace novacrypt BIP39 library with the zcash one
...
which is MIT licensed instead of GPLv3
Change-Id: I30041de5ab1c1f8c7d5f57d6c60e28300a285259
2021-07-05 23:50:18 +05:30
Torsten Grote
d13b9ea3fd
Always run storage backups in a foreground service
...
otherwise we get killed for using too much CPU
2021-07-05 20:08:29 +05:30
Torsten Grote
a4cbb0b6df
Only request app backup when it is actually enabled
2021-07-05 20:08:29 +05:30
Torsten Grote
1ff8e54748
Re-initialize backup location when changing recovery code
...
* delete all storage backups for current user
* clears the storage backup cache
* start a new app data restore set and initializes it
The reason is that old backups won't be readable anymore with the new key. We also can't delete other backups safely as we did before, because we can't be sure that they don't belong to a different device or user.
2021-07-05 20:08:29 +05:30
Torsten Grote
347d2a316f
Allow using the same storage location on different devices or user profiles
...
Previously, we would put our files directly in the root of the storage location and delete any existing backups there. When used by different devices or user profiles, these would keep deleting each other's backups.
2021-07-05 20:08:29 +05:30
Torsten Grote
342bd2068a
Clear existing storage snapshots from storage medium
...
because that scenario isn't supported at the moment
2021-07-05 20:08:29 +05:30
Torsten Grote
e21207de32
Only require network for storage backups when storage needs network
2021-07-05 20:08:29 +05:30
Torsten Grote
d6bd36ad8b
Backup now: run storage backup before app backup
2021-07-05 20:08:29 +05:30
Torsten Grote
9ca6cf2aae
Allow to skip app restore to reach file restore
2021-07-05 20:08:29 +05:30
Torsten Grote
bdefb04a0d
Add UI for restoring files after app restore
2021-07-05 20:08:29 +05:30
Torsten Grote
fa123f07a0
Improve finding restore sets
...
now that we store more things in the same folder
2021-07-05 20:08:29 +05:30
Torsten Grote
5b2b75047e
handle storage backup when USB is used as target
2021-07-05 20:08:29 +05:30
Torsten Grote
6c633b70c3
Add storage library (and demo app)
...
and use for periodic files backup
2021-07-05 20:08:29 +05:30
Torsten Grote
1cd3a3a0e6
Fix log message when canceling full backup
2021-07-05 20:08:29 +05:30
Michael Bestas
d53f0fcde2
Switch all text references to github.com/seedvault-app
2021-04-20 03:59:01 +05:30
Torsten Grote
43dbcdfa79
Merge branch 'master' into main-key
2021-02-17 08:19:54 -03:00
Torsten Grote
68543dcb91
Store main key also when verifying recovery code
...
in case it wasn't stored before
2021-02-15 12:16:27 -03:00
Torsten Grote
851407037e
Store main key for key derivations from 512-bit BIP39 recovery code
...
This main key will be used later to derive sub-keys for other crypto operations.
2021-02-15 12:16:27 -03:00
Torsten Grote
2cd2f73241
Use a TestApp for UnitTests so we can use different modules for injection
2021-02-15 12:16:27 -03:00
Torsten Grote
fcd8afe072
Don't crash when storage app gets uninstalled
2021-02-09 15:37:05 -03:00
Torsten Grote
f758bb3110
Delete all backups (if possible) when user generates a new recovery code
2021-01-20 03:44:01 +05:30
Torsten Grote
ca2a56f023
Allow user to generate new recovery code
2021-01-20 03:44:01 +05:30
Torsten Grote
9dc29e4b0a
Allow user to verify existing recovery code
2021-01-20 03:44:01 +05:30