seedvault-app / seedvault

A backup application for the Android Open Source Project.
1.3k stars 75 forks source link

List of apps that always show backup errors (use for inherently broken apps only) #147

Open grote opened 4 years ago

grote commented 4 years ago

In the app status screen, some apps have been reported to always produce errors (red circle icon).

K/V Backup without any data

These apps claim to support backups (old style key-value), but when the system tries to back them up, their backup agent is not giving any data, so the OS won't even call our transport again.

Example Logcat:

system_process D/KeyValueBackupTask: Starting key-value backup of com.waze
system_process D/BackupManagerService: [UserID:0] awaiting agent for ApplicationInfo{5647c82 com.waze}
com.stevesoltys.seedvault I/BackupNotificationManager: 30/130 - 23% - Clash of Clans
system_process I/ActivityManager: Start proc 7677:com.waze/u0a119 for backup {com.waze/com.waze.WazeBackupAgent}
system_process I/ActivityManager: Start proc 7730:com.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0/u0i6 for  {com.waze/org.chromium.content.app.SandboxedProcessService0:0}
system_process D/BackupManagerService: [UserID:0] agentConnected pkg=com.waze agent=android.os.BinderProxy@7a0b79b
system_process I/BackupManagerService: [UserID:0] got agent android.app.IBackupAgent$Stub$Proxy@4419738
system_process D/KeyValueBackupTask: Invoking agent on com.waze
system_process D/KeyValueBackupTask: Data file: /data/cache/backup_stage/com.waze.data
com.stevesoltys.seedvault D/ApkBackup: Backed up new APK of com.waze with version 1022127.
com.stevesoltys.seedvault I/BackupCoordinator: Get backup quota for com.waze. Is full backup: false.
com.stevesoltys.seedvault I/BackupCoordinator: Reported quota of 10485760 bytes.
system_process V/KeyValueBackupTask: Agent call doBackup() returned RemoteResult{0}
system_process I/KeyValueBackupTask: No backup data written, not calling transport
com.stevesoltys.seedvault I/NotificationBackupObserver: Completed. Target: com.waze, status: 0

Backup agent in Play Services

system_process D/KeyValueBackupTask: Starting key-value backup of com.google.android.apps.maps
system_process D/BackupManagerService: [UserID:0] awaiting agent for ApplicationInfo{292c908 com.google.android.apps.maps}
com.stevesoltys.seedvault I/BackupNotificationManager: 27/130 - 21% - System UI
system_process W/NotificationHistory: Attempted to add notif for locked/gone/disabled user 0
system_process I/ActivityManager: Start proc 7558:com.google.android.apps.maps/u0a120 for backup {com.google.android.apps.maps/com.google.android.apps.gmm.backup.GmmPersistentBackupAgentHelper}
system_process D/BackupManagerService: [UserID:0] agentConnected pkg=com.google.android.apps.maps agent=android.os.BinderProxy@a43abe4
system_process I/BackupManagerService: [UserID:0] got agent android.app.IBackupAgent$Stub$Proxy@387d84d
system_process D/KeyValueBackupTask: Invoking agent on com.google.android.apps.maps
system_process D/KeyValueBackupTask: Data file: /data/cache/backup_stage/com.google.android.apps.maps.data
com.stevesoltys.seedvault D/ApkBackup: Backed up new APK of com.google.android.apps.maps with version 1052201240.
com.stevesoltys.seedvault I/BackupCoordinator: Get backup quota for com.google.android.apps.maps. Is full backup: false.
com.stevesoltys.seedvault I/BackupCoordinator: Reported quota of 10485760 bytes.
system_process V/KeyValueBackupTask: Agent call doBackup() returned RemoteResult{-1}
system_process W/KeyValueBackupTask: Agent com.google.android.apps.maps error in onBackup()
com.stevesoltys.seedvault I/NotificationBackupObserver: Completed. Target: com.google.android.apps.maps, status: -1003

To investigate

Old ticket: https://github.com/stevesoltys/seedvault/issues/68

chirayudesai commented 4 years ago
ForceGT commented 3 years ago

I think WhatsApp doesn't use the allowBackup flag which actually allows Android's native implementation for backup to go in and grab all the data from /data/ and convert it to the .ab file. I mean atleast adb backup works that way. And there are many projects which as a workaround install the older version of WhatsApp which has the allowBackup set to true in the manifest which technically does allow backups and returns some data rather than blank. Just thought I should add in my two cents on the matter here

vbooka1 commented 1 month ago

Hello, I have a red circle with ! exclamation mark for one app that weights 8.2 GB. There is no any text message, just the icon. I have more than enough free space for a local backup. And, of course, the "Unlimited app quota" checkbox is toggled on. There is only one app with that red "!" circle, and this is the largest app on my phone. Maybe there is some hidden hardcoded limit for a single app like 4 GB maximum?

How do I check the backup logs?

grote commented 1 month ago

How do I check the backup logs?

expert settings where you toggled an "Unlimited app quota".

However, 8.2 GB is a lot to back up. What backup location to you back up to? Something internet based? A FAT32 file-system maybe?

vbooka1 commented 1 month ago

What backup location to you back up to? Something internet based? A FAT32 file-system maybe?

No, that's the first thing I've thought about - something like FAT32 limit of 4GB per file, but I make backup to the local storage which should be F2FS or EXT4 or something like that.

09-23 22:33:33.345  1551 24206 D BackupManagerService: Calling doFullBackup() on com.divessi.ssi
...
09-23 22:38:33.377  1551  3591 D BackupManagerService: Timeout message received for token=641a14ad
09-23 22:38:33.377  1551  3591 V LifecycleOperationStorage: [UserID:0] Cancel: token=641a14ad
09-23 22:38:33.377  1551  3591 W PFTBT   : Full backup cancel of com.divessi.ssi

The time difference between start and timeout error is exactly 5 minutes, is that a hardcoded value?

vbooka1 commented 1 month ago

Well, of course it is a hardcoded value because it is a "timeout".

com.divessi.ssi

It is an application with books about diving (SCUBA, freediving, etc) and marine ecology, where each "book" is actually an offline website consisting of hundreds of separate files - html, css, images, movies, et cetera. If you would download multiple books you will have up to several thousands of files, so I believe the underlying problem is not the total size of the application but the amount of files: it takes just too long to create an archive of a directory with thousands of files inside.

Please consider making a larger timeout, 10 minutes maybe?

grote commented 1 month ago

The time difference between start and timeout error is exactly 5 minutes, is that a hardcoded value?

Yes, this is what the system gives us to finish a backup. What ROM do you use?

ROMs should have the option to increase those timeouts. I wrote about this here: https://github.com/seedvault-app/seedvault/issues/564#issuecomment-1753285697

You may be able to bump them with adb.

vbooka1 commented 1 month ago

What ROM do you use?

GrapheneOS Android 13

ROMs should have the option to increase those timeouts. I wrote about this here: https://github.com/seedvault-app/seedvault/issues/564#issuecomment-1753285697

I'm afraid there is no such option in GrapheneOS flavor of Android. I've checked GrapheneOS Android 14 on another phone and did not find it either, the only difference from Android 13 is a new option in the expert settings, "Device-to-device backup".

grote commented 1 month ago

You then need to take it up with your ROM to increase those timeouts or the app developer to only include essential files in the backup (nothing that can be downloaded again).

vbooka1 commented 1 month ago

The whole point of making a backup is to not to download 8 gigabytes again...