Commit graph

1197 commits

Author SHA1 Message Date
Steve Soltys
8234cd8196
Add contactsbackup permissions to test emulator 2024-10-17 13:51:29 -03:00
Steve Soltys
315e0736f5
Fix KVRestore spies to use new functions 2024-10-17 13:51:29 -03:00
Steve Soltys
42d7747641
Add logging for unknown exceptions 2024-10-17 13:51:29 -03:00
Steve Soltys
4aeb05813d
Run tests in Cirrus CI again 2024-10-17 13:51:26 -03:00
Torsten Grote
3fd615477d
Merge pull request #776 from theimpulson/menu
Switch to toolbar APIs for working with menu
2024-10-17 13:41:18 -03:00
Torsten Grote
1299008780
Merge pull request #781 from grote/exclude-us
Exclude ourselves from backup status
2024-10-16 12:51:04 -03:00
Aayush Gupta
d86ecd303d storage: demo: Adjust for edge to edge support
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-10-16 20:31:47 +05:30
Aayush Gupta
bfdb297ca4 storage: demo: Inherit M3 theme
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-10-16 20:31:47 +05:30
Aayush Gupta
2b5ca5ebdc {app|storage}: Drop theme attribute from toolbar
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-10-16 20:31:47 +05:30
Aayush Gupta
82267f6844 app: Switch to toolbar APIs for working with menu
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-10-16 20:31:46 +05:30
Aayush Gupta
a5fe52a01f storage: demo: Switch to toolbar APIs for working with menu
Activity methods have been deprecated

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-10-16 20:21:40 +05:30
Torsten Grote
321c04958c
Exclude ourselves from backup status 2024-10-16 08:54:41 -03:00
Torsten Grote
f5c2f0bd3a Release version 15-5.0 2024-10-16 00:47:54 +05:30
Torsten Grote
45e7d23bbe
Merge pull request #777 from grote/readme-update
Update README and add funding to About screen
2024-10-14 15:22:26 -03:00
Torsten Grote
001c5f1a17
Update About with NGI0 Entrust Fund 2024-10-14 10:09:36 -03:00
Torsten Grote
7158a9b070
Update README 2024-10-14 10:01:38 -03:00
Torsten Grote
a4ff8946dd
Merge pull request #775 from theimpulson/deprecation
UsbIntentReceiver: Specify parcel's type in method as well
2024-10-14 09:22:18 -03:00
Aayush Gupta
f21e0f8d39 UsbIntentReceiver: Specify parcel's type in method as well
The current method has been deprecated

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-10-13 12:34:37 +05:30
Torsten Grote
5365ef3a5e
Merge pull request #750 from grote/app-backup-v2
App backup format v2 with compression and deduplication
2024-10-10 17:29:58 -03:00
Torsten Grote
2d47aa3d9f
don't crash in BackupMonitor when there is no packageName
this can happens when it tells us that restore has finished overall
2024-10-10 13:42:24 -03:00
Torsten Grote
16c00be124
remove corrupted snapshots when pruning
before a corrupted snapshot would DoS pruning
2024-10-10 13:42:24 -03:00
Torsten Grote
9339f9f0fb
when cached snapshot is corrupted fall back to loading from backend 2024-10-10 13:42:24 -03:00
Torsten Grote
14775b5c3e
Check that exceptions from file loading get caught
a sha256sum mismatch for example can happen, so the exception should get caught e.g. in RestoreCoordinatorState and should not necessarily be fatal
2024-10-10 13:42:23 -03:00
Torsten Grote
9422d0d309
Encode icons in PNG, because JPEG doesn't support transparency
This caused black squares around icons.
2024-10-10 13:42:23 -03:00
Torsten Grote
682afa1c69
Try to recover data for force stopped apps from latest snapshot
The system doesn't allow us to backup forced stopped apps, but if we had data for them once, we can at least carry it along.
2024-10-10 13:42:23 -03:00
Torsten Grote
c09ea7c075
Use BackupManagerMonitor to handle K/V with no data changed
The fake package manager package is essential for the backup, but when its data doesn't change and we request a normal incremental backup, it doesn't get included, because our transport doesn't even get called for it. Only the BackupMonitor gets a hint that it had no (new?) data via LOG_EVENT_ID_NO_DATA_TO_SEND.
This behavior started with Android 15 that fixed a bug that caused @pm@ to always backup. However, other K/V apps were probably affected before.
2024-10-10 13:42:23 -03:00
Torsten Grote
f8451586df
Minor improvements for app restore
* activity now can be launched from notification
* better logging
* app data restore continues even after activity died
2024-10-10 13:42:23 -03:00
Torsten Grote
11270ff694
Reset latest snapshot to avoid it getting stale
When switching to new storage that doesn't yet have any snapshots, we would otherwise keep the old latest snapshot around.
2024-10-10 13:42:22 -03:00
Torsten Grote
7696b88a5a
Improve RestoreSet display
when user is asked to choose a backup to restore
2024-10-10 13:42:22 -03:00
Torsten Grote
84dc13d267
Split up success and error notification
Now, we don't do partial backups anymore. A snapshot is only done at the end and no information can make it to the backup before. Hence the old error notification with number of apps backed up didn't make sense anymore.
2024-10-10 13:42:22 -03:00
Torsten Grote
b7b07d0ba1
Fix recovery code keyboard input for Android 15
We need to account for IME insets when applying padding to the window.
2024-10-10 13:42:22 -03:00
Torsten Grote
f7354a3d79
Show when launchable system apps do not allow backup
Even though we use d2d, backup is only forced for user apps.
2024-10-10 13:42:22 -03:00
Torsten Grote
751504c214
improve local metadata handling 2024-10-10 13:42:21 -03:00
Torsten Grote
eea65d4082
do scheduling migration before strict mode
otherwise all LoggingFactory ClassLoader lookups that cause disk reads are logged when koin initializes classes
2024-10-10 13:42:21 -03:00
Torsten Grote
b4c84272ff
Update UI state for some system apps if they have NO_DATA
Instead of showing 'Waiting to be backed up...'
2024-10-10 13:42:21 -03:00
Torsten Grote
8d949e2d64
Support adb shell bmgr backupnow
We don't get notified about the start nor the end of such a backup run, so we need hacks to do initialization and finalization.
2024-10-10 13:42:21 -03:00
Torsten Grote
e602bbe2ab
Adapt reuse backup screen after designer input 2024-10-10 13:42:21 -03:00
Torsten Grote
7b0e02c451
Clean up code after refactorings 2024-10-10 13:42:20 -03:00
Torsten Grote
5c75574f65
Use cached snapshots for auto-restore to save time
All snapshots we wrote out should be cached locally. Auto-restore is holding up app installs, so we should be as fast as possible.
2024-10-10 13:42:20 -03:00
Torsten Grote
1e5a4deedf
Clean up libraries, move to where they are included 2024-10-10 13:42:20 -03:00
Torsten Grote
1aa5c68d0a
Add RestoreV1IntegrationTest to ensure we can still restore v1 backup 2024-10-10 13:42:20 -03:00
Torsten Grote
83fd0ba5d1
Upgrade all the binary dependencies we include
Since this is for Android 15 and the new v2 format, this is a good time for upgrading, because we need to test the app extensively anyway.
2024-10-10 13:42:19 -03:00
Torsten Grote
03d2946c93
Remove setting for unlimited quota
we set a hard limit for 1 GiB per app for now, but leave code in to make it configurable in the future
2024-10-10 13:42:19 -03:00
Torsten Grote
176a703720
Offer option to recycle backup after restoring
The most common restore scenario is assumed to be moving from one device to another, like when the old one was lost or stolen. Most users probably don't continue to use the old device themselves still.
Since they just restored this backup on their phone, most data is already in this backup. Deduplication allows re-using that, so it doesn't need to be saved again.
2024-10-10 13:42:19 -03:00
Torsten Grote
20ea0b332d
Delete repo and exit process when key changes
There is no easy way to re-initialize all data based on the old key, so to prevent usage of the old key we need to exit our process. When the app is started again, only the new key will be used.
2024-10-10 13:42:19 -03:00
Torsten Grote
62991ed38b
Move app backup to expert settings 2024-10-10 13:42:19 -03:00
Torsten Grote
9de1d2472b
Remove D2D setting, it is now always on 2024-10-10 13:42:18 -03:00
Torsten Grote
fe8d458890
Always use SnapshotManager to load snapshots to benefit from cache 2024-10-10 13:42:18 -03:00
Torsten Grote
a1baa6f9d2
Implement pruning of old snapshots and unused blobs
This happens regularly after each successful backup.
2024-10-10 13:42:18 -03:00
Torsten Grote
307ccf57de
Move new classes to repo package
as they all relate to interacting with the backup repository
2024-10-08 19:38:15 -03:00