d4rken-org / sdmaid-se

SD Maid 2/SE is Android's most thorough cleaning tool.
https://play.google.com/store/apps/details?id=eu.darken.sdmse
GNU General Public License v3.0
2.77k stars 432 forks source link

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

Closed d4rken closed 2 weeks ago

d4rken commented 2 weeks ago

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... :(