deltazefiro / Amarok-Hider

Hide your private files and apps with a single click.
https://deltazefiro.github.io/Amarok-doc/en-US/
Apache License 2.0
1.34k stars 46 forks source link

[BUG] Obfuscation (Encryption And Decryption) Bug. #121

Closed atikattar1104 closed 4 months ago

atikattar1104 commented 6 months ago

Description :-

When It Comes To Large Amount Of Files And Folders (Approx. More Than 750MB),

  1. Most Files And Folders Are Encrypted And Obfuscated Properly, But Only Some Files And Folders (Very Small Number Of Them) Are Left Untouched, Leaving Them Vulnerable To Direct Access.

  2. Same For Decryption, Most Files And Folders Are Decrypted And Deobfuscated Properly, But Some Files And Folders (Very Small Number Of Them) Are Left Untouched, Leaving Them Inaccessible To Normal User.

This Only Happens Occasionally (Once In 50-100 Times Of Hiding And Unhiding). Otherwise Works Normally.

This Also Applies To Folders With Huge Number Of Subdirectories.

Steps to reproduce the behavior :-

Reproduction Not Possible, Since Occasional Occurence Of Bugs.

Expected behavior :-

If Large Amount Of Files, And Folders With Large Amount Of Subdirectories Are Supported, All Files And Folders Should Be Obfuscated And Deobfuscated, Without A Bug Like This.

Basic Information :-

Additional context :-

The Only Workaround To Fix The Affected Files And Folders Is To

In Case Of "1." :-

Hide Them On Different Folder, Then Move Or Copy The Obfuscated Data To Folder With Large Data, To Store Data At It's Original Space.

In Case Of "2." :-

Move Or Copy The Failed Unhide Operation's Obfuscated Data To Different Folder, Then Re Perform Unhide Operation, To Make Original Data Accessible Again.

deltazefiro commented 6 months ago

Hi @atikattar1104 👏, thank you for bringing this to my attention.

Two likely explanations:

  1. A file or folder with the same name might already exist in the specified path. i.e. if you obfuscated a file named log.txt to a3hdjj!amk, and another application creates a new file named log.txt in the same folder, there will be a conflict when Amarok attempts to revert a3hdjj!amk back to log.txt, as a file with that name already exists.
  2. The obfuscated name could be excessively long. Amarok use base64 encoding for filenames, which can result in longer obfuscated names. This might surpass the maximum filename length allowed for Android files.

If you could provide logs at the time of the issue, it would help me identify the issue more effectively :D

atikattar1104 commented 6 months ago

Oh! Ok. I Think The First One Might Be The Reason Of This Issue. I Actually Was Trying To Hide The Folder Which Does Actually Have Files With Same Name. Probably That's Why This Happens.

I Will Try To Recreate The Same With Test Data, And Extract The Logs For The Same.

atikattar1104 commented 4 months ago

Hi. Its Been A Long Time. I Wasn't Able To Keep An Update On This Issue, Since I Had My Exam Going.

It Seems Like The Issue Is Of My OS+Hardware. Recently, I Was Trying To Do Some Same Type Of Operation (Data Convertion - Like Operation) On Another App, And Noticed Same Happening.

I Suspected About Lack Of Memory, Since My Phone Only Have 2GB Of RAM, And A Lot Of It Is Consumed By System Services And Other Necessary Apps, As Well As, I Was Actually Facing Issues Of Memory For The Past 1 Year.

So I Tried Using A Proprietary File Shredder, Which Does Mass Operations (A Kind Of Same Type Of Operation) On Huge Amount Of Files. And I Noticed Same Type Of Behaviour. I Also Noticed Heavy Spikes In Memory Usage, And Several System Apps + Some Background User Apps + That File Shredder App Crashes, As I Was Testing It.

Although, I Tried Amarok App With Other Phones, And It Is Working Fine.

I Actually Love How Amarok Does Work, But Due To My Lack Of Necessary Resources, I May Need To Wait Until I Get Myself A New Phone😅.

Sorry For The False Alarm, And Thanks For Maintaining Such Wonderful App❤️.

Closing This Issue As Complete.