Skip to content

Installer: unmatched JAD/JAR fallback loses the source URI #19

Closed

Description

@EriArk

Found during the compact installer UI review; source-level finding, not yet reproduced through a real document provider.

InstallerDialog handles STATUS_UNMATCHED by calling installApp(installer.getJar(), null). AppInstaller(String path, Uri uri, ...) accepts that path and stores a null URI, but loadInfo immediately calls uri.getScheme() and later unconditionally resolves a file from the URI. The fallback therefore appears to fail before loading the chosen JAR. The original source identity may also be lost if the fix only avoids the null dereference.

Relevant source: app/src/main/java/ru/woesss/j2me/installer/InstallerDialog.java (STATUS_UNMATCHED), AppInstaller.java (path constructor, loadInfo and sourceKey).

Follow-up:

  • Reproduce with a small generated mismatched JAD/JAR pair, including a content URI.
  • Preserve the chosen file and stable source identity while switching to the JAR manifest.
  • Cover need-JAR, mismatched pair, matching pair, cancel and retry without touching existing saves.

This predates the compact-dialog changes. Archive parsing and conversion are intentionally unchanged in the UI batch.

Activity

  1. EriArk commented on Oct 9, 2026

    @EriArk
    OwnerAuthor

    Fixed in 7ba384b.

    Reproduced the old local-pair confirmation failure: AppInstaller.loadInfo dereferenced a null URI. The fallback now switches to the JAR manifest within the same installer, retaining the selected JAR and original JAD URI/source key. The obsolete path-only constructor path is removed. File-check actions are hidden while work is pending.

    Verification:

    • New failing-before/passing-after dialog test, plus four cases covering local/content pairs, matching JAD metadata, cancelled picker/confirmation, missing-file error and retry.
    • Reinstall checks preserve one catalog entry, ID/path, source URI/hash and RMS/config marker bytes in an isolated test library.
    • Public variants: 12 installer tests and 14 rerun JVM tests each. Both exact combined private builds: OK (128 selected Android tests) each, with variant assumptions.
    • Actual DocumentsUI Downloads flow: Choose JAR -> mismatch -> successful install; stable-URI repeat -> Reinstall -> success, same ID/path and row count. All 40 existing save/config file hashes stayed unchanged.

    Manual testing also exposed a separate raw-to-msf Downloads URI alias/duplicate case, tracked in #20. This fix preserves the original URI; it does not claim cross-URI identity resolution. No physical-device or remote-JAD download acceptance is claimed.

    Private experimental.14 APKs/notes delivered to the established private test repository and Nextcloud; no public release APK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions