[Bug] 8.3.12 crashes after selection of backup directory
Guidelines
- [x] I have read the FAQ and it doesn't cover the issue.
- [x] I have searched the issue tracker for open and closed issues that are similar to the feature request I want to file, without success.
- [x] I'm on the latest version.
- [x] I'm not using a test build (alpha/beta/release-candidate).
- [x] This issue contains only one bug.
Describe the bug
Just updated from 8.3.11 to 8.3.12. After starting the app again it asks me to select the backup folder and then immediately crashes.
03-29 15:47:53.043 22422 22422 E AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1125625207, result=-1, data=Intent { dat=content://com.android.externalstorage.documents/... flg=0xc3 }} to activity {com.machiav3lli.backup/com.machiav3lli.backup.ui.activities.NeoActivity}: javax.crypto.AEADBadTagException
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:5741)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.app.ActivityThread.handleSendResult(ActivityThread.java:5780)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:69)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:60)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:195)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:157)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:90)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2544)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:232)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.os.Looper.loop(Looper.java:317)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8501)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: Caused by: javax.crypto.AEADBadTagException
03-29 15:47:53.043 22422 22422 E AndroidRuntime: Caused by: javax.crypto.AEADBadTagException
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:634)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at javax.crypto.Cipher.doFinal(Cipher.java:2132)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.decryptInternal(Unknown Source:27)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.decrypt(Unknown Source:5)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at coil.ImageLoader$Builder.read(Unknown Source:38)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at androidx.work.impl.WorkerWrapper$Builder.readMasterkeyDecryptAndParseKeyset(Unknown Source:30)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at androidx.work.impl.WorkerWrapper$Builder.build(Unknown Source:56)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at com.machiav3lli.backup.data.entity.Pref$Companion.getPrefs(Unknown Source:264)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at com.machiav3lli.backup.data.entity.Pref$Companion.setPrefString(Unknown Source:23)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at com.machiav3lli.backup.data.entity.StringPref.setValue(Unknown Source:14)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at com.google.android.material.sidesheet.LeftSheetDelegate.setBackupDir(Unknown Source:29)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at org.koin.android.ext.koin.KoinExtKt$$ExternalSyntheticLambda0.invoke(Unknown Source:277)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at androidx.compose.runtime.snapshots.Snapshot$Companion$$ExternalSyntheticLambda0.onActivityResult(Unknown Source:10)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at androidx.activity.ComponentActivity$activityResultRegistry$1.dispatchResult(Unknown Source:48)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at androidx.activity.ComponentActivity.onActivityResult(Unknown Source:2)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at androidx.appcompat.app.AppCompatActivity.onActivityResult(Unknown Source:5)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.app.Activity.dispatchActivityResult(Activity.java:9117)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:5734)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: ... 14 more
03-29 15:47:53.043 22422 22422 E AndroidRuntime: Caused by: android.security.KeyStoreException: Signature/MAC verification failed (internal Keystore code: -30 message: system/security/keystore2/src/operation.rs:852: KeystoreOperation::finish
03-29 15:47:53.043 22422 22422 E AndroidRuntime:
03-29 15:47:53.043 22422 22422 E AndroidRuntime: Caused by:
03-29 15:47:53.043 22422 22422 E AndroidRuntime: 0: system/security/keystore2/src/operation.rs:428: Finish failed.
03-29 15:47:53.043 22422 22422 E AndroidRuntime: 1: Error::Km(r#VERIFICATION_FAILED)) (public error code: 10 internal Keystore code: -30)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:416)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.security.KeyStoreOperation.handleExceptions(KeyStoreOperation.java:79)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.security.KeyStoreOperation.finish(KeyStoreOperation.java:132)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer$MainDataStream.finish(KeyStoreCryptoOperationChunkedStreamer.java:228)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:181)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.security.keystore2.AndroidKeyStoreAuthenticatedAESCipherSpi$BufferAllOutputUntilDoFinalStreamer.doFinal(AndroidKeyStoreAuthenticatedAESCipherSpi.java:396)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:626)
03-29 15:47:53.043 22422 22422 E AndroidRuntime: ... 31 more
03-29 15:47:53.045 1368 2977 W ActivityTaskManager: Force finishing activity com.machiav3lli.backup/.ui.activities.NeoActivity
Expected Behavior
No crash at all.
Neo Backup's Version
8.3.12
Installation Source
Official F-Droid repo
Last Known Working Version
8.3.11
Relevant information
- Device: AC2003
- Android Version: 14
- ROM: (AOSP, CalyxOS, MIUI, GOS...) LOS
It seems for some reason that your system has changed the key provided from the Android KeyStore or the pref value kept behind it. Does installing a new results any issues?
It seems for some reason that your system has changed the key provided from the Android KeyStore or the pref value kept behind it.
Why should it have changed it? The app worked without any complaints until the update.
It was only broken by the update.
Does installing a new results any issues?
I had enough effort to restore the old working version. The app cannot restore its settings from the backup.
It was only broken by the update.
Not really
03-29 15:47:53.043 22422 22422 E AndroidRuntime: Caused by: android.security.KeyStoreException: Signature/MAC verification failed (internal Keystore code: -30 message: system/security/keystore2/src/operation.rs:852: KeystoreOperation::finish
This shows that the system had change of MAC or the app got a new signature. So the issue seemed to be update related, because the change happend to similar time to the update. So do you use any root tools (e.g. magisk modules, xposed etc..) that would change/overwrite the MAC or signature of your system/apps?
I have the same issue. Upgraded from .10 to .12 and the app crashes after selecting the backup directory. I do use LSPosed but it is NOT enabled for Neo Backup (or for whatever file manager it uses to select the backup folder).
@aiolos01 crashlog? Also do you have LuckyPatcher or specific lsposed modules?
I'm using Magisk to provide root access to Neo Backup and other programs. No patching of apps at all.
App signature did not change, otherwise Android's package installer would have complained about different signature.
Some changes in the App from February 2025 are related to the backup folder. I have not yet found out which one causes the configured backup folder to no longer be accepted and a new query is issued.
@eku KeyStore uses not the app signature in that sense, rather creates a signature for each new installation (so it kinda compute a signature after an app was installed for the first time). And then again, there's no real changes on the backup folder handling logic, as this didn't happen to most users. Which is why am trying to figure out what's unique on your side…Did you happen to disable the system file manager "files"?
Did you happen to disable the system file manager "files"?
No, it's not disabled and pops up to select the backup folder.
I did not change anything on the device and previous updates of this app did not show this.
Same issue here.
My device: Fairphone 3 with LSPosed 1.8.5 riru with Magisk on /e/OS 1.4.
Neo Backup 8.3.12 is unable to access the backup folder, causing countless error messages. When prompted to assign a backup folder, after assigning it, NeoBackup crashes.
Crash log added.
@aiolos01 crashlog? Also do you have LuckyPatcher or specific lsposed modules?
No luckypatcher. The only LSPosed module I use is XPrivacyLua. But as I said LSPosed hooking is disabled for Neo bavkup. Where do I get the ctashlogs?
Same issue here.
My device: Fairphone 3 with LSPosed 1.8.5 riru with Magisk on /e/OS 1.4.
Neo Backup 8.3.12 is unable to access the backup folder, causing countless error messages. When prompted to assign a backup folder, after assigning it, NeoBackup crashes.
Crash log added.
Hello machiav3lli, I've added my Crash log. See above.
I've also been hit by this — on two phones Samsung Fold 5 and 6.
For whatever reason this happens when updating an already installed instance.
Once you clear NeoBackups cache and data, it'll let you pick the backup directory without crashing.
I have restored a Titanium Backup of Neo-Backup 8.3.10 and everything is running fine again, barring the activity protocoll, which has never worked.
Not working here either, crashes upon selection of backup folder
I have restored a Titanium Backup of Neo-Backup 8.3.10 and everything is running fine again, barring the activity protocoll, which has never worked.
Restoring the app from backup work-arounds the initial problem. Unfortunately NeoBackup cannot restore itself.