This fixes broken AGP Upgrade Assistant in Android Studio as well as detects
the version catalog files in Android view.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
* We should not bypass the OS-wide APK install restriction.
* Simply treat that as just not having the APK in the first place,
since we do support that as an option.
* This still lets users install apps via the store it was downloaded
from, if said store is installed and allowed to install apps.
* Introduce InstallRestriction to make testing easier.
Co-Authored-By: Torsten Grote <t@grobox.de>
Change-Id: Ic0a56961c9078d4dd542db5d9fc75034abb27bea
Nextcloud has a bug that lets us write chunked transfers over quota:
https://github.com/nextcloud/server/issues/7993
However, when we upload small files, we can get the proper 507 response and thus detect out of space situations and warn the user about them.
this is important, so we don't allow more than one backup running at the same time and not swapping out the storage while one is running.
Previously, we had some bare bones tracking, but nothing precise.
and allow changing them dynamically. So far plugins were injected into the dependency graph and couldn't be changed at runtime, only their config could. Now we have the infrastructure in place to really allow for more than one plugin.
This is especially useful for WebDAV storage where the user can supply whatever URL and before proceeding, we need to know whether that URL and the provided credentials are actually working.
We use the same root folder for app and files backup. App backup usually creates the root folder, but if only storage backup is used, it will be missing and needs to be created.
This can happen when the app process gets killed while its BackupAgent is running. There are several qcom apps in the wild that have this issue. These are DoSing our backups and are non-free, so we are defending ourselves against them.
Before, we showed the number of apps we requested the backup for which in case of non-d2d may be much lower than the number of installed apps.
In the future we may decide to also include certain system apps in that count.
For ApkBackup, we need to be initialized. If the system starts with app backup off, we would not initialize which would lead to issues when backing up the APKs.
to avoid a 2nd restore set being used.
This also changes the initialization behavior to only create the restore set folder and upload the metadata only when we actually need to. This way, double inits are not creating new restore sets on the backup destination.
Currently, after a manual run, we need to schedule the background backups again, because the scheduling gets lost. However, we need to be careful not to do that when the backup destination is on removable storage. Then we don't want to run.
Backup and restore is not possible when a backup is running. We used to check notifications for this, but now can use WorkManager's WorkInfo which should be more reliable.
Also, we used to prevent the "Backup now" action when app backup was disabled. But the user may want to do a storage backup. This is now possible.
When the user changes to USB storage, we need to cancel current schedulings, because the storage is not always available (maybe can use a trigger URI?). And if moving to a non-USB storage, we need to schedule backups again.
Unfortunately, there are two places in the code where we handle storage location changes. Ideally, those get unified at some point.
Previously, we backed up APKs of apps we could not back up (even if APK backup was disabled) so the user had a chance to get at least the apps back when restoring. Now, it is enough to record metadata about the app and the user will be able to manually install the app. The install apps step won't be skipped anymore.
and log worker ID as well as object, because we've seen two scheduled workers running at the same time, requesting a backup at the same time. This should not happen.
hopefully something rare, but it just happened to me while testing.
It seems it happens when there are many apps installed (>500) and the app list is open while a backup happens. Then, we keep reloading the list and hammer the package manager hard which it seems can't handle it. It does recover on its own though.
This is a preparation for doing APK backup ourselves in a worker and not hacked into the backup transport. The latter was prone to timeouts by the AOSP backup API. With a worker, we have a bit more control and can schedule backups ourselves.
If we request backup in several chunks, packages like 'pm@' or 'android' get backed up for each chunk, so due to incremental backups, we need to keep old data when comparing.
and cancel observer notification when backup is finished. This is because when the success channel is disabled by the user, the observer notification could stick around and would never get removed.
* 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
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
We emit the install result of APKs at least two times. When there is no APKs to install, because APK backup was disabled, we would start the restore of app data two times.
This fix waits until the emitted install result is considered finished, so we only start data restore once.
If an app being restored was originally installed with F-Droid Basic,
try to install it using F-Droid Basic again.
Change-Id: Ib067389ba20d74596892e24efd561ab2918d62cb
Restore app data in smaller batches when performing a full restoration
from a backup set, to prevent a Binder exception that causes the
process to fail entirely.
Android may encounter this exception when trying to call the
transport.startRestore() method if too many packages are involved; in
testing, 300 is an example of too many. Instead of using
IRestoreSession.restoreAll(), use restorePackages() and provide the
package names in batches of 100.
This issue reveals itself when using SeedVault with the D2D patch and
with an OS, such as stock Pixel OS, that includes an abundance of
packages. (Prior to this patch, the call to restoreAll() meant that the
framework would request data restoration for all packages installed,
even if they were not in the metadata.)
In logs, this issue appears as follows:
```
I BackupManagerService: Full restore; asking about 300 apps
W BpBinder: Large outgoing transaction of 528540 bytes, interface descriptor <uncached descriptor>, code 14
E JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 528540)
E BackupManagerService: Unable to contact transport for restore: data parcel size 528540 bytes
```
Change-Id: Ibb5bb4572d9e873beccd6056da5fe3ae4dce71c2
Bip39ComparisionTest was run before and after upgrading org.bitcoinj:bitcoinj-core to latest version to ensure that kotlin-bip39 is still behaving the same.
A small tweak in WordListTest was needed because WorldList constructor was made internal.
* Pre-34, this was marked as @hide and @TestApi
* We were using it as a system app with hidden APIs allowed,
and having added the framework android.jar to gradle
* 91fa0b1298
made it public, so lint now complains. Silence that.
Change-Id: I5a1ec9847a25a0798726af3867d7660db1528a00
When `android.permission.MANAGE_DOCUMENTS` is not granted, Seedvault
prompts to select a storage location. Do not insist on resolving the
storage's actual root, as it will likely (or perhaps always) fail.
Use a fake storage root as is done for USB and app-based options.
Known issues:
* Selected location is assumed not to be USB and not to require
network access in its storage options.
Change-Id: I357b4c68673d71c087be41e9c94c2841c1d6658e
Disable new R8 mode and resource namespacing for now to avoid build failures.
These needs to be worked on before they can be enabled.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
If you're using Android plugin for Gradle 3.0.0 or higher, your project automatically uses a default version of the build tools that the plugin specifies
Ref: https://developer.android.com/tools/releases/build-tools
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
* Ensure every plugin is present in project's plugin block with version
* Switch to full plugin id for jetbrains plugins
* Move plugin and dependency repos to settings
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
* We've had a love/hate relationship with the combination of
SAF + Nextcloud app + Nextcloud server
* SAF is quite limiting, and that causes it's own issues
* On top of that, Nextcloud app has it's own issues. We've
even sent patches for some things, but there's only so much one can do
https://github.com/nextcloud/android/pulls?q=is%3Apr+author%3Agrote
* With the DAVx5 WebDAV support, it seems to work better.
* However, most recently a server side change broke things entirely, with either apps
https://github.com/seedvault-app/seedvault/issues/490#issuecomment-1368032414
* Due of all of this, it just leads to a bad backup experience.
As such, let's just say this is not recommended at all entirely
* Hopefully in the future we'll be able to support more options
Change-Id: I0b46dd11df7c31606131bf311583fe4777536463
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Korean)
Currently translated at 100.0% (17 of 17 strings)
Translated using Weblate (Korean)
Currently translated at 100.0% (179 of 179 strings)
Co-authored-by: 이정희 <daemul72@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/ko/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/ko/
Translation: CalyxOS/Seedvault
Translation: CalyxOS/Seedvault storage backup
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (17 of 17 strings)
Translated using Weblate (Galician)
Currently translated at 100.0% (17 of 17 strings)
Translated using Weblate (Galician)
Currently translated at 100.0% (1 of 1 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (179 of 179 strings)
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/es/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_contactsbackup/gl/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/es/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/gl/
Translation: CalyxOS/Seedvault
Translation: CalyxOS/Seedvault contacts backup
Translation: CalyxOS/Seedvault storage backup
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (French)
Currently translated at 100.0% (170 of 170 strings)
Co-authored-by: Maxime Leroy <lisacintosh@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/fr/
Translation: CalyxOS/Seedvault
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Catalan)
Currently translated at 100.0% (17 of 17 strings)
Translated using Weblate (Catalan)
Currently translated at 100.0% (170 of 170 strings)
Co-authored-by: kbci_wcn <kbci_wcn@aleeas.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/ca/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/ca/
Translation: CalyxOS/Seedvault
Translation: CalyxOS/Seedvault storage backup
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Russian)
Currently translated at 100.0% (17 of 17 strings)
Translated using Weblate (Russian)
Currently translated at 98.8% (177 of 179 strings)
Translated using Weblate (Russian)
Currently translated at 100.0% (170 of 170 strings)
Co-authored-by: Егор Ермаков <eg.ermakov2016@yandex.ru>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/ru/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/ru/
Translation: CalyxOS/Seedvault
Translation: CalyxOS/Seedvault storage backup
Currently translated at 100.0% (17 of 17 strings)
Translated using Weblate (Czech)
Currently translated at 97.2% (174 of 179 strings)
Translated using Weblate (Czech)
Currently translated at 96.6% (173 of 179 strings)
Translated using Weblate (Czech)
Currently translated at 99.4% (169 of 170 strings)
Co-authored-by: Micovec <jiri.vokrinek@email.cz>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/cs/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/cs/
Translation: CalyxOS/Seedvault
Translation: CalyxOS/Seedvault storage backup
Currently translated at 100.0% (17 of 17 strings)
Translated using Weblate (Greek)
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Greek)
Currently translated at 100.0% (170 of 170 strings)
Co-authored-by: Michael Bestas <mkbestas@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/el/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/el/
Translation: CalyxOS/Seedvault
Translation: CalyxOS/Seedvault storage backup
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (170 of 170 strings)
Co-authored-by: Óscar Fernández Díaz <oscfdezdz@tuta.io>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/es/
Translation: CalyxOS/Seedvault
Currently translated at 100.0% (17 of 17 strings)
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (170 of 170 strings)
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/zh_Hans/
Translation: CalyxOS/Seedvault
Translation: CalyxOS/Seedvault storage backup
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Hebrew)
Currently translated at 100.0% (17 of 17 strings)
Translated using Weblate (Hebrew)
Currently translated at 100.0% (170 of 170 strings)
Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/he/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/he/
Translation: CalyxOS/Seedvault
Translation: CalyxOS/Seedvault storage backup
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (German)
Currently translated at 100.0% (17 of 17 strings)
Translated using Weblate (German)
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (German)
Currently translated at 100.0% (170 of 170 strings)
Co-authored-by: nautilusx <translate@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/de/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/de/
Translation: CalyxOS/Seedvault
Translation: CalyxOS/Seedvault storage backup
Currently translated at 100.0% (17 of 17 strings)
Translated using Weblate (Turkish)
Currently translated at 100.0% (179 of 179 strings)
Translated using Weblate (Turkish)
Currently translated at 100.0% (170 of 170 strings)
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/tr/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/tr/
Translation: CalyxOS/Seedvault
Translation: CalyxOS/Seedvault storage backup
* We already pre-fill the code on debug builds to make testing easier
* Allow screenshots too so we don't have to note down the code right away
when testing
Change-Id: Ie9cc3080616b78a6e5f9b427c080f10c146a036d
MR #151 implemented a fallback if MANAGE_DOCUMENTS is not granted,
which falls back to show a file chooser to the user to manually
select the storage root.
Document this behavior in the manifest as well, as the permission
causes some certification tests to fail (#453).
Change-Id: I3271b7969aacc014349766a022f13a00bea9ff85
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
additionally adding a test to ensure the storage provider is excluded.
Otherwise, when the storage provider (i.e. DAVx5 or Nextcloud) is installed,
it will be terminated, and the restoration process will be interrupted.
Change-Id: Ic1be201b673d718b416009ff61f5d975c89b6a62
* Pressing "Backup now" should not just ignore you when it's not actually
enabled
* Add a toast message telling you it's not enabled
Fixes: #390
Change-Id: I5d698a244652e094b0acfc42cdea017a0af9a20b
* New SetupWizard uses external/setupdesign (sud) and
external/setupcompat (suc) to achieve the desired looks
* It prevents proper previews when included in any app, though, so
we better try achieving the same by manually styling the activities
for 12
* This patch mimics the design by applying styles similar to the ones
from sud, sometimes reusing parts taken from there
Change-Id: Iccf588e5239aeb00645f97b095910986f32c52d0
By default, Android exposes USB devices only to the main user.
In order to query, read and write to it, the signature permission INTERACT_ACROSS_USERS_FULL (optional) is granted to create Seedvault's context as the system user.
Issue: calyxos#437
Issue: https://github.com/seedvault-app/seedvault/issues/77
Change-Id: I0b1b4c8c5aeeb226419ff94e15f631ebe1db66df
Currently translated at 100.0% (16 of 16 strings)
Translated using Weblate (Catalan)
Currently translated at 100.0% (169 of 169 strings)
Translated using Weblate (Catalan)
Currently translated at 87.5% (148 of 169 strings)
Translated using Weblate (Catalan)
Currently translated at 80.4% (136 of 169 strings)
Translated using Weblate (Catalan)
Currently translated at 71.0% (120 of 169 strings)
Translated using Weblate (Catalan)
Currently translated at 20.7% (35 of 169 strings)
Translated using Weblate (Catalan)
Currently translated at 15.3% (26 of 169 strings)
Translated using Weblate (Catalan)
Currently translated at 5.9% (10 of 169 strings)
Translated using Weblate (Catalan)
Currently translated at 100.0% (1 of 1 strings)
Translated using Weblate (Catalan)
Currently translated at 4.7% (8 of 169 strings)
Co-authored-by: kbci_wcn <kbci_wcn@aleeas.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/ca/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_contactsbackup/ca/
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault_storage/ca/
Translation: CalyxOS/Seedvault
Translation: CalyxOS/Seedvault contacts backup
Translation: CalyxOS/Seedvault storage backup
Currently translated at 99.4% (168 of 169 strings)
Translated using Weblate (French)
Currently translated at 97.6% (165 of 169 strings)
Co-authored-by: Armand LB <armandleborgne@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/calyxos/seedvault/fr/
Translation: CalyxOS/Seedvault