Skip to content

[tools] Replace APK utilities with skill file apps#12108

Open
simonrozsival wants to merge 3 commits into
dev/simonrozsival/update-assembly-store-toolsfrom
dev/simonrozsival/android-tool-file-apps
Open

[tools] Replace APK utilities with skill file apps#12108
simonrozsival wants to merge 3 commits into
dev/simonrozsival/update-assembly-store-toolsfrom
dev/simonrozsival/android-tool-file-apps

Conversation

@simonrozsival

Copy link
Copy Markdown
Member

Summary

  • replace the standalone assembly-store reader and decompressor executable projects with .NET file-based apps owned by repository skills
  • expand read-assembly-store to invoke its bundled app directly
  • add an extract-android-assemblies skill for customer APK/AAB investigation and decompilation preparation
  • remove the obsolete legacy reader project, launch wrappers, and solution entries while retaining the shared compatibility parser
  • build both file apps in CI

Stack

This PR is stacked on #12104, which provides the shared v1/v2/v3 and LZ4/Zstd compatibility layer. Review this PR as the single commit on top of that branch. It can be retargeted to main after #12104 merges.

File apps

dotnet run --file .github/skills/read-assembly-store/scripts/read-assembly-store.cs -- <input>

dotnet run --file .github/skills/extract-android-assemblies/scripts/extract-android-assemblies.cs -- --output <directory> <input>

The extractor handles:

  • APK, AAB, raw store, manifest, store base-name, and DLL inputs
  • legacy and current assembly stores
  • raw, ELF payload, and _assembly_store wrappers
  • historical and current individually packaged assemblies
  • LZ4 and Zstd compression
  • multiple ABIs and satellite assemblies

Customer inputs remain local. Extraction rejects path traversal, output-name collisions, and overwrites.

Validation

  • both skills pass skill-creator validation and package successfully
  • both file apps build and run through their CI commands
  • shared parser builds for .NET 10 and .NET 11
  • 10 assembly-store compatibility tests pass
  • byte-for-byte extraction exercised for:
    • current store APKs
    • standalone stores
    • ELF-wrapped individual assemblies
    • current and historical satellite names
    • modern loose individual assemblies

Move assembly-store inspection and managed assembly extraction into skill-owned .NET file-based apps. Remove the redundant executable projects and launch wrappers while keeping the shared compatibility parser and exercising both apps in CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 55493571-86e2-4326-850e-ea55883aa5d8
Copilot AI review requested due to automatic review settings July 14, 2026 20:28

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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 18 out of 18 changed files in this pull request and generated 2 comments.

Comment thread .github/skills/read-assembly-store/scripts/read-assembly-store.cs Outdated
Comment thread .github/skills/extract-android-assemblies/scripts/extract-android-assemblies.cs Outdated
@jonathanpeppers

Copy link
Copy Markdown
Member

/review

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Android PR Reviewer completed successfully!

@github-actions github-actions 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.

Code Review — ⚠️ Needs minor changes

Reviewed the top commit ([tools] Replace APK utilities with skill file apps) on top of the stacked base #12104. The refactor cleanly consolidates the standalone reader/decompressor executables into two skill-owned dotnet run --file apps plus a shared AssemblyStorePayload helper, and wires both apps into Windows CI via --help smoke runs. The path-traversal guard (GetSafeOutputFile), overwrite refusal, and unique-output checks are good defensive touches.

Findings

  • ⚠️ 2 error-handling issues (inline): InvalidDataException from the path-traversal guard is not in Main’s catch list in the extractor, and ParseArchList throws an uncaught InvalidOperationException on bad --arch input in the reader. Both surface as stack traces instead of clean messages.
  • 💡 1 cleanup: empty unused ShowHelp () in the reader.

None are blockers, but the two error-handling items are worth addressing so malformed input/malicious archives fail gracefully.

Notes

  • CI status is currently pending (checks not yet reported) — verify the two new file-app build steps go green before merge.
  • Reviewed as the single commit atop #12104 per the PR description; retarget to main once #12104 lands.

Automated review; verify suggestions against full context.

Generated by Android PR Reviewer for #12108 · 106.2 AIC · ⌖ 18.8 AIC · ⊞ 6.8K
Comment /review to run again

Comment thread .github/skills/read-assembly-store/scripts/read-assembly-store.cs Outdated
Comment thread .github/skills/read-assembly-store/scripts/read-assembly-store.cs Outdated
Keep the file-app project removals while incorporating the shared ELF symbol diagnostic changes from the compatibility branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 55493571-86e2-4326-850e-ea55883aa5d8
Report invalid architecture filters and path traversal errors without stack traces, remove dead reader code, and correct the extractor usage text.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 55493571-86e2-4326-850e-ea55883aa5d8
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