Andotp: Android backup can cause data loss if relied on between 2 re-installs

Created on 28 May 2019  路  10Comments  路  Source: andOTP/andOTP

A while back I noticed whilst having to twice reinstall my phones OS that when you restore from the Android backup service, the settings arent being backedup/restored, this can mean that if you restore and then have to wipe your device again, it is possible that the default setting of using android backup is set to false and the data on google backup is wiped.

The fast solution would be to set the default value of settings_key_enable_android_backup_service in app/src/main/res/xml/preferences.xml to true, this would guarantee that when you restore a previous backup android keeps backing up your data.

There is then a further task to investigate if and/or why the preferences arent getting restored

enhancement help wanted

All 10 comments

I think it's a good choice to enable it by default. If you have the backup service enabled on your phone then it's reasonable to assume that you want all your apps data backed up anyways.

What are your thoughts on removing the choice completely? Essentially allowing us to not have a custom BackupAgent and use the default one

By not having choice, I mean having it backup always when enabled on the OS

That would be fine for me as well to be honest. I think that's the way most apps do it.

Cool, will whip up a PR request over the weekend

As mentioned in the PR, I don't this is an issue anymore

@flocke After an inpromptu rom reinstall I just had this happen again, luckly I had a backup, but it now makes me think we should take this PR and have backup agent by default

Hello, Anything I can do to help get #342 and #345 in?

@RichyHBM Not really, they both look good. I just want to wait until after the next stable release before merging new stuff. It should be release this weekend, after that I will merge the PRs.

I'm gonna move this to the next milestone since we merged #342 but keep it open to keep track of simplifying the BackupAgent.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

krc picture krc  路  4Comments

asmw picture asmw  路  8Comments

fakkoweb picture fakkoweb  路  4Comments

ageev picture ageev  路  4Comments

aph3rson picture aph3rson  路  6Comments