Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

d4rken
Copy link
Member

@d4rken d4rken commented Nov 6, 2024

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
16 checks passed
@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