Torsten Grote
0272a094ec
Add backup of local contacts as an extra APK
...
so we can use the existing system backup API and keep this code
(and the tests as well as permissions) nicely separate from seedvault itself
2020-10-22 08:29:23 -03:00
Torsten Grote
50f9dd6f13
Merge pull request #145 from grote/91-app-bundles-re-install
...
Re-install apps with APK splits if they are compatible
2020-10-22 08:28:36 -03:00
Torsten Grote
2cde417c8c
Add config option to re-install apps with feature modules only on same device
...
There is a possibility that incompatible APK splits make a an app crash when starting after re-installing it.
With that config option each OEM can decide with they want to take this risk or not.
2020-10-22 08:00:55 -03:00
Torsten Grote
e6723093c9
Android Studio 4.1 and changes to test files
2020-10-22 08:00:54 -03:00
Torsten Grote
a833df2165
Show dialog explaining auto-restore after a restore failed due to not all apps being installed
2020-10-22 08:00:54 -03:00
Torsten Grote
0f0f198228
Add unit tests for re-installing apps with APK splits
2020-10-13 16:19:05 -03:00
Torsten Grote
608e67cb65
Refactor existing ApkRestore unit tests to make adding new ones easier
2020-10-13 16:19:05 -03:00
Torsten Grote
b3db859b40
Re-install APK splits if they are compatible and have proper hash
2020-10-13 16:07:19 -03:00
Torsten Grote
68a6403c4b
Add a compatibility checker for APK splits
...
that tries to figure out compatibility only based on the name of the split.
This is not an exact science and there might be errors, but we hope to correctly identify most cases that matter in practice.
2020-10-13 16:07:19 -03:00
Torsten Grote
6e4c117fca
Also complile the instrumentation test sources in CI
...
We already don't run instrumentation tests in CI,
so we should at least compile them to catch any breakage there.
This is important as they don't even get compliled when building and
installing the app with Android Studio.
2020-10-13 16:07:18 -03:00
Torsten Grote
3487c91ba3
Do not re-install apps that require splits
...
The app will be shown as failed during restore and the user will be given the opportunity to re-install it manually via an installed ap store
2020-10-13 18:32:04 +05:30
Torsten Grote
643247b600
Change UI for re-installation of system apps
...
We are re-installing system apps if they are present on the restore device as a system app and have a newer version code.
Before, when one of those conditions is not true, we were showing a failure and gave the user the option to re-install the app from an app store.
Now, we don't offer the manual re-install option anymore and only show a success when a newer or same version of the system app is already installed.
2020-10-13 18:32:04 +05:30
Torsten Grote
0971c5db19
Do not back up APKs of test-only apps, as we can not re-install them anyway
...
The flag to allow installation gets filtered out after we set it:
http://aosp.opersys.com/xref/android-11.0.0_r5/xref/frameworks/base/services/core/java/com/android/server/pm/PackageInstallerService.java#544
2020-10-13 18:32:04 +05:30
Torsten Grote
0a8a286826
Update state of opt-out apps, even if they never had any state
2020-10-13 18:32:04 +05:30
Torsten Grote
a9402f4644
Update app install state after user comes back from manually installing an app
...
This way, the list of failed apps ideally keeps shrinking, allowing the user to see which apps are still left in a failed state.
2020-10-13 18:32:04 +05:30
Torsten Grote
1a81e2ddd6
If possible, open the app store an app was originally installed with
...
When an app fails to install during restore, we offer the option to manually install it.
If this doesn't happen with the same app store,
it is likely that the installed app will have a different signature (e.g. Aurora vs. F-Droid).
If the signature doesn't match, the data restore will fail.
Therefore, we attempt to let the user only use the same store for re-install.
There's a known issue that F-Droid doesn't report the proper package name:
https://gitlab.com/fdroid/fdroidclient/-/issues/2085
2020-10-13 18:32:04 +05:30
Torsten Grote
d6cb34c211
Allow the user to manually re-install apps before data restore starts
...
When one or more apps fail to install, the user is shown a dialog explaining that we need the apps installed in order for restore to work.
After the dialog is dismissed, the list of apps is resorted so failed apps are at the top. They are made clickable and the user is brought to an app store to re-install them.
2020-10-13 18:32:04 +05:30
Torsten Grote
747384fb59
Refactor InstallResult to be more extensible
2020-10-13 18:32:04 +05:30
Torsten Grote
f45411d81b
Refactor code related to APK installs as preparation for upcoming changes
2020-10-13 18:32:04 +05:30
Torsten Grote
9830d2db95
Show different app state messages for backup and restore
2020-10-13 18:32:04 +05:30
Torsten Grote
3a31e09a04
Back up split APKs as well and store them in the metadata
...
This will enable us to check compatibility of the splits with the restore device and if compatible, re-install them.
2020-10-13 18:32:04 +05:30
Torsten Grote
af2bf4f60a
Support APK splits in metadata
2020-10-13 18:32:04 +05:30
Torsten Grote
46e8a46c63
Pull out code in ApkBackup and ApkRestore into own methods
2020-10-13 18:32:04 +05:30
Torsten Grote
741e5ef1a0
Fix storage chooser title if the translation is long
2020-10-08 19:27:51 +05:30
Torsten Grote
9ae3c6e835
Add some documentation to the transport methods
2020-10-08 19:27:51 +05:30
Torsten Grote
fbdfa40300
Load app status data off the UI thread
...
Previously, the data was loaded on the UI thread which produced a
visible freeze after clicking "App backup status".
2020-10-08 19:27:51 +05:30
Torsten Grote
0612f79195
Fix or permit certain disk reads on UI thread
2020-10-08 19:27:51 +05:30
Torsten Grote
1d2c74bf2c
Ensure that metadata cache streams get closed
2020-10-08 19:27:51 +05:30
Torsten Grote
4387353227
Enable StrictMode for userdebug builds
2020-10-08 19:27:51 +05:30
Torsten Grote
948cd597d8
Show proper transport labels for OS transport selection
...
If an AOSP-based ROM allows the user to choose a backup transport, these labels will be shown.
2020-10-08 19:27:51 +05:30
Torsten Grote
2d5f00adae
Add Seedvault backup parser to README
...
Closes #104
2020-10-08 19:27:51 +05:30
Torsten Grote
6c531066e7
Enable automatic coding style linting with ktlint (also on CI)
...
This way the coding style is guaranteed to stay consistent.
2020-10-07 19:44:05 +05:30
Torsten Grote
53937bda2f
Auto-format code style of all files to match official style
...
This also adds a note to the README
and the Android Studio coding style files.
2020-10-07 19:44:05 +05:30
Torsten Grote
55909ce305
Fix lint issues with translations and ignore missing translations
...
as weblate doesn't seem to have a way to only import completed
translations.
2020-10-07 19:01:39 +05:30
Torsten Grote
886f5a46c7
Change AOSP version requirement in README
...
and add note about older releases in branches.
2020-10-07 19:01:39 +05:30
Torsten Grote
d2ed3a10f0
Fix dependency issues by strictly requiring specific versions
...
Otherwise gradle pulls in newer versions of some libraries that require
a newer Kotlin version at runtime and then make the app crash.
This also moves the dependency declarations into a dedicated file.
2020-10-07 19:01:39 +05:30
Torsten Grote
2a176a9c8f
Turn off proguard/R8 for AOSP builds as well
2020-10-07 19:01:39 +05:30
Torsten Grote
57f404281c
Fix lint warnings
2020-10-07 19:01:39 +05:30
Torsten Grote
af4b6807f2
Fix compile warnings on AOSP 11
2020-10-07 19:01:39 +05:30
Torsten Grote
76be2c1ea0
Remove 'host_supported: true' from Android.bp files
...
It seems that this is not actually needed for our AOSP builds.
2020-10-07 19:01:39 +05:30
Torsten Grote
ceac5fc5ce
Clean up koin-android dependencies and upgrade koin
2020-10-07 19:01:39 +05:30
Torsten Grote
cfcf7b35ba
Clean up BIP39 dependencies
2020-10-07 19:01:39 +05:30
Torsten Grote
6cde6be997
Sync AndroidX dependencies with those available in AOSP
2020-10-07 19:01:39 +05:30
Torsten Grote
8f91138e9f
Remove dependency on commons-io library
2020-10-07 19:01:39 +05:30
Torsten Grote
8bdbe6d681
Handle new FLAG_DATA_NOT_CHANGED for K/V backups
2020-10-07 19:01:39 +05:30
Torsten Grote
25695d72b8
Fix storage selection screen (icon color and available bytes)
2020-10-07 19:01:39 +05:30
Torsten Grote
918d7a712a
Add QUERY_ALL_PACKAGES permission which is now needed on Android 11
2020-10-07 19:01:39 +05:30
Torsten Grote
6e58ec0340
Fix instrumentation tests on Android 11
2020-10-07 19:01:39 +05:30
Torsten Grote
45ac8883a0
Fix roboelectric unit tests
2020-10-07 19:01:39 +05:30
Torsten Grote
415b5729d5
Bump AOSP versions for gradle build
2020-10-07 19:01:39 +05:30