Skip to content

Final Build with App icon, Theme and Accent colour

Choose a tag to compare

@jackhallloween21 jackhallloween21 released this 01 Sep 14:11
· 10 commits to main since this release
126b3ac

App icon support in app manager by pushing dex file
The same technique scrcpy uses: push a small .dex, run it with app_process so it gets real PackageManager access, render each icon Drawable to a PNG and base64 it back over stdout.
The on-device helper. A ~4 KB dex (com.companion.IconExtractor) is pushed once to /data/local/tmp/ and run with CLASSPATH=… app_process /system/bin … — exactly how scrcpy launches its server. That gives it a real PackageManager, so for each package it calls getApplicationIcon(), rasterizes the drawable to a 72×72 PNG, base64-encodes it, and prints one ICON:: line. No APK ever leaves the phone.

The desktop side. A new apps:icons IPC channel (main → preload → renderer) validates every package name against PKG_RE before it touches the app_process command line, pushes the dex once per device (shared across batched calls, retryable on failure), and parses stdout with parseIconDump. The renderer requests icons in batches of 40 after the list renders, then fades each real icon in over its monogram tile as it arrives — with an epoch+serial guard so switching devices mid-fetch can't paint stale icons.