Skip to content

feat: smaller APK — icon/banner and debug page (#181) - #184

Merged
compot-dev merged 3 commits into
v2from
feat/apk-size-181
Oct 15, 2026
Merged

compot-dev merged 3 commits into
v2from
feat/apk-size-181

Conversation

@compot-dev

@compot-dev compot-dev commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

The app part of #181. The APK was already near the floor (v2.07: 110,058 bytes); this takes the small wins that need no build-time step.

  • Launcher icon / TV banner (mipmap/ic_launcher.webp, used as both android:icon and android:banner): 400×400 lossy WebP, 3,932 B → 256×256 lossless WebP, 2,930 B (−1,002 B). The logo is black on white, so the image was resized with Lanczos to 256 px, reduced to 32 grey levels and stored lossless: PSNR 50.4 dB against the resized original, more faithful than lossy q90 (49.4 dB, 3,988 B), and no lossy artefacts around the letters. 256 px is the top of the range in the issue, because the same bitmap is the leanback banner.
  • Debug page (DebugServer.PAGE): it was already written without indentation or comments in the served string, so only the remaining newlines and optional spaces (return '…' → return'…') go: 7,952 B → 7,898 B. Checked: the HTML/CSS part is identical apart from the doctype newline, and the JS parses to the same AST (esprima) before and after. The Javadoc now says the page is served as one line. A Gradle minify step was not worth it for the ~54 B left.
  • AGP metadata: dependenciesInfo { includeInApk = false; includeInBundle = false } and vcsInfo.include = false for release (the commit is already in BuildConfig.GIT_HASH).

Measured on the CI-built APK of this branch: 110,058 → 108,719 bytes (107.5 → 106.2 KiB, −1,339 B, −1.2 %): icon −1,002, META-INF/version-control-info.textproto and the v1 signature entries for it −118, classes.dex −24 compressed (−52 uncompressed), the rest in the zip directory. The ~3 KB in the issue assumed an indented debug page, which it was not.

Not done (see the issue): stripping Log.d would break /log (#96); dropping the v1 signature needs minSdk 24.

To check on a device: the icon and the banner in the leanback launcher (TV box) and on a phone launcher, and that the debug page still works.

Version 2.08.

Part of #181

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Reduce release APK size and serve a compact debug page

✨ Enhancement ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Remove unnecessary release metadata and advance the app to version 2.08.
• Remove whitespace from the embedded debug page without changing its intended behavior.
• The PR also reports a smaller launcher and TV banner asset; its binary change is not in the
 supplied diff.
Diagram

graph TD
  Settings["Release settings"] --> APK["Release APK"] --> Server["Debug server"] --> Page["Compact page"] --> Browser["LAN browser"]
  Icon["Launcher asset"] --> APK
Loading
High-Level Assessment

Keep the direct optimizations: they avoid adding a build-time minification step for a small remaining whitespace saving. Verify the release artifact and debug page on devices, and confirm that the icon binary change described in the PR is included in the full PR diff.

Files changed (2) +64 / -54

Enhancement (1) +54 / -52
DebugServer.javaServe the embedded debug page without line breaks +54/-52

Serve the embedded debug page without line breaks

• Removes newlines and optional spaces from the embedded HTML and JavaScript string. Documents the statement-boundary assumption that allows the JavaScript lines to be joined.

android/app/src/main/java/com/openipc/decoder/DebugServer.java

Other (1) +10 / -2
build.gradleExclude release metadata and bump version to 2.08 +10/-2

Exclude release metadata and bump version to 2.08

• Increments the version code and name. Disables release VCS metadata and excludes dependency metadata from APKs and bundles; the existing BuildConfig field retains the commit hash.

android/app/build.gradle

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@compot-dev
compot-dev merged commit a58f73f into v2 Oct 15, 2026
4 checks passed
@compot-dev
compot-dev deleted the feat/apk-size-181 branch October 15, 2026 12:03
compot-dev added a commit that referenced this pull request Oct 15, 2026
feat: smaller APK — icon/banner and debug page (#181)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants