Skip to content

[stealth 11/11] Generate neutral stealth Android icons#8787

Closed
reflog wants to merge 8 commits into
mainfrom
stealth/8778-neutral-icons
Closed

[stealth 11/11] Generate neutral stealth Android icons#8787
reflog wants to merge 8 commits into
mainfrom
stealth/8778-neutral-icons

Conversation

@reflog

@reflog reflog commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • adds a deterministic procedural Android icon generator keyed by private per-variant seed
  • wires Android Gradle to generate seeded icon resources and switch launcher icon placeholders when STEALTH_ICON_SEED or -PstealthIconSeed is set
  • adds a Make target and docs for release/support handling of private icon seeds and metadata

Closes getlantern/engineering#3575

Validation

  • python3 -m unittest discover -s scripts/stealth -p *_test.py
  • python3 -m py_compile scripts/stealth/generate_android_icons.py scripts/stealth/generate_android_icons_test.py
  • python3 scripts/stealth/generate_android_icons.py --seed test-seed --output-res-dir /tmp/lantern-8778-icons-2/res
  • XML parse check for generated resources with Python ElementTree
  • make -n stealth-android-icons STEALTH_ICON_SEED=test-seed
  • make -n android-apk-release STEALTH_ICON_SEED=test-seed
  • git diff --cached --check

Not run

  • Full Android resource merge/build: this environment has no Gradle wrapper/system Gradle or Android SDK configured.

Copilot AI review requested due to automatic review settings May 15, 2026 15:11
@reflog reflog self-assigned this May 15, 2026

Copilot AI 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.

Pull request overview

This PR introduces a deterministic, seed-keyed generator for “neutral” stealth Android icon resources, and wires Android/Make build steps to use the generated launcher icons when a stealth icon seed is provided.

Changes:

  • Added a Python script + unit tests to procedurally generate seeded Android icon resources and metadata.
  • Updated Android Gradle + AndroidManifest to switch launcher icon resources via manifest placeholders when STEALTH_ICON_SEED / -PstealthIconSeed is set.
  • Added a Make target and documentation for generating and managing stealth icon resources.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/stealth/generate_android_icons.py New deterministic icon resource generator and metadata writer.
scripts/stealth/generate_android_icons_test.py Unit tests for file generation and determinism.
Makefile Adds stealth-android-icons target and seed/res-dir variables.
docs/stealth-android-icons.md Documents local generation, Gradle wiring, and seed handling policy.
android/app/src/main/AndroidManifest.xml Switches launcher icon attributes to manifest placeholders.
android/app/build.gradle Adds seed detection, generated res dir, icon placeholders, and generation task hooked into preBuild.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/stealth/generate_android_icons.py
Comment thread scripts/stealth/generate_android_icons.py
Comment thread android/app/build.gradle
Comment thread docs/stealth-android-icons.md Outdated
Comment thread scripts/stealth/generate_android_icons_test.py

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread android/app/build.gradle Outdated
Comment thread scripts/stealth/generate_android_icons.py Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread android/app/build.gradle Outdated
Comment thread Makefile Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread android/app/build.gradle Outdated
Comment thread scripts/stealth/generate_android_icons.py Outdated
Comment thread scripts/stealth/generate_android_icons_test.py Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread scripts/stealth/generate_android_icons.py
Comment thread scripts/stealth/generate_android_icons.py Outdated
Comment thread android/app/build.gradle

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread scripts/stealth/generate_android_icons_test.py Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@reflog reflog changed the title Generate neutral stealth Android icons [stealth 11/11] Generate neutral stealth Android icons May 16, 2026
Resource entry names are retained in resources.arsc even with
shrinkResources=true, making stealth_ic_launcher etc. a visible
artifact fingerprint. Replace every stealth_* resource name with
a neutral _alt-suffixed name:

  stealth_ic_launcher           → ic_launcher_alt
  stealth_ic_launcher_round     → ic_launcher_alt_round
  stealth_launcher_foreground   → launcher_foreground_alt
  stealth_launcher_monochrome   → launcher_monochrome_alt
  stealth_notification_icon     → ic_notification_alt
  stealth_launcher_background   → launcher_background_alt
  stealth_icon_colors.xml       → icon_colors_alt.xml

Update build.gradle placeholder targets, metadata values, and test
assertions accordingly. Add a test guard that asserts no "stealth"
token appears in any generated resource filename.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@reflog reflog force-pushed the stealth/8778-neutral-icons branch from 57e4bff to 7f3f332 Compare June 11, 2026 10:23
@reflog

reflog commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Superseded — the 11 per-issue stealth PRs were consolidated into a 6-PR stack for epic getlantern/engineering#3569. This work now lives in #8860.

@reflog reflog closed this Jun 15, 2026
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