Skip to content

test(apk): cover resources.arsc label/icon reference resolution - #123

Open
dwgx wants to merge 2 commits into
RoutineMiku:mainfrom
dwgx:test/resources-arsc-refs-20261121
Open

dwgx wants to merge 2 commits into
RoutineMiku:mainfrom
dwgx:test/resources-arsc-refs-20261121

Conversation

@dwgx

@dwgx dwgx commented Nov 21, 2026 •

Copy link
Copy Markdown

Scope

Add a deterministic repository-owned synthetic APK fixture with nonempty resources.arsc and binary AXML TYPE_REFERENCE label/icon attributes. Exercise the real parseApk path (ZIP + AXML + ResTable) and register test/arsc-fixture-test.js in npm test.

  • Label: @0x7f010000 -> Arsc Fixture App.
  • Icon: @0x7f020000 -> res/mipmap-hdpi/ic_launcher.png, with a larger decoy image to detect ZIP fallback.
  • Pinned 9014-byte APK SHA-256: b5cf42da75a85a30d64fbd5da26474a592136abd0c326a9cfed800a37d16fd06.
  • Generator reproducibility, valid ZIP CRC-32 (Python zipfile.testzip() == None), wrong-ID/missing-ARSC negative controls.
  • Test-only changes: no production code, emulator, installer, adb, GUI, actual application execution or user-data cleanup.

Provenance: Constructed from documented binary formats, not aapt2-compiled and not a real app APK. This proves a controlled production parser path only, not actual Android installation.

Review / checks

Candidate ce92f00004d47351e65873fb8ae1da2fae021283 was reviewed independently by local OMP GLM, with a post-CRC second validation. Root integration e41b5104e487eb84b2ae9906e5e3a5d9e864e664 adds only the npm test registration.

Root Windows replay: focused 11/11 exit 0; existing synthetic 9/9 exit 0 (one pre-existing optional external-APK SKIP). Swapped-resource-ID and absent-ARSC external overrides each exit 1; restored fixture returns 11/11 exit 0. Git worktree clean and git diff --check passes.

Isolated full npm test: 136 passed, 1 failed, the existing packaging dependency assertion because this worktree lacks a local @napi-rs/lzma install. Not presented as full local GREEN. Fork CI is GREEN at exact head e41b510: run 44901806459, Windows Node 20 and 22 both passed install, npm test (including this fixture's 11/11), and mouse-hook smoke. This does not approve upstream action_required workflows.

No request to approve upstream workflow, merge, or release.

dwgx added 2 commits November 21, 2026 20:05
- Synthetic stored-ZIP APK with binary AXML label/icon references (0x7f010000 / 0x7f020000) and nonempty resources.arsc package 0x7f.
- Focused test drives production parseApk/ResTable and pins fixture, icon and decoy hashes plus three wrong-ID negative controls.
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