Skip to content

Encrypted .aze files inside a moved folder can no longer be decrypted ("Failed to decrypt") #4753

Open

Description

@XYIheng

Describe the bug
When a folder that contains Amaze-encrypted (.aze) files is moved (Cut → Paste) within the same storage, the saved encryption records of the files inside it are not updated and still point to the old paths. Decrypting a moved file then fails: no password prompt is shown, only a "Failed to decrypt" toast, and nothing is decrypted.

To Reproduce
Steps to reproduce the behavior:

  1. Create /sdcard/F1/a.txt with some text, and an empty folder /sdcard/Dest.
  2. In Amaze, encrypt F1/a.txt with the Amaze format (.aze), then delete the plain a.txt.
  3. (Control) Decrypting F1/a.txt.aze in place shows the password dialog and, with the correct password, restores the original text.
  4. Tap ⋮ on F1 → Cut, open Dest, tap PASTE. The file is now at /sdcard/Dest/F1/a.txt.aze.
  5. Open Dest/F1 and decrypt a.txt.aze.
  6. No password dialog appears and no decrypted file is produced. A "Failed to decrypt" toast is shown.

In explorer.db, the encrypted table still had the record at the old path …/F1/a.txt.aze after the move.

Expected behavior
Moving a folder updates the encryption records of every encrypted file inside it (recursively), so the moved files can be decrypted as before.

Screenshots

After moving F1 into Dest: decrypting Dest/F1/a.txt.aze shows "Failed to decrypt".

Image

Smartphone (please complete the following information):

  • Device: XiaoMi 17 Pro max
  • OS: Android 16
  • Rooted: No
  • Version: 3.11.4

Additional context
Code on the default branch release/4.0 (94afab3):

  • Moves within the same storage finish in MoveFilesTask.onMovedCorrectly. It updates the record only for a selected item whose own name ends in .aze, and does not look inside selected folders: MoveFilesTask.kt#L114-L131
  • Moves that fall back to CopyService (e.g. across storages) use findAndReplaceEncryptedEntry, which does recurse into folders: CopyService.java#L311-L323

So the same-storage move path is the one that misses files inside folders. I only tested a same-storage move of a folder.

Activity

  1. guireviveguirevive-svg commented on Oct 21, 2026

    @guireviveguirevive-svg

    I also encountered this bug, which really annoys me @EmmanuelMess @TranceLove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions