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

Shizuku Doesn't Work - App Cleaner #1390

Closed
SyCoREAPER opened this issue Sep 8, 2024 · 9 comments
Closed

Shizuku Doesn't Work - App Cleaner #1390

SyCoREAPER opened this issue Sep 8, 2024 · 9 comments
Labels
ADB ADB/Shizuku related api: 34 A14 (Upside Down Cake) bug Something isn't working as expected c: AppCleaner

Comments

@SyCoREAPER
Copy link

Describe the bug
Shizuku is not used to process App Cache Cleaning. Reverts to Accessibility despite Shizuku having granted access. Also Logs cannot be recorded/generated in Shizuku mode to help you troubleshoot. May occur with other nodes but I only use the App Cleaner.

To Reproduce
Steps to reproduce the behavior:
Setup app. Select use Shizuku. Grant Access from Shizuku prompt. Run SDMaid. App Cleaner. Search for Cache. Delete Cache.

Expected behavior
Cache should be cleared in the background. It appears to fail and revert to Accessibility.

Smartphone (please complete the following information):

  • Device: Samsung
  • OS: Android 14
  • Root status: No. Shizuku Only.
  • SD Maid 2/SE version: Current SDMaid SE. Has not worked since purchase 3 months ago.

Debug log
Debug log runs, produces a 0KB file, IOW, nothing. Debug log works in non-Shizuku mode.

Screenshots/Video
N/A

Additional context
Full/Paid SDMaid SE

@SyCoREAPER SyCoREAPER added bug Something isn't working as expected triage This ticket needs to be sorted and labeled. labels Sep 8, 2024
@d4rken d4rken added c: AppCleaner api: 34 A14 (Upside Down Cake) ADB ADB/Shizuku related and removed triage This ticket needs to be sorted and labeled. labels Sep 8, 2024
@d4rken
Copy link
Member

d4rken commented Sep 8, 2024

Not being able to record logs in Shizuku mode is a weird bug 🤔 Turning on the debug log recording, should theoretically also turn on the logcat logger. If you can record a logcat directly through ADB it might help shed some light one the cause.

The accessibility service is still used with Shizuku, if you are including system apps. Can you? If system apps are not included, then the accessibility service should not launch when using Shizuku.

@SyCoREAPER
Copy link
Author

I mean logs in your app don't work with Shizuku enabled.

In regards to System apps, no system apps. It triggers Accessibility on user apps from the play store. I recorded the screen and played back in slow motion to make sure I didn't miss anything.

@d4rken
Copy link
Member

d4rken commented Sep 14, 2024

Debug logs should be fixed via #1401 👍

Are you selecting "Delete" from the Dashboard?
Shizuku only works when selecting all apps, and all apps user apps.

Selecting single apps will fallback to the accessibility service.

Cleaning all apps via Shizuku works like this:

  • If the app has public cache in Android/data then we delete that directly via ADB-level access through Shizuku
  • If the app has private cache (and all apps are selected) then we call the system trimCache API.
  • Now we wait and monitor all apps and wait for their size to change, to indicate that the trimCache is successful (there is sadly no better API)
  • At the latest after 10 seconds (timeout) if there are any apps, for which the size has not changed, we clear these via accessibility

@SyCoREAPER
Copy link
Author

I'll have to run a log next time around if it's fixed.

I just deleted every app cache one by one and every time it was Accessibility.

@d4rken
Copy link
Member

d4rken commented Nov 28, 2024

Is this still a current issue?

@SyCoREAPER
Copy link
Author

Is this still a current issue?

Thanks for following up, figured this was closed but was going to reach out yesterday.

Yes and No.

Release/Beta is not. The newest RC is leaps and bounds better. Feel like freeloader using the FOSS version (despite having paid for GP version). Shizuku is as the log says way faster now and works consistently. Amazing job, huge props!

One curiosity is the accessibility in the RC doesn't clear all apps cache. I ran it 4 times on inactive/not used in a long time (but still enabled state) apps. Same 48 apps have their cache during repeated scans.
Same goes for empty folders and curiously one games logs. Some empty folders I can understand but there are bunch from no longer installed apps. For the game, logs cleared for all but the one.
Accessibility missing those 48 is a bigger issue in my mind over a few tiny logs and empty folders.

Subscription in GP for my parents phones each as well, like it that much. As I mentioned, you put a s-ton of work in and yet have a very reasonable subscription fee that isn't greedy and still update, reply to tickets and GitHub. That smaller fee vs greedy devs allowed me to get more subscriptions and willingness/happy to do so.

Otherwise again, amazing work, keep it up. This app is invaluable.

@d4rken
Copy link
Member

d4rken commented Nov 28, 2024

Don't know about the accessibility issue you are describing. We have to distinguish between two cases:

  • SD Maid is not clicking the button correctly
  • Clicking the button does not clear all cache

The first I can fix, the second one I can not, what happens when the clear cache button is clicked, is up to the system (#1136 might help here).

I'm closing this ticket as it seems to be fixed.

If you think the other issues are worth following up upon, please create new tickets with debug logs.

Thanks for your support ☕🫶

@d4rken d4rken closed this as completed Nov 28, 2024
@SyCoREAPER
Copy link
Author

Don't know about the accessibility issue you are describing. We have to distinguish between two cases:

  • SD Maid is not clicking the button correctly
  • Clicking the button does not clear all cache

The first I can fix, the second one I can not, what happens when the clear cache button is clicked, is up to the system (#1136 might help here).

I'm closing this ticket as it seems to be fixed.

If you think the other issues are worth following up upon, please create new tickets with debug logs.

Thanks for your support ☕🫶

That does appear to be the case with the cache. I tried clearing one of the ones that pops up again

Obviously the simplest solution is not to click it again but can the scan have a cool down where it ignores previously cleared cache in say past 15 minutes or 1 hour and basically just hides them?

Anyway thanks for the above and solid Release Candidate, seems very stable to me for being RC

@d4rken
Copy link
Member

d4rken commented Nov 29, 2024

Obviously the simplest solution is not to click it again but can the scan have a cool down where it ignores previously cleared cache in say past 15 minutes or 1 hour and basically just hides them?

Then users would accuse of dishonest things...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADB ADB/Shizuku related api: 34 A14 (Upside Down Cake) bug Something isn't working as expected c: AppCleaner
Projects
None yet
Development

No branches or pull requests

2 participants