Giter VIP home page Giter VIP logo

seedvault's Introduction

Seedvault

Build

A backup application for the Android Open Source Project.

If you are having an issue/question, please look at our FAQ.

Components

Features

  • Backup application data to a flash drive.
  • Restore application data from a flash drive.
  • User-friendly encryption using a mnemonic phrase (BIP39).
  • Automatic daily backups that run in the background.

Requirements

SeedVault is developed along with AOSP releases

We update it every time Google releases a new Android version, make any changes required for basic functionality, and any improvements possible through API changes in the OS.

This means that for ROMs using SeedVault it's recommended to use the same branch as your android version

  • This current branch android14 is meant for usage with Android 14
  • This is indicated by the version name starting with 14, and the version code starting with 34 - the Android 14 API version

For older versions of Android, check out the branches.

Trying to use an older branch on a newer version may lead to issues and is not something we can support.

Getting Started

  • Check out the wiki for information on building the application with AOSP.

What makes this different?

This application is compiled with the operating system and does not require a rooted device for use. It uses the same internal APIs as adb backup which is deprecated and thus needs a replacement.

Permissions

  • android.permission.BACKUP to back up application data.
  • android.permission.ACCESS_NETWORK_STATE to check if there is internet access when network storage is used.
  • android.permission.MANAGE_USB to access the serial number of USB mass storage devices.
  • android.permission.WRITE_SECURE_SETTINGS to change system backup settings and enable call log backup.
  • android.permission.QUERY_ALL_PACKAGES to get information about all installed apps for backup.
  • android.permission.QUERY_USERS to get the name of the user profile that gets backed up.
  • android.permission.INSTALL_PACKAGES to re-install apps when restoring from backup.
  • android.permission.MANAGE_EXTERNAL_STORAGE to backup and restore files from device storage.
  • android.permission.ACCESS_MEDIA_LOCATION to backup original media files e.g. without stripped EXIF metadata.
  • android.permission.FOREGROUND_SERVICE to do periodic storage backups without interruption.
  • android.permission.FOREGROUND_SERVICE_DATA_SYNC to do periodic storage backups without interruption.
  • android.permission.MANAGE_DOCUMENTS to retrieve the available storage roots (optional) for better UX.
  • android.permission.USE_BIOMETRIC to authenticate saving a new recovery code
  • android.permission.INTERACT_ACROSS_USERS_FULL to use storage roots in other users (optional).
  • android.permission.POST_NOTIFICATIONS to inform users about backup status and errors.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/seedvault-app/seedvault.

See DEVELOPMENT.md for information on developing Seedvault locally.

This project aims to adhere to the official Kotlin coding style.

Third-party tools

⚠ WARNING: the Seedvault developers make no guarantees about external software projects. Please be aware that disclosing your secret recovery key to other software has security risks.

The Seedvault backup parser allows you to decrypt and inspect your backups (version 0 backup). It can also re-encrypt them.

The Seedvault extractor allows you to decrypt and inspect your backups from newer versions of Seedvault (version 1 backup). It is currently work-in-progress.

License

This application is available as open source under the terms of the Apache-2.0 License.

Funding

Calyx Institute

This project is primarily developed and maintained by the Calyx Institute for usage in CalyxOS.

NGI0 PET Fund

This project was funded through the NGI0 PET Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825310.

seedvault's People

Contributors

70h avatar amartinz avatar armlebor avatar atrate avatar baddaemon avatar chirayudesai avatar comradekingu avatar ghilbigithubilbi avatar grote avatar josprachi avatar kovalevartem avatar micovec avatar mikeng avatar milotype avatar nekromanser avatar oersen avatar oscfdezdz avatar rezaalmanda avatar santossi avatar sr093906 avatar steadfasterx avatar stevesoltys avatar t-m-w avatar theimpulson avatar uldiniad avatar unbiaseduser-github avatar weblate avatar williamtheaker avatar yarons avatar yurical avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seedvault's Issues

Idea: Cloud support

Hi!
In the FDroid forums, I came up with the idea to extend the BackupTransport API for cloud backups to selfhosted clouds like Nextcloud.

I'm very pleased to see, that extending the API is indeed possible, as proven by this project.
It would be super awesome, if this project would at some point support adding cloud servers (Nextcloud, Owncloud, Seafile...) as storage backend.

What do you think? :)

Backup process gets killed when backing up external storage

Doing a backup on LineageOS 15.1 fails:

