Skip to content

Hardening: CI, performance, UI and docs (in parts) - #16

Merged
wized2 merged 17 commits into
mainfrom
improve/hardening
Nov 11, 2026
Merged

wized2 merged 17 commits into
mainfrom
improve/hardening

Conversation

@wized2

@wized2 wized2 commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Draft PR, pushed in parts. Each part is its own commit so it can be reviewed separately. Nothing here is merged; merging to main publishes a signed 1.12.0 release.

  • Part 1 CI: PR builds are faster; on the official repo a release can no longer ship a debug-signed APK (forks still get debug-signed builds); signature verified before publishing; tracked .gradle/ cache removed
  • Part 2 Performance: async preference writes, lifecycle-aware state collection, cached static device info, one sysfs pass per refresh, no process spawn when /proc is blocked
  • Security Package names are validated before reaching the Shizuku/root shell (force-stop and clear-cache previously allowed command injection), with unit tests
  • UI fix Status and navigation bar icons follow the selected theme
  • Part 3 Overlay service: light reads, pauses with the screen off, repositions on rotation; ActiveAppsRepository reviewed (no changes needed)
  • Part 5 Docs: CHANGELOG cleanup + 1.12.0, release notes, threat model in SECURITY.md, version bump to 1.12.0
  • Part 4 UI polish and size inside FernApp.kt (3,221 lines): not started. A scan found no obvious performance smells; changes there are visual and need a device to judge

CI is green on the latest commit.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2

- Pull requests build and test the stable flavor only (R8 release included);
  beta and signed builds run only for main / v* tags
- Release signing secrets are required on releases: previously a missing
  secret silently shipped a debug-signed APK to GitHub Releases
- Verify the APK signature (v2, not the debug key) before publishing
- Gradle cache via setup-gradle, concurrency group, job timeout, test report
  upload on failure, R8 mapping kept as an artifact
- Drop the redundant license-accept step

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
fern Ready Ready Preview Nov 11, 2026 2:25am UTC

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
wized2 and others added 2 commits November 10, 2026 17:02
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
Every setter used SharedPreferences.commit(), a synchronous disk write on the
calling thread (usually the UI thread while dragging a slider). apply() updates
the in-memory map immediately and persists in the background; all readers live
in the same process so they see the new value at once.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
- collectAsStateWithLifecycle stops recomposing while the app is not visible
- Status and navigation bar icons followed a hard-coded "light" value, so they
  were dark-on-dark in the dark theme; they now follow the selected theme

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
Force-stop and clear-cache built "am force-stop <pkg>" / "pm clear <pkg>" shell
commands from a package name that was only checked for blank/space. A name
containing ;, |, &&, $() or a newline would have run arbitrary commands in the
Shizuku/root shell. Names must now match a strict Android package-name pattern.

Adds unit tests for accepted and rejected names.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
- One sysfs pass per refresh: current frequencies are read once and reused for
  the average, the per-core list and the CPU fallback (was three scans)
- cpuN directory listing, max frequency, kernel version, security patch and
  sensor count are read once per process
- Regexes are precompiled instead of rebuilt on every call
- /proc/stat and /proc/loadavg: after three consecutive failures the file is
  skipped for 60 s, and the useless "cat" subprocess fallback (it runs under the
  same SELinux domain) is gone, so a blocked device no longer spawns a process
  every refresh

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
- The pill shows two numbers but called SystemMetrics.capture (about 50 file
  reads, sensor list, a 180 ms sleep on the first sample) on the main thread
  every refresh. It now reads just battery temperature and RAM
- Refreshing pauses while the screen is off and resumes on screen on
- Position is recomputed on rotation / fold changes
- Screen receiver is unregistered in onDestroy

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
- CHANGELOG: 1.12.0 entry; merge the two stray "Unreleased" blocks into 1.11.3;
  remove the duplicate title; order releases newest first
- RELEASE_NOTES: user-facing 1.12.0 notes (used as the GitHub release body)
- SECURITY: add a threat model (network, data, permissions, shell input, release integrity)
- versionName 1.12.0 / versionCode 76

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
Forks have no signing secrets. Failing on missing secrets broke their pushes to
main. Now only the official repository (wized2/Fern) refuses to build without the
release key; forks log a warning and build with the debug key as before. The
apksigner check runs only when a release key was actually used.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBS1KApo9NfNebojzAwAS2
@wized2
wized2 marked this pull request as ready for review November 11, 2026 08:47
@wized2 wized2 self-assigned this Nov 11, 2026
@wized2
wized2 merged commit 2544533 into main Nov 11, 2026
3 checks passed
@wized2
wized2 deleted the improve/hardening branch November 11, 2026 08:48

This branch was successfully deployed

1 active deployment
Preview — a1edb300 Deployed Nov 11, 2026 by vercel[bot]
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.

1 participant