[HOWTO] use Seedvault early to understand Android backup

That makes a lot of sense. LOS (and Google) ROMs offer the “Restore from backup (or another phone)” during first-time setup wizard (so it would also be offered after a data wipe / factory reset. But it is also possible to access the backup functionality at any time. This didn’t seem to be possible in the /e/ R ROMs I was looking at. I may do some more digging when I have the time

1 Like

I was browsing Calyx Repositories today and saw mid-may work on making D2D backups possible in A12. Once /e/ focuses on the next Android version Seedvault finally can be a complete backup solution for the mere mortals.

5 Likes

Hey,

I’ve just picked up this topic and try to enable SeedVault on my device.
It is a Samsung Galaxy A5 (2017) running /e/ OS Version 1.6-r-20221201239576-dev-a5y17lte.

Background:

As this is a non-rooted device (first time for me in several years), I am looking for an actually usable backup solution. Before I just rooted and used oandbackup or NeoBackup when a new phone had arrived.

This way is blocked now for me so I need another option before my phone needs to be replaced.

Following the HowTo I get an exception at this step:

Is this user error or did I miss something I should have done in advance?

mkamp@steiger ~> adb shell am start-activity com.stevesoltys.seedvault/.settings.SettingsActivity
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.stevesoltys.seedvault/.settings.SettingsActivity }

Exception occurred while executing 'start-activity':
java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.stevesoltys.seedvault/.settings.SettingsActivity } from null (pid=27234, uid=2000) requires com.stevesoltys.seedvault.OPEN_SETTINGS
        at com.android.server.wm.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:1043)
        at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:999)
        at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:669)
        at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1105)
        at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1077)
        at com.android.server.am.ActivityManagerService.startActivityAsUserWithFeature(ActivityManagerService.java:3670)
        at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:543)
        at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:185)
        at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
        at android.os.ShellCommand.exec(ShellCommand.java:44)
        at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:10514)
        at android.os.Binder.shellCommand(Binder.java:929)
        at android.os.Binder.onTransact(Binder.java:813)
        at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:5053)
        at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2875)
        at android.os.Binder.execTransactInternal(Binder.java:1159)
        at android.os.Binder.execTransact(Binder.java:1123)

should be this one a bit up the thread

Only debug versions allow it without root. Isn’t the menu item “Backup” available? If not start from adb root

2 Likes

Thank you for the explanation. I think I have to look more deeply into seedvault and re-read this thread a few times to get it :slight_smile:
On my phone, “Backup” is not visible in the system settings GUI. Can you elaborate what you mean by “start from adb root”?

Can I use seedvault from the adb shell to backup single apks with data to my (linux) pc? I think that would be a viable solution for me, I’ll just have to learn a bit more to get comfortable :smile:

1 Like

let’s bump this thread, now that the d2d-transfer feature is implemented and released in version 14-4.0. The initial 2021 top post links a gitlab issue tracking / explaining what d2d is.

When /e/ gets to Android 14 (or backports to A13) and updates the 3 year old shipped Seedvault apk to or past that, users can have a more complete backup solution without any shell affinity or root privileges.

https://github.com/seedvault-app/seedvault/blob/9c4f9d8a67a8091a571d9805ee4bcfd04344c300/CHANGELOG.md#14-40---2024-01-24

  • Add experimental support for forcing “D2D” transfer backups
  • Pretend to be a device-to-device transfer to allow backing up many apps which prevent backup
3 Likes

That would be great. Than I no longer have to depend to third party backup solutions.

Do you have any idea what would be involved in porting to A13?

Is here any chance that /e/ will work on that, or will they just wait for Android 14? (In the past, issues relating to SeedVault haven’t got a lot of attention from /e/)

1 Like

Is there a way to set how many SV backups are stored before old ones get deleted or overwritten? I dindt find one…

As far as I know, only one is stored. If you copy it away, you might be able to create your own history.

Seedvault has the concept of time-based snapshots and when to prune them - the snapshots are logged to a file in the backup directory (“repository”). It’s not user exposed but is set to:

By default we keep 3 daily snapshots and 2 weekly ones (one from this and one from last week) (1 or source)

Here is the snapshot doc section that explains the format and storage design docs.

Problem is, this is the android15-branch docs (but is backported to A14) - /e/ ships a very old prebuilt apk. One cannot contribute prebuilt apks. I’m being a nuisance about this since I opened this thread.

3 Likes

Sounds all very well (except the actuality topic…) to me, at least as I as an amateur user can understand! :upside_down_face:
Thanks!

Can someone enlighten me on whether Seedvault backs up application settings and data? I recently found out that Google’s backups don’t backup application settings and every single app had to be reinstalled and reconfigured. Hopefully that isn’t the case with Seedvault?

With Android 13 T on e/OS/ application data and settings can be backed up if the developer allows it.

since at least the U build / Android 14, /e/OS ships the upstream Lineage Seedvault version (14-4.1 at time of writing). Possibly A13 if the lfs repo was removed from later T builds. Very happy that happened.

Ofc there are still limitations, I continue to wax on about them, but as this thread was originally about very early Seedvault discovery (2021) and then missing device2device support, @manoj I’d welcome you close this thread, it’s not the self closing type.