Questions tagged [backup-agent]

Android class that allows applications to copy the persistent application data to a remote cloud storage. This allows to restore the application data and settings in case the user switches Android devices, re-installs the application or performs a factory reset.

16 questions
8
votes
1 answer

BackupAgent.onRestore not called when re-install app BUT called for bmgr restore command

I am testing my custom BackupAgent. The below is my test in Simulator & Eclipse ADT Test 1 backup & restore using command ---- WORK WELL adb shell bmgr enabled adb shell bmgr backup app_package adb shell bmgr run ---------------------- Run backup…
LHA
  • 9,398
  • 8
  • 46
  • 85
2
votes
0 answers

Proper way of implementing BackupAgentHelper to backup multiple files

For two days I'm trying to get the BackupAgent/BackupAgentHelper to work on Android version below 6.0. My goal is to backup all files in the /data/data/com.package/ folder, either via the com.google.android.backup/.BackupTransportService or the…
babadaba
  • 814
  • 5
  • 20
2
votes
2 answers

Android databackup

I am trying to implement the data backup in my application using data backup api. The onBackup method in the BackupAgent helper class is never called. The Document says that the onBackup() will be called some time in the future. Is there any…
karthick
  • 351
  • 1
  • 5
  • 18
2
votes
1 answer

What's wrong with my BackupAgentHelper implementation?

I'm trying to add backup support to my app, and have set up a subclass of BackupAgentHelper as described in the Data Backup guide. I've compared my code to several other tutorials and SO posts and don't see any problems here: public class…
arlomedia
  • 8,534
  • 5
  • 60
  • 108
2
votes
1 answer

BackupAgentHelper causing data loss

I currently have BackupAgentHelper implemented to backup SharedPreferences. However, occasionally when I release an update I get messages from users saying that the update caused the data in their SharedPreferences to be wiped completely. After…
Jake Ruston
  • 93
  • 1
  • 2
2
votes
0 answers

How to backup App's data on Android over the cloud?

Background I wish to store and restore some settings and other values for an app i'm working on. The problem As it turns out, Android already has a nice feature called "BackupAgent". However, it also seems it's not supported on all devices: Data…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
1
vote
1 answer

Android auto backup - get last backup time

I am using the Android AutoBackup feature in my app. These are my manifest settings.
Nao Kreuzeder
  • 223
  • 6
  • 18
1
vote
0 answers

How to implement my own backup agent in android

I know there's the Android class BackupAgent class which allow users to backup and restore only their own apps data. However, I'm looking for a way to take over the Android's default backup and restore functionality and allow a user to choose a…
LordDraagon
  • 521
  • 12
  • 31
1
vote
1 answer

BackupAgentHelper: onRestore not getting called

I installed the example BackupRestore from this link. https://android.googlesource.com/platform/development/+/0b3758ea4e53f9bfd0b112eaa4a7dd7b7f4040f5/samples/BackupRestore?autodive=0%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F I am unable to restore the…
live-love
  • 48,840
  • 22
  • 240
  • 204
1
vote
0 answers

Android ADB backup APK injection vulnerability

I have gone through below links- https://github.com/irsl/ADB-Backup-APK-Injection/ https://threatpost.com/bug-in-android-adb-backup-system-can-allow-injection-of-malicious-apps/113701/ and found- There’s a severe vulnerability in the way that all…
Android Developer
  • 9,157
  • 18
  • 82
  • 139
1
vote
0 answers

SharedPreferencesBackupHelper for an offline application

I am trying to keep a back up of the sharedPreference for my app that works only offline. I was planning to use SharedPreferencesBackupHelper and BackupAgentHelper API of android but it seems that these api enables the app to back up the shared…
0
votes
0 answers

How to access dataStore() instance inside BackupAgent?

I need to backup data stored in DataStore proto named Authentication, inside this proto i have stored accessToken and i was trying to backup this using BackupAgent but when i try to get instance of datsStore inside BackupAgent then i am…
0
votes
0 answers

Android BackUp API: How to perform database backups/restore thread safe?

I want to perform SQLite database backups/restores. I thought the easiest way was to use the BackUp API. However, the documentation says: However, reading and writing to files on internal storage is not threadsafe. To ensure that your backup agent…
0
votes
1 answer

android:allowBackup=false but BackupAgent still required

I busy designing an app (Android Studio 1.3.1) for Android ver 4.4.2 and would like the app to be started immediately after boot-up. My problem is that it doesn't and on debugging I found that it complains about a missing BackupAgent. I have set…
solarrobor
  • 11
  • 1
  • 6
0
votes
0 answers

Why doesn't Backup Manager finish my backup?

public class MyBackupAgent extends BackupAgentHelper { static final String DB_FILE_NAME = "name"; static final String DB_BACKUP_KEY = "key"; @Override public void onCreate() { FileBackupHelper dbs =…
Felipe Melo
  • 95
  • 1
  • 10
1
2