Encrypted .aze files inside a moved folder can no longer be decrypted ("Failed to decrypt")
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 75/100
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:
- Create
/sdcard/F1/a.txtwith some text, and an empty folder/sdcard/Dest. - In Amaze, encrypt
F1/a.txtwith the Amaze format (.aze), then delete the plaina.txt. - (Control) Decrypting
F1/a.txt.azein place shows the password dialog and, with the correct password, restores the original text. - Tap ⋮ on
F1→ Cut, openDest, tap PASTE. The file is now at/sdcard/Dest/F1/a.txt.aze. - Open
Dest/F1and decrypta.txt.aze. - 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".
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) usefindAndReplaceEncryptedEntry, 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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TeamAmaze/AmazeFileManager
-
Copying or moving a folder into itself fails but leaves an empty subfolder behindPossibly taken @carrerasdarren-cell claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
TeamAmaze/AmazeFileManager#4731 ·
Maintainers usually reply within 1 day
-
Area-UIUX Issue-Bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
TeamAmaze/AmazeFileManager#4723 · 4 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Area-FileOperations Issue-Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
TeamAmaze/AmazeFileManager#4131 · 1 reaction ·
Maintainers usually reply within 1 day
-
Issue-Task (low)
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
TeamAmaze/AmazeFileManager#4755 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
TeamAmaze/AmazeFileManager#4754 ·
Maintainers usually reply within 1 day
All issues in TeamAmaze/AmazeFileManager
Similar issues
-
staticAssetsPath follows symlinks outside the directory on WindowsPossibly taken @ybelMekk claimed this today. Openbug security findings
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
navikt/mock-oauth2-server#1132 ·
Maintainers usually reply within 1 day
-
a:plugin-description
Difficulty 1/5 Under an hour Newbie friendliness 76/100
gradle/plugin-portal-requests#319 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
SimonHalvdansson/Harmonic-HN#399 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
[Request] 李跳跳Openrequest-adaption
Difficulty 2/5 Under an hour Newbie friendliness 78/100
BetterAndroid/android-notification-icon-project#799 ·
Maintainers usually reply within 1 day