What is expected?
Correctly backup codes when using the backup feature.
What does happen instead?
The backup doesn't work, I tried all possibilities:
This feature (using OpenPGP) always correctly worked for me, until now. I recently updated to Android 10, I don't know if this is related.
The logs indicate a permission issue, but andOTP has access to the storage, I checked its permissions.
And I wasn't able to retry after wiping the app cache as suggested, as obviously I have codes which aren't backuped in the app.
Here is the logcat for the OpenPGP case:
04-23 21:22:32.249 32445 32445 W System.err: java.io.FileNotFoundException: open failed: EACCES (Permission denied)
04-23 21:22:32.249 32445 32445 W System.err: >路路at android.os.ParcelFileDescriptor.openInternal(ParcelFileDescriptor.java:315)
04-23 21:22:32.249 32445 32445 W System.err: >路路at android.os.ParcelFileDescriptor.open(ParcelFileDescriptor.java:220)
04-23 21:22:32.249 32445 32445 W System.err: >路路at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1498)
04-23 21:22:32.249 32445 32445 W System.err: >路路at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1338)
04-23 21:22:32.250 32445 32445 W System.err: >路路at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1286)
04-23 21:22:32.250 32445 32445 W System.err: >路路at org.shadowice.flocke.andotp.Utilities.StorageAccessHelper.saveFile(StorageAccessHelper.java:19)
04-23 21:22:32.250 32445 32445 W System.err: >路路at org.shadowice.flocke.andotp.Utilities.StorageAccessHelper.saveFile(StorageAccessHelper.java:35)
04-23 21:22:32.250 32445 32445 W System.err: >路路at org.shadowice.flocke.andotp.Activities.BackupActivity.doBackupEncrypted(BackupActivity.java:582)
04-23 21:22:32.250 32445 32445 W System.err: >路路at org.shadowice.flocke.andotp.Activities.BackupActivity.handleOpenPGPResult(BackupActivity.java:628)
04-23 21:22:32.250 32445 32445 W System.err: >路路at org.shadowice.flocke.andotp.Activities.BackupActivity.backupEncryptedWithPGP(BackupActivity.java:617)
04-23 21:22:32.250 32445 32445 W System.err: >路路at org.shadowice.flocke.andotp.Activities.BackupActivity.showSaveFileSelector(BackupActivity.java:381)
04-23 21:22:32.250 32445 32445 W System.err: >路路at org.shadowice.flocke.andotp.Activities.BackupActivity.saveFileWithPermissions(BackupActivity.java:398)
04-23 21:22:32.250 32445 32445 W System.err: >路路at org.shadowice.flocke.andotp.Activities.BackupActivity.access$200(BackupActivity.java:72)
04-23 21:22:32.250 32445 32445 W System.err: >路路at org.shadowice.flocke.andotp.Activities.BackupActivity$6.onClick(BackupActivity.java:182)
04-23 21:22:32.250 32445 32445 W System.err: >路路at android.view.View.performClick(View.java:7259)
04-23 21:22:32.251 32445 32445 W System.err: >路路at android.view.View.performClickInternal(View.java:7236)
04-23 21:22:32.251 32445 32445 W System.err: >路路at android.view.View.access$3600(View.java:801)
04-23 21:22:32.251 32445 32445 W System.err: >路路at android.view.View$PerformClick.run(View.java:27892)
04-23 21:22:32.251 32445 32445 W System.err: >路路at android.os.Handler.handleCallback(Handler.java:883)
04-23 21:22:32.251 32445 32445 W System.err: >路路at android.os.Handler.dispatchMessage(Handler.java:100)
04-23 21:22:32.251 32445 32445 W System.err: >路路at android.os.Looper.loop(Looper.java:214)
04-23 21:22:32.251 32445 32445 W System.err: >路路at android.app.ActivityThread.main(ActivityThread.java:7356)
04-23 21:22:32.251 32445 32445 W System.err: >路路at java.lang.reflect.Method.invoke(Native Method)
04-23 21:22:32.251 32445 32445 W System.err: >路路at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
04-23 21:22:32.251 32445 32445 W System.err: >路路at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
04-23 21:22:32.302 32445 32470 W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
04-23 21:22:32.347 32445 32470 W Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
Are you trying to backup to a folder you set in the settings or are you using the system dialog to choose a backup location every time?
I'm trying to backup to a folder defined in the settings. If I remove it, I have a different error: failed to create backup directory
Android 10 changed the behavior of the storage access so the old backup folder in the settings won't work anymore. It's already on my todo list for the next release.
Try removing the folder from the settings then try making a backup again.
I tried removing the folder from the settings, but when I try making a backup again, I have another error: "Failed to create backup directory" (although it might not be exactly these words, I translated the error).
Any other way to backup my codes (adb, whatever), or should I just wait for the 0.7.1 release?
Moved to the v0.8.0 milestone, which will drop support for Android 4.4 and 5.0. That will make it much easier to implement a consistent storage access.
In the meantime, is there a way for me to backup my codes? Even a non user-friendly one?
I feel nervous using 2FA which aren't in my backup, I'm too afraid to lose them :sweat_smile:
If you update to the v0.7.1-beta1 you can display the secrets for your accounts and copy-paste them somewhere safe yourself. Or display the QR code for each account and take a screenshot.
This should now be fixed with the new persistent storage access implemented in 356815d7e76bca3c63b5c6572162d46a293cd87b.