Skip to content

Fix missing RecordTag superclass causing NoClassDefFoundError - #1080

Open
AhmadAddas wants to merge 2 commits into
JingMatrix:masterfrom
AhmadAddas:fix/missing-recordtag
Open

AhmadAddas wants to merge 2 commits into
JingMatrix:masterfrom
AhmadAddas:fix/missing-recordtag

Conversation

@AhmadAddas

Copy link
Copy Markdown

Problem

Vector's invoker records can reference a missing
com.android.tools.r8.RecordTag superclass, causing
NoClassDefFoundError when constructing BaseInvoker.

RecordTag provides Java record compatibility on older Android versions.
Vector uses these records to choose between calling the original method and
executing a hook chain.

Fix

  • Enable multidex during the build so AGP/D8 generates and includes the
    required global synthetics, including RecordTag.
  • Merge the finalized APK's DEX files into one framework/vector.dex, keeping
    Vector's single-DEX runtime loader unchanged.
  • Preserve separate debug/release intermediate output and add packaging
    regression tests.

Validation

  • CI passed: debug/release regression tests and the full zipAll build.
    View the successful GitHub Actions run.
  • Invoker construction passed in a disposable process on an enforcing phone.
  • The GitHub-built Debug module booted successfully on an enforcing Android 15 phone.
  • No RecordTag or invoker Chain resolution errors appeared in the captured
    post-boot logs.

Testing limitation

Android blocked direct method tracing because WhatsApp is not
debuggable/profileable. The original-method call's native execution and return
value were therefore not directly traced. This is a testing limitation,
not an observed failure.

Package AGP's generated record support with the framework so constructing
an invoker no longer fails on the missing RecordTag superclass.

Merge the finalized APK DEX set into one classes.dex, retain separate
debug/release intermediate paths, and package it once as framework/vector.dex.
Reject missing record support or output exceeding the single-DEX loader.

Add direct debug/release packaging and missing-support regression tests.
The regression suite passed in this fresh checkout.
@AhmadAddas AhmadAddas closed this Nov 14, 2026
@AhmadAddas AhmadAddas reopened this Nov 14, 2026
@AhmadAddas

Copy link
Copy Markdown
Author

My bad I thought it is merged when I closed it, feel free to close it from your end with approved commit changes

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.

2 participants