Skip to content

ADFA-3771: Document android-sdk.zip image recompression procedure - #1602

Merged
davidschachterADFA merged 6 commits into
stagefrom
chore/ADFA-3771-recompress-wallpaper-images
Jul 30, 2026
Merged

ADFA-3771: Document android-sdk.zip image recompression procedure#1602
davidschachterADFA merged 6 commits into
stagefrom
chore/ADFA-3771-recompress-wallpaper-images

Conversation

@davidschachterADFA

Copy link
Copy Markdown
Collaborator

Summary

  • ADFA-3771 flagged two oversized PNGs (default_wallpaper.png at drawable-sw600dp-nodpi and drawable-sw720dp-nodpi, 2.75MB and 3.94MB) bundled inside the downloaded android-sdk.zip.
  • Recompressed both locally with pngquant (lossy palette quantization) — 69% and 64% smaller respectively, ~4.4MB combined savings per architecture zip, no visible quality loss.
  • android-sdk-arm64-v8a.zip/android-sdk-armeabi-v7a.zip are downloaded assets (see debugAssets in app/build.gradle.kts), not built in this repo, so there's no app code to change here — this PR documents the repeatable procedure (including a snap-confinement gotcha with pngquant and the in-place zip-entry-replacement trick) so future oversized-asset findings don't require rediscovering it.
  • Publishing the recompressed images into the real, hosted android-sdk.zip on appdevforall.org is a separate step outside this repo, not covered by this PR.

Test plan

  • unzip -t on both locally-updated zips reports no errors
  • Visually compared original vs. recompressed PNGs side-by-side — no perceptible difference
  • spotlessCheck passes (docs-only change)

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

Recompressed the two oversized default_wallpaper.png files in the
downloaded android-sdk.zip with pngquant (~66% combined size reduction,
no visible quality loss) and wrote up the repeatable procedure so future
oversized-asset findings don't require rediscovering the snap-confinement
workaround or the in-place zip-entry-replacement trick.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f5371962-f1fa-4aa1-8436-15ed776038f1

📥 Commits

Reviewing files that changed from the base of the PR and between 9848996 and 1dbc987.

📒 Files selected for processing (1)
  • docs/process/recompress-android-sdk-images.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/process/recompress-android-sdk-images.md

📝 Walkthrough
  • Added release documentation for recompressing oversized default_wallpaper.png files bundled in downloaded android-sdk-arm64-v8a.zip and android-sdk-armeabi-v7a.zip assets using pngquant (with optional context on zopflipng).
  • Included how to find the largest entries (unzip -l ... | sort ... | tail) and documented the snap-confinement workaround for pngquant (copy inputs under $HOME because the snap can’t read outside allowed roots; applies to other snap-packaged CLIs as well).
  • Documented in-place ZIP entry replacement by mirroring the archive’s internal path structure and swapping platforms/android-<N>/data/res/drawable-*/default_wallpaper.png via zip ../assets/... (repeat for both architecture ZIPs).
  • Added validation steps: unzip -t for both SDK ZIPs, plus guidance to visually diff the before/after images (and note that quantization quality varies by image content).
  • Reported observed size reductions for the targeted wallpapers (69% and 64%) and clarified scope: this PR updates only the locally downloaded, gitignored assets/ copies; publishing updated hosted SDK ZIPs is explicitly out of scope.
  • Risks / best practices: recompression is lossy (pngquant palette quantization), so always manually review visual diffs; there’s no UI/regression test to catch wallpaper degradation, and the android-<N> path must be matched to the target ZIP before replacement.

Walkthrough

The Android SDK image recompression documentation clarifies pngquant snap confinement, generalizes platform directory paths, adjusts in-place zip replacement commands, and verifies both arm64 and armeabi-v7a archives with unzip -t.

Changes

Android SDK image documentation

Layer / File(s) Summary
Update recompression workflow
docs/process/recompress-android-sdk-images.md
Clarifies permitted pngquant locations and the generalized workaround, uses android-<N> paths and an archive-relative zip command, and adds integrity checks for both SDK zips.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

A rabbit zipped through folders bright,
Repacking SDKs just right.
Two archives checked, their contents sound,
With pngquant guidance safely found.
“Hop verified!” the bunny cried.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: documenting the android-sdk.zip image recompression procedure.
Description check ✅ Passed The description is directly related to the documented recompression workflow and validation steps in this change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ADFA-3771-recompress-wallpaper-images

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/process/recompress-android-sdk-images.md`:
- Around line 12-14: Update every fenced shell block in the document, including
the blocks around the shown command and the referenced sections, to use a sh or
shell language identifier on each opening fence while leaving the commands
unchanged.
- Around line 53-59: Update the verification procedure for the Android SDK
archives to run an equivalent unzip -t integrity check on
android-sdk-armeabi-v7a.zip, alongside the existing check for
android-sdk-arm64-v8a.zip, after both replacements are completed.
- Line 50: Update the zip command in the recompression instructions to reference
the archive from the parent directory after changing into work, using the
correct sibling path while preserving the existing wallpaper input.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7bcb1302-3dd7-4e12-9ac2-2e465ceeb205

📥 Commits

Reviewing files that changed from the base of the PR and between 3262149 and b37bb2b.

📒 Files selected for processing (1)
  • docs/process/recompress-android-sdk-images.md

Comment thread docs/process/recompress-android-sdk-images.md Outdated
Comment thread docs/process/recompress-android-sdk-images.md Outdated
Comment thread docs/process/recompress-android-sdk-images.md
davidschachterADFA and others added 4 commits July 30, 2026 10:59
Review feedback on PR #1602 -- bare triple-backtick fences don't get
shell syntax highlighting or get picked up as shell snippets by doc
tooling that keys off the language tag.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Review feedback on PR #1602 -- the command referenced assets/ relative
to the directory before cd work, which resolves to the nonexistent
work/assets/ instead of the sibling assets/ directory.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Review feedback on PR #1602 -- the verification step only checked
android-sdk-arm64-v8a.zip even though the same section says to repeat
the update for android-sdk-armeabi-v7a.zip, so a bad update to the
armv7 zip would go undetected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…path

Inline the snap-confinement explanation instead of pointing at a
personal Claude Code memory note nobody else can resolve. Replace the
hardcoded android-36 example path with an android-<N> placeholder and
a note to substitute the actual platform directory.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@davidschachterADFA
davidschachterADFA merged commit d48c1be into stage Jul 30, 2026
4 checks passed
@davidschachterADFA
davidschachterADFA deleted the chore/ADFA-3771-recompress-wallpaper-images branch July 30, 2026 22:54
@hal-eisen-adfa

Copy link
Copy Markdown
Collaborator

We need to revert this. The markdown file contains at least one error. And it doesn't belong here, it should be over in the dev-assets git repo

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.

3 participants