Skip to content

Conversation

@d4rken
Copy link
Member

@d4rken d4rken commented Oct 26, 2025

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:

  • ShortcutServiceFilter: New filter using path-segment matching for DATA_SYSTEM_CE areas
  • AppScanner: Extended buildSearchMap() to explicitly check shortcut_service paths for each installed package across all user profiles
  • Settings: New toggle (disabled by default) for conservative opt-in approach
  • UI: Uses ic_image_multiple_24 icon with user-friendly label "App shortcut icons" and clear description
  • Tests: Comprehensive coverage including real-world data from Pixel 8

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

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:
- ShortcutServiceFilter: New filter using path-segment matching for
  DATA_SYSTEM_CE areas
- AppScanner: Extended buildSearchMap() to explicitly check shortcut_service
  paths for each installed package across all user profiles
- Settings: New toggle (disabled by default) for conservative opt-in approach
- UI: Uses ic_image_multiple_24 icon with user-friendly label "App shortcut
  icons" and clear description
- Tests: Comprehensive coverage including real-world data from Pixel 8

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
@d4rken d4rken added enhancement New feature, request, improvement or optimization c: AppCleaner Root labels Oct 26, 2025
@d4rken
Copy link
Member Author

d4rken commented Oct 26, 2025

Screenshot from 2025-10-26 08-50-25 Screenshot from 2025-10-26 08-52-18

@d4rken d4rken merged commit da7994f into main Oct 26, 2025
13 checks passed
@d4rken d4rken deleted the 1980-appcleaner-shortcutservice-cache branch October 26, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: AppCleaner enhancement New feature, request, improvement or optimization Root

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean shortcut service icon cache

2 participants