Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restoring backup does not work for encrypted data #79

Closed
9YbQiuEohUu1 opened this issue May 10, 2019 · 2 comments
Closed

Restoring backup does not work for encrypted data #79

9YbQiuEohUu1 opened this issue May 10, 2019 · 2 comments
Assignees
Labels

Comments

@9YbQiuEohUu1
Copy link

The app fails to restore backup when the data is encrypted. Only the unencrypted backup is restored successfully. Tested on two devices with different Android versions.

@7LPdWcaW 7LPdWcaW self-assigned this May 10, 2019
@7LPdWcaW 7LPdWcaW added the bug label May 10, 2019
@7LPdWcaW
Copy link
Owner

Are you able to provide any more info as to whats happening? If the app is set to encrypted mode and you backup/restore files backed up within encrypted mode, they should restore correctly. If the data was made before encrypted mode was turned on, it will fail. Due to the way the files are backed up, I dont think would be possible to detect if the file is encrypted or just corrupted.

I will have to think more about this to make a fix.

@9YbQiuEohUu1
Copy link
Author

Here are all the details I have:
I have created several backups, one before turning the encryption on and two or three after. I then wiped the system and flased a new rom, I tried to restore the backup but only the first one (the unencrypted) was restored successfully. Other files just return an error message (unfortunately, I do not remember which one).
It didn't occur to me that I could have tried to turn on encryption on the new device.
Maybe it would be a good idea to add an error message that reads something like "Could not restore - data damaged or encrypted. Try turning the encryption on" or something like that.
Of course, it would be even better if the encrypted backup requested the password immediately upon restoring, if that is even possible. Omni Notes, for example, does exactly this.

7LPdWcaW added a commit that referenced this issue Aug 8, 2019
Merge branch 'fix/encrypted-backups' into develop

* fix/encrypted-backups:
  Adds backup size limit setting
  Adds null catch for decrypt stream
  Replaces checkbox with switch pref and adds support for restoring from encrypted files
  Prevent backup in failsafe mode and file extension for encrypted files
  Adds boolean extentions
  Adds overrides
  Prevents backing up after failed restore
  Adds backup size to selector and adds null/empty check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants