AppCleaner: Add shortcut service cache cleaner #1996
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Adds detection and cleaning of shortcut service bitmap caches stored at /data/system_ce/{userId}/shortcut_service/bitmaps/{appId}/.
The system's shortcut service generates and caches these bitmap icons for long-press menus and share dialogs. Some apps can accumulate gigabytes of these cached icons over time, as reported in the GitHub issue where one messaging app created 10GB of 50-100KB PNG files within weeks.
Implementation details:
Multi-user support is automatic - the filter scans all user profiles. The filter requires root access to scan system_ce directories and gracefully handles cases where paths don't exist.
Apps automatically recreate these icons when needed, making them safe to delete without any user-visible impact.
Closes #1980