Skip to content

IO: Fix files not being deleted in Android/data despite using Shizuku/Root - #1450

Merged
d4rken merged 1 commit into
mainfrom
android-data-deletion
Nov 6, 2024
Merged

d4rken merged 1 commit into
mainfrom
android-data-deletion

Conversation

@d4rken

@d4rken d4rken commented Nov 6, 2024

Copy link
Copy Markdown
Member

The scan, e.g. listfiles or lookup, would use a different logic to check what access level is needed. Example:
In the CorpseFinder, the scan would use listFiles on Android/data and the Mode.AUTO would resolve to Mode.ADB or Mode.ROOT. Either mode can see files in Android/data and return good results. But the deletion would always hit the javaFile.parentFile?.canExecute() == true -> true case and resolve Mode.AUTO to Mode.NORMAL, i.e. try normal access. Normal access wouldn't see the file in Android/data and then assume that it had already been deleted... :(

…ku/Root

The scan, e.g. listfiles or lookup, would use a different logic to check what access level is needed.
Example:
In the CorpseFinder, the scan would use `listFiles` on `Android/data` and the `Mode.AUTO` would resolve to `Mode.ADB` or `Mode.ROOT`. Either mode can see files in `Android/data` and return good results.
But the deletion would always hit the `javaFile.parentFile?.canExecute() == true -> true` case and resolve `Mode.AUTO` to `Mode.NORMAL`, i.e. try normal access.
Normal access wouldn't see the file in `Android/data` and then assume that it had already been deleted... :(
@d4rken d4rken added bug Something isn't working as expected c: IO SAF/Normal/Root access Root ADB ADB/Shizuku related labels Nov 6, 2024
@d4rken
d4rken merged commit 2f4bacb into main Nov 6, 2024
@d4rken
d4rken deleted the android-data-deletion branch November 6, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ADB ADB/Shizuku related bug Something isn't working as expected c: IO SAF/Normal/Root access Root

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant