Skip to content

Use more stable fields for ART class spec offset detection#362

Merged
oleavr merged 1 commit into
frida:mainfrom
AeonLucid:fix/art-class-spec-stable-2
Jul 24, 2025
Merged

Use more stable fields for ART class spec offset detection#362
oleavr merged 1 commit into
frida:mainfrom
AeonLucid:fix/art-class-spec-stable-2

Conversation

@AeonLucid

Copy link
Copy Markdown
Contributor

Hopefully my last PR regarding this. Thanks to @ExternalAddress4401 for providing repro code #361 (comment).

This instance field should not be optimised out, see android code comment https://android.googlesource.com/platform/libcore.git/+/android-4.2.2_r1/luni/src/main/java/java/lang/Thread.java#133.

some of these are accessed directly by the VM; do not rename them

@oleavr oleavr merged commit 2a2104b into frida:main Jul 24, 2025
1 of 11 checks passed
@oleavr

oleavr commented Jul 24, 2025

Copy link
Copy Markdown
Member

Thanks! 🙌

oleavr added a commit to frida/frida-core that referenced this pull request Jul 24, 2025
To pick up the improved ART offset lookup fix by @AeonLucid.

See frida/frida-java-bridge#362 for details.
@ExternalAddress4401

ExternalAddress4401 commented Jul 24, 2025

Copy link
Copy Markdown

Thank you :)

I'll get a test going later and edit my results into this comment.

EDIT: Looks good. Back in business. Thanks again for your hard work getting this fixed.

@as0ler

as0ler commented Nov 21, 2025

Copy link
Copy Markdown

Looks like this is failing on Android 16:

{"type":"error","description":"Error: Unable to find copied methods in java/lang/Thread; please file a bug","stack":"Error: Unable to find copied methods in java/lang/Thread; please file a bug\n at /internal-agent.js:1:47232\n at Ie.perform (/internal-agent.js:1:25891)\n at Gn (/internal-agent.js:1:45951)\n at Md (/internal-agent.js:1827:1640)\n at Uo (/internal-agent.js:1827:1258)\n at Function.build (/internal-agent.js:1827:85)\n at t._make (/internal-agent.js:1828:18234)\n at t.use (/internal-agent.js:1828:17033)\n at /internal-agent.js:1837:6963\n at Ie.perform (/internal-agent.js:1:25891)","fileName":"/internal-agent.js","lineNumber":1,"columnNumber":47232}

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.

4 participants