ActivityManager: Process com.android.externalstorage (pid 7146) has died: fore BFGS
ActivityManager: Killing 7103:com.stevesoltys.backup/u0a119 (adj 0): depends on provider com.android.externalstorage/.ExternalStorageProvider in dying proc com.android.externalstorage (adj 0)

Excluding com.android.externalstorage from the list of packages to backup makes the backup succeed.

"App Doesn't Allow Backup"

Brilliant project. Thanks for all your efforts!

I just applied the GrapheneOS stable branch update that went live today and did a backup. Seedvault returns "App doesn't allow backup" for 29 apps. Having skimmed through the existing github submissions I came across #65 (comment)

Correct me if I'm mistaken. I gather the metadata info just hasn't been merged into master at least for the GrapheneOS version?

Can you please illuminate a little more if apps are allowed to set a "no backup" flag that Seedvault respects?

If not, will Seedvault give a means override the skipping of these app backups? I just ask because I was previously used to TWRP/Titanium Backup to get back up and running quickly.

If it were possible to backup and restore all internal storage that would be great also.

Though adb backup is deprecated, I was hearing it worked for some folks. Tried it with my Pixel 2 handsets. Unfortunately no luck with that.

Edit: I just went to transfer the SeedVault backup folder to my PC and see that ALL apks appear to have been backed up. Stellar! My guess is I'm just not seeing the following backup error flags as mentioned in that other thread.

APK_OPT_OUT when an app opts out of backup, but we got its APK
APK_ABOVE_QUOTA when an app is above the quota, but we got its APK
APK_ERROR when an app has a backup error, but got its APK

AOSP documentation on the backup APIs

Forgive me if this is not the right place to ask or if i might have searched the web more thorough.
My question is: Which documentation has been used in order to implement this application and if the process of doing so might be documented in the wiki.
Because: I have tried a lot to find any documentation of the APIs for an Android backup service but i could not find any useful resources. It almost seems to me as if Google is actively not promoting this information to hinder diversity in this area and in order to hold offering a backup service more or less a monopole to themselves. The restrictiveness on the necessary system permission also supports this suspicion.
Also i would want to know what exactly can be done using the given APIs.
Please correct me if i jumped to any wrong conclusions and if there is a conclusive and complete documentation on those APIs (in addition to finding the relevant methods in the AOSP source code) i would be very glad about a hint.

Seafile storage?

Hi,
Thanks for this cool stuff.

I dont use nextcloud but my seafile instance.

How can I use seafile for my backup?
I use it from GrapheneOS, maybe this change something?
Or is it an API problem, like nextcloud expose something that seafile doesn't ?

Tell me if I can help, providing some info. I would be very happy to be able to store in my seafile.

Regards

Allow OEMs to configure backup storage whitelist

Typically, restore from backup is only available during device setup (currently configurable) where not all storage backends might be available. OEMs should be able to also whitelist storage backends, so users don't end up doing backups on storage that will not be available during device setup.

Backing up apps which backup their data their own mechanism

Some apps such as WhatsApp and Signal use their own mechanism to backup their data.

It would be nice to add some code to store those files too, atleast for some well-known and widely used apps.

For WhatsApp, it's really simple, just grab
/sdcard/WhatsApp/Databases
And as long as that's present before the app is setup it'll restore chats.

For Signal the data is stored on sdcard too, but it's protected with a key which the user has to note down separately. So that needs to be accounted for.

Backup settings toggle information

The user should be made aware that in order for this application to work, they need to enable the "backup" toggle in the settings app.

Logo Design Proposal

Greetings!

Hello Project Owner, I am a designer and I am making logo, whats good now is I am offering you a free logo. Is there any chance I can contribute on your project?

Nextcloud not being found as storage location with app passcode enabled

HW: Pixel 3
OS: Current GrapheneOS stable (QQ2A.200305.002.2020.03.23.22)
Apps Nextcloud Client (3.10.1) and Nextcloud Talk (8.0.6) installed from F-Droid initially. Trying to update those with the PlayStore versions via Aurora fails though.

