Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#4,753 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
android, kotlin
Domain
backend, mobile

Research direction

Start with MoveFilesTask.onMovedCorrectly in app/src/main/java/com/amaze/filemanager/asynchronous/asynctasks/movecopy/MoveFilesTask.kt and compare its same storage path with CopyService.findAndReplaceEncryptedEntry in app/src/main/java/com/amaze/filemanager/asynchronous/services/CopyService.java. Trace how encryption records are updated and inspect related move and encryption tests. Done when moving a folder within the same storage updates records for encrypted files recursively, so the moved files can be decrypted.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 17h
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TeamAmaze/AmazeFileManager

All issues in TeamAmaze/AmazeFileManager

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.