03-27 17:54:32.467 1323 1384 W VoiceInteractionManagerService: no available voice interaction services found for user 0
03-27 17:54:32.612 1323 1384 I RoleUserState: Wrote roles.xml successfully
03-27 17:54:32.626 1323 1560 I ActivityTaskManager: START u0 {cmp=com.stevesoltys.seedvault/.ui.storage.StorageActivity (has extras)} from uid 10040
03-27 17:54:32.626 855 855 D [email protected]: LAUNCH: 1
03-27 17:54:32.632 8405 8405 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@336776b
03-27 17:54:32.663 8405 8469 W StorageRootFetcher: Authority com.android.documentsui.archives is not white-listed, ignoring...
03-27 17:54:32.663 8405 8469 W StorageRootFetcher: Failed to get provider info for com.android.documentsui.archives
03-27 17:54:32.705 855 855 D [email protected]: LAUNCH: 0
03-27 17:54:32.946 8405 8469 W StorageRootFetcher: Authority com.android.mtp.documents is not white-listed, ignoring...
03-27 17:54:32.946 8405 8469 W StorageRootFetcher: Failed to get provider info for com.android.mtp.documents
03-27 17:54:32.946 8405 8469 W StorageRootFetcher: Not supporting com.android.providers.downloads.documents
03-27 17:54:32.946 8405 8469 W StorageRootFetcher: Failed to get provider info for com.android.providers.downloads.documents
03-27 17:54:32.946 8405 8469 W StorageRootFetcher: Authority com.android.providers.media.documents is not white-listed, ignoring...
03-27 17:54:32.946 8405 8469 W StorageRootFetcher: Failed to get provider info for com.android.providers.media.documents
03-27 17:54:32.946 8405 8469 W StorageRootFetcher: Authority com.android.shell.documents is not white-listed, ignoring...
03-27 17:54:32.946 8405 8469 W StorageRootFetcher: Failed to get provider info for com.android.shell.documents
03-27 17:54:32.947 8405 8469 W StorageRootFetcher: Authority com.android.traceur.documents is not white-listed, ignoring...
03-27 17:54:32.947 8405 8469 W StorageRootFetcher: Failed to get provider info for com.android.traceur.documents
03-27 17:54:32.990 8405 8469 W StorageRootFetcher: Authority com.termux.documents is not white-listed, ignoring...
03-27 17:54:32.990 8405 8469 W StorageRootFetcher: Failed to get provider info for com.termux.documents
03-27 17:54:33.716 1323 3075 E TaskPersister: File error accessing recents directory (directory doesn't exist?).

EDIT: After trying around un- and reinstalling the app I realized that having an app password set (I had "device credentials" on) is what's blocking seedvault from recognizing nextcloud storage.

Warn user if they choose internal storage location

It might be nice to warn the user if they choose an internal storage location for backup since they might not get access to that when their phone is stolen/broken/lost. This might be an issue we can save ordinary users from. Advanced users that somehow copy the backup somewhere else can dismiss the warning.

cannot enable backups through settings with seedvault-prebuilts 1.0.0

After including seedvault-prebuilts in my RattlesnakeOS image, Settings > System > Backups remains "Off" and selecting it shows an empty list.

This may only be an issue when building seedvault into a later OTA after already performing initial device setup where seedvault was absent.

The workaround that fixed this for me was:

$ adb shell bmgr enable true
$ adb shell bmgr transport com.stevesoltys.seedvault.transport.ConfigurableBackupTransport

At least, it would be helpful to document this workaround, which I found in #48

Thanks for building this excellent piece of software!

Seedvault bypasses device policy for installing apps

There are 3 relevant profile restrictions: DISALLOW_INSTALL_APPS, DISALLOW_INSTALL_UNKNOWN_SOURCES and DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY.

Seedvault currently provides a bypass for these restrictions, by using the privileged permission for installing apps without enforcing these. These are core features for locking down profiles as part of device management, either for an enterprise deployment or by the owner of the device. Any app from the backup needs to be considered as coming from an unknown source, so if any of these user profile restrictions is active for the profile Seedvault should disable installing apps from the backup.

Support hardware tokens to store the encryption secret

I'd like to see a feature where instead of using the 12 words to save the user's encryption key, we could optionally use a 2FA token like a Yubikey ( over usb or NFC ) to store the key so that if a person lost their phone or wanted to move their data from one device to another, they wouldn't need to be bothered with the 12 words.. or safely storing the 12 words.

Maybe for security we could allow the use of the hardware token, but also have the 12 words as a backup in case the token is lost.

Also maybe we need to lock the token with a PIN code or key, so that if the token is lost (or stolen) and then found, that it can't be used to recover the encrypted backups

Backup APKs of apps not being backed up

The system doesn't backup any apps which don't have data, which would include apps which haven't really been used.

This is with / after APK backups.

For example, I had wireguard instaleld on my phone but it didn't get backed up because I hadn't added any server entries to it (Though I had definitely launched it after install)
I would've still liked to have it backed up though, as I wanted the app present for when I do end up needing it.
Having the APK for thsi backed up and restored would be nice, as to the user it's an app they had on the older phone and don't on the newer phone after restore.

Certain packages fail to restore

11-01 00:04:45.692   873  2160 D BackupManagerService: MSG_RUN_RESTORE observer=android.app.backup.IRestoreObserver$Stub$Proxy@61f585d
11-01 00:04:45.692   873  2160 D BackupManagerService: Starting restore.
11-01 00:04:45.696   873  2160 D BackupManagerService: initiateOneRestore packageName=@pm@
11-01 00:04:46.583   873  2160 I BackupManagerService: Next restore package: RestoreDescription{de.tap.easy_xkcd : STREAM}
11-01 00:04:46.835   873 16426 I RestoreEngine: Sig + version match; taking data
11-01 00:04:46.836   873 16426 D RestoreEngine: Clearing app data preparatory to full restore
11-01 00:04:46.836   873 16426 I ActivityManager: Force stopping de.tap.easy_xkcd appid=10141 user=0: clear data
11-01 00:04:46.839   873   924 I ActivityManager: Force stopping de.tap.easy_xkcd appid=10141 user=-1: clearApplicationUserData
11-01 00:04:46.842   694   694 I keystore: clear_uid 10141
11-01 00:04:46.873 12719 12719 D NlpPackageReceiver: Intent received: Intent { act=android.intent.action.PACKAGE_RESTARTED dat=package:de.tap.easy_xkcd flg=0x10 cmp=com.google.android.gms/org.microg.nlp.PackageReceiver (has extras) }
11-01 00:04:46.879  1303  1303 D CarrierSvcBindHelper: No carrier app for: 0
11-01 00:04:46.896   873 16426 I ActivityManager: Start proc 16428:de.tap.easy_xkcd/u0a141 for backup android/FullBackupAgent
11-01 00:04:46.896   873 16426 D BackupManagerService: awaiting agent for ApplicationInfo{1f9e064 de.tap.easy_xkcd}
11-01 00:04:47.478   873  2156 D BackupManagerService: agentConnected pkg=de.tap.easy_xkcd agent=android.os.BinderProxy@13143cc
11-01 00:04:47.479   873 16426 I BackupManagerService: got agent android.app.IBackupAgent$Stub$Proxy@6a3615
11-01 00:04:47.504   873  2156 D VoldConnector: SND -> {484 volume mkdirs /storage/emulated/0/Android/data/de.tap.easy_xkcd/files/}
11-01 00:04:47.507   873  1157 D VoldConnector: RCV <- {200 484 Command succeeded}
11-01 00:04:48.192   873 16425 E StreamFeederThread: Transport failed during restore: FileDescriptor must not be null
11-01 00:04:48.197 16348 16376 E Parcel  : fcntl(F_DUPFD_CLOEXEC) failed in Parcel::read, i is 0, fds[i] is -1, fd_count is 1, error: Too many open files
11-01 00:04:48.214 16348 16376 E Parcel  : fcntl(F_DUPFD_CLOEXEC) failed in Parcel::read, i is 0, fds[i] is -1, fd_count is 1, error: Too many open files

There are too many file descriptors opened while restoring certain applications, so the restore fails. Probably something to do with ContentProviderRestoreComponent not maintaining a cache of the packages that are in the zip file.

adb backup works fine for the same packages.

Consider adding support for standalone builds

Consider adding support for building this as a standalone application - without being included in AOSP.

This would give users who aren't interested in building AOSP the ability to install the APK as a system application whichever way they prefer.

Android Pie support

This application likely does not compile cleanly with Android Pie. It will need to be updated to support the latest internal backup APIs.

UI improvements: Add some more info in-app

Let's add a start screen before we have the user note down and confirm a big passphrase.

Let's put in some info about restoring, there can be two sets of texts depending on the option enabled (SUW or in-app). This could also be kept somewhere viewable all the time, maybe below the settings entries?

Backup on-device contacts

We should also backup Contacts that are only stored on-device aka those that are not synced via a CardDAV or other sync solution.

New Restore UI

When setting up a new (factory-reset) phone, a new restore UI should help the user to restore from backup.

As an example, I will document how this currently works on an Android One device:

On the setup-wizard top-level, it asks to copy apps & data:

Image8823253217044819117

Then you have three options to choose from (we wouldn't need that):

Image5867280989855198175

To restore a cloud backup, they ask you to sign in to your Google account:

Image1986269324844552337

After entering the user name, the user is asked for the password:

Image5393649041993014666

Then, the user is prepared for entering the old lock-screen password, to decrypt the backup:

Image3149112849175998030

The next screen asks for the lock-screen password:

Image5840142501433186218

The user gets different backup sets from different devices to choose from:

Image4436807382318633755

Now the user gets an overview over what will be restored and they can opt to not restore certain things.

Image5473010829333711533

Image9069577351675121118

Here, the user can choose which apps to restore.

Image7668971841057975029

Interestingly, after setup is complete, the old apps have not been restored, yet. If they were on the old desktop, they appear as place holders:

Image7319709652627232381

Image4879369680991215880

After some time, the apps get installed automatically:

Image2305442027139603638

and their data gets restored. However, accounts will not get restored and need to be re-added manually.

Allow regenerating the recovery code

I recently lost the 12 words for a test device, and had to go to Settings to clear app data for Seedvault to reset the code.

It would be good to have an option in the menu for this, with one or more confirmations and warnings as needed.

  • Allow regenrating passphrase
  • Allow deleting old backups, per storage

Backing up the internal storage - /sdcard

We should backup the entirety of the internal storage as well.
While it might be too big for certain cloud providers, it would be just fine if backing up to removable storage.

It also has the added benefit of backing up what we want from #36 , i.e. backing up internal storage would also backup WhatsApp's directory which would include it's chat backup databases and media files as well.

Show something when an explicitly triggered backup is finished

When a backup is triggered explicity using the menu item "Backup Now", it shows the normal progress bar, and then nothing at all.

It would be good to have a "backup complete" notification in this case.

Otherwise, even something in the app itself showing the status of the last backup would be good too.

Basically, it would be good to not have the notification just disappear like that without anything else.

Show status of backed up apps individually

It would be good to have an app list like the one that's shown during restore, with the status of each individual app.

It could show if they're backed up, when they got backed up last, and if they aren't backed up - the reason for that.

Better SetupWizard integration

This ticket intentionally has a vague sounding title.

We could allow the user to configure backups via the SetupWizard, that would be it's own thing.
They would be prompted to select a storage location, and note down the 12-word code.
So this would have to be after Wi-Fi setup, and also need the Nextcloud app (or any other storage provider offered by default for that matter) to be installed before being shown.

And at the same time, we could try and make the design and feel of the current restore screen match the SetupWizard as much as possible. This would be useful for a future backup screen too.
It's nothing major, but I mean tiny things like making the "don't restore" and "next" button look more like they already do for other SetupWizard buttons texts.
Another thing I noticed is that the restore screen is fully immersive which makes it look weird honestly speaking.

Minor nits like these are what make it look less like a SetupWIzard page and more like another app.

So

  • Configure Backup from SetupWizard
  • Make the restore screen's buttons more like SetupWizard
  • Make the restore screen not fully immersive. Need to see the navbar and status bar.

Try to remove the requirement of signing the app with the platform key

Currently, Seedvault needs to be signed with the platform key to work (the same key the OS is signed with). It could be possible to get rid of this requirement. For example, by providing an alternative UI path to select storage when the MANAGE_DOCUMENTS permission was not granted.

If that works, we can use a hidden-api-whitelist configuration instead of signing with platform cert to continue to access the hidden APIs we need for backup:
LineageOS/android_vendor_lineage@dab1569 example whitelist file

Tasks:

  • detect at runtime if permission was granted and choose backup/restore storage UI path accordingly
  • implement different UI storage choosing path for backup
  • implement different UI storage choosing path for restore
    • ensure the user can re-choose a storage location if no backups are found at chosen location
    • give option to install NextCloud (if needed)

Transport service stops working after first backup / restore

The application currently stops working after the first backup / restore on Android Pie. This has something to do with the whitelisted transport service.

Restarting the device temporarily fixes the issue until the user does another backup / restore.

Google Maps does not get backed up at all

  1. Data backup fails, it can't find it's backup agent, no gapps, but I do have microG
  2. APK isn't backed up at all either

Backup Log:

01-17 15:37:25.265 +0000 1368 20720 D KeyValueBackupTask: Starting key-value backup of com.google.android.apps.maps
01-17 15:37:25.267 +0000 1368 20720 D BackupManagerService: awaiting agent for ApplicationInfo{fd1299 com.google.android.apps.maps}
01-17 15:37:25.292 +0000 892 892 D Zygote : Forked child process 22972
01-17 15:37:25.295 +0000 1368 1426 I ActivityManager: Start proc 22972:com.google.android.apps.maps/u0a115 for backup {com.google.android.apps.maps/com.google.android.apps.gmm.backup.GmmPersistentBackupAgentHelper}
01-17 15:37:25.306 +0000 22972 22972 E droid.apps.map: Not starting debugger since process cannot load the jdwp agent.
01-17 15:37:25.348 +0000 22972 22972 I droid.apps.map: The ClassLoaderContext is a special shared library.
01-17 15:37:25.372 +0000 2932 2932 D ParseCancel: by not found
01-17 15:37:25.374 +0000 6632 6632 I nodomain.freeyourgadget.gadgetbridge.externalevents.NotificationListener: Ignore notification
01-17 15:37:25.376 +0000 1687 1687 D InterruptionStateProvider: No pulsing: not important enough: 0|com.stevesoltys.seedvault|1|null|10049
01-17 15:37:25.378 +0000 1687 1687 D InterruptionStateProvider: No pulsing: not important enough: 0|com.stevesoltys.seedvault|1|null|10049
01-17 15:37:25.495 +0000 22972 22972 W droid.apps.map: JIT profile information will not be recorded: profile file does not exits.
01-17 15:37:25.706 +0000 22972 22998 I Adreno : QUALCOMM build : 4a00b69, I4e7e888065
01-17 15:37:25.706 +0000 22972 22998 I Adreno : Build Date : 04/09/19
01-17 15:37:25.706 +0000 22972 22998 I Adreno : OpenGL ES Shader Compiler Version: EV031.26.06.00
01-17 15:37:25.706 +0000 22972 22998 I Adreno : Local Branch : mybranche95a5ea3-cf05-f19a-a0e7-5cb90179c3d8
01-17 15:37:25.706 +0000 22972 22998 I Adreno : Remote Branch : quic/gfx-adreno.lnx.1.0
01-17 15:37:25.706 +0000 22972 22998 I Adreno : Remote Branch : NONE
01-17 15:37:25.706 +0000 22972 22998 I Adreno : Reconstruct Branch : NOTHING
01-17 15:37:25.706 +0000 22972 22998 I Adreno : Build Config : S P 8.0.6 AArch64
01-17 15:37:25.724 +0000 1368 6785 D BackupManagerService: agentConnected pkg=com.google.android.apps.maps agent=android.os.BinderProxy@faac13f
01-17 15:37:25.724 +0000 1368 20720 I BackupManagerService: got agent android.app.IBackupAgent$Stub$Proxy@84faa0c
01-17 15:37:25.724 +0000 1368 20720 D KeyValueBackupTask: Invoking agent on com.google.android.apps.maps
01-17 15:37:25.726 +0000 20616 22212 I BackupCoordinator: Get backup quota for com.google.android.apps.maps. Is full backup: false.
01-17 15:37:25.726 +0000 20616 22212 I BackupCoordinator: Reported quota of 10485760 bytes.
01-17 15:37:25.727 +0000 1368 20720 V BackupAgentTimeout: getKvBackupAgentTimeoutMillis(): 30000
01-17 15:37:25.732 +0000 22972 22998 I Adreno : PFP: 0x016ee183, ME: 0x00000000
01-17 15:37:25.735 +0000 22972 22990 D BackupServiceBinder: onBackup (com.google.android.apps.gmm.backup.GmmPersistentBackupAgentHelper) threw
01-17 15:37:25.735 +0000 22972 22990 D BackupServiceBinder: java.lang.NullPointerException: throw with null exception
01-17 15:37:25.735 +0000 22972 22990 D BackupServiceBinder: at bulf.a(PG:20)
01-17 15:37:25.735 +0000 22972 22990 D BackupServiceBinder: at com.google.android.apps.gmm.backup.GmmPersistentBackupAgentHelper.a(PG:3)
01-17 15:37:25.735 +0000 22972 22990 D BackupServiceBinder: at bkhc.onBackup(PG:7)
01-17 15:37:25.735 +0000 22972 22990 D BackupServiceBinder: at com.google.android.apps.gmm.backup.GmmPersistentBackupAgentHelper.onBackup(PG:12)
01-17 15:37:25.735 +0000 22972 22990 D BackupServiceBinder: at android.app.backup.BackupAgent$BackupServiceBinder.doBackup(BackupAgent.java:987)
01-17 15:37:25.735 +0000 22972 22990 D BackupServiceBinder: at android.app.IBackupAgent$Stub.onTransact(IBackupAgent.java:294)
01-17 15:37:25.735 +0000 22972 22990 D BackupServiceBinder: at android.os.Binder.execTransactInternal(Binder.java:1021)
01-17 15:37:25.735 +0000 22972 22990 D BackupServiceBinder: at android.os.Binder.execTransact(Binder.java:994)
01-17 15:37:25.738 +0000 22972 22990 W Binder : Caught a RuntimeException from the binder stub implementation.
01-17 15:37:25.738 +0000 22972 22990 W Binder : java.lang.NullPointerException: throw with null exception
01-17 15:37:25.738 +0000 22972 22990 W Binder : at bulf.a(PG:20)
01-17 15:37:25.738 +0000 22972 22990 W Binder : at com.google.android.apps.gmm.backup.GmmPersistentBackupAgentHelper.a(PG:3)
01-17 15:37:25.738 +0000 22972 22990 W Binder : at bkhc.onBackup(PG:7)
01-17 15:37:25.738 +0000 22972 22990 W Binder : at com.google.android.apps.gmm.backup.GmmPersistentBackupAgentHelper.onBackup(PG:12)
01-17 15:37:25.738 +0000 22972 22990 W Binder : at android.app.backup.BackupAgent$BackupServiceBinder.doBackup(BackupAgent.java:987)
01-17 15:37:25.738 +0000 22972 22990 W Binder : at android.app.IBackupAgent$Stub.onTransact(IBackupAgent.java:294)
01-17 15:37:25.738 +0000 22972 22990 W Binder : at android.os.Binder.execTransactInternal(Binder.java:1021)
01-17 15:37:25.738 +0000 22972 22990 W Binder : at android.os.Binder.execTransact(Binder.java:994)
01-17 15:37:25.738 +0000 1368 20720 W KeyValueBackupTask: Agent com.google.android.apps.maps error in onBackup()
01-17 15:37:25.738 +0000 20616 22212 I NotificationBackupObserver: Completed. Target: com.google.android.apps.maps, status: -1003

Transport encryption

There should be encryption support, with at least the ability to protect a backup zip file with keys that are derived from a password using PBKDF2, bcrypt, or scrypt.

Allow choosing apps to be backed up

Sometimes we may not want to backup certain apps.

A whitelist with all apps selected by default would work well.

This could somehow be integrated into #69 as well, to directly allow editing that list after entering edit mode by pressing a button on the top or a floating button or something like that.

It could also allow skipping just APK or data backups for some apps.

Showing the backup size, and allowing to sort by size could be beneficial here.

Make use of signature spoofing

In #8 (comment) you wrote:

Unfortunately, it looks like a backup app not only needs the system-only backup permission, but also needs to access hidden APIs. Google has been cracking down on their usage and the only way I have found to still use them is to sign the backup application with the platform private key.

I am no Android developer and have no big knowledge here, but from what I read, this looks like the same problem the microG project also faced.

They solved it by spoofing googles signature using signature spoofing. Can't you do/use the same (on OSes that support signature spoofing, of course, i.e. basically nearly all microG-compatible builds) to spoof the "platform private key"?

This would make installation way easier, considering you "only" need to install a ZIP then (and allow signature spoofing for this app).
Especially as there already are patch tools that can add that capability to some OSes. (with some effort, but it's still easier than building your own whole device based on the AOSP code)

Enabling and then disabling "backup my data" leads to unremovable error notification

Hi,
First of all, many thanks for making seedvault. We've needed a fully free Android backup solution that doesn't depend on for-profit, centralised services but "just works" for a long time.

Here's the issue i found: i enabled seedvault by activating "Backup my data", then went to pick a location. My Nextcloud server is currently unreachable, so i got an notification "Backup Error: a device backup failed to run". I stopped there and disabled seedvault backups.

But the seedvault notification now won't go away. Or to be more specific, it comes back a few seconds after being dismissed, no matter how many times it's dismissed.

Thanks!

Sign releases

Publishing unsigned releases is not only bad for security, it also doesn't work with the latest AOSP:

I PackageManager: /system/priv-app/Backup changed; collecting certs
W PackageManager: Failed to scan /system/priv-app/Backup: Package /system/priv-app/Backup/Backup.apk has no certificates at entry AndroidManifest.xml

After signing the unsigned APK, the app gets picked up as expected.

No way to access restore UI outside of setupwizard

There is currently no way I can find to restore a backup outside of the setup wizard. This is an issue because it doesn't allow for alternate methods of moving the backup archives to a new device for restore.

For instance if I have my backups on a server and the only way to get them to the phone is sftp, I am unable to restore these backups. I need to install a sftp client and to do that I've had to complete the setup wizard. Now there is no UI available to restore the backups.

I had to use the "Activity Launcher" application to launch the restore UI.

Perhaps change the Backup settings to Backup/Restore and give an option to launch the restore UI?

Edit: Currently using GrapheneOS. If this is a GrapheneOS specific issue I apologize.

Backup work profile (Shelter)

Hi,

I have setup a Android work profile so when I open System -> Backup, the settings app asks in which profile the Seedvault should be opened. Personal profile works as intended. But when I select "Work", it says "Disabled by admin". I am the admin and I did not disable it :) I did a quick grep over frameworks/base, Internet search and logcat. No obvious setting. Do you see a trick to patch Android so that backing up the work profile works?

Keep up the good work!

Improve UX for auto-restore when using removable storage

Auto-restore restores app data when an app is re-installed and had a backup available. When backups are stored on removable storage (something not envisoned/supported by Google) the backup is not available to be restored. Though obvious to technical people, not all users might be aware of it.

So maybe we should explain this to users either once (when setting up removable storage) or every time an app is installed that we have a backup for on removable storage maybe with a heads up notification.

Better progress bar

I feel like we can have a better progress bar, it would be good for UX as well.

Some things

  1. For the user, knowing full backup progress is better if possible. Per-app progress isn't really too helpful tbh.
    I understand that this may involve some sort of global progress tracking given that right now from what I'm told the OS does not report when a particular backup invocation is done.

  2. Seeing random system apps with their package names as Not backed up, maybe we should skip those?

  3. Some apps fail backup, I noticed Maps mailing for example, but that went away in the blink of an eye so I was lucky to see it. Somewhat related to #19
    i.e, I wouldn't know that this app failed without having per-app status shown in the app and seeing that it isn't backed up / last backup date doesn't match.
    Also, I have two apps named "Maps" to make it worse, couldn't tell which one failed, the app would show icon which would help.

Add About page

In the main settings UI, I will add an About link to the three-dot overflow menu. When clicked, a DialogFragment opens showing information such as:

SeedVault Backup

A backup application using Android's internal backup API.

License: Apache2
Written by: Steve Soltys and Torsten Grote
Sponsored by: Calyx Institute for use in CalyxOS
Source Code: https://github.com/stevesoltys/seedvault

Let me know if there should be something else on that screen.

Backup service crashes on startup in Android Pie

This actually causes the operating system to become unusable, since when the service crashes, user is prompted to enter their password again.

11-11 15:06:59.742  4547  5576 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: backup
11-11 15:06:59.742  4547  5576 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String com.stevesoltys.backup.transport.component.BackupComponent.currentDestinationString()' on a null object reference
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at android.os.Parcel.createException(Parcel.java:1948)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at android.os.Parcel.readException(Parcel.java:1910)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at android.os.Parcel.readException(Parcel.java:1860)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at com.android.internal.backup.IBackupTransport$Stub$Proxy.currentDestinationString(IBackupTransport.java:434)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at com.android.server.backup.TransportManager.registerTransport(TransportManager.java:638)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at com.android.server.backup.TransportManager.registerTransport(TransportManager.java:614)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at com.android.server.backup.TransportManager.registerTransportsForIntent(TransportManager.java:550)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at com.android.server.backup.TransportManager.registerTransports(TransportManager.java:520)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at com.android.server.backup.-$$Lambda$pM_c5tVAGDtxjxLF_ONtACWWq6Q.run(Unknown Source:2)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:873)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:193)
11-11 15:06:59.742  4547  5576 E AndroidRuntime:        at android.os.HandlerThread.run(HandlerThread.java:65)

Please add it to F-Droid

Could you please add it to F-Droid?

F-Droid require that everything is compiled from sources and no pre-compiled binary is used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.