Open AndrewFasano opened 2 years ago
Looked into this a bit more and things are starting to make more sense. Those symbols were missing because frida couldn't find them in my libjvm.so (not sure how I misunderstood that at first).
It looks like this happened because the argument type to Method::restore_unsharable_info
changed from a Thread
to a JavaThread
sometime between the last JDK version frida supported in this. I have _ZN6Method24restore_unshareable_infoEP10JavaThread
which demangles to Method::restore_unshareable_info(JavaThread*)
vs the code here which handles _ZN6Method24restore_unshareable_infoEP6Thread
(Method::restore_unshareable_info(Thread*)
).
And it looks like _ZN10JavaThread27thread_from_jni_environmentEP7JNIEnv_
(JavaThread::thread_from_jni_environment(JNIEnv_*)
) is no longer an exported symbol.
I found this comment which seems to provide some guidance for a workaround so I'll try that and report back: frida/frida-java-bridge#254
@AndrewFasano Try the JDK from https://adoptopenjdk.net/upstream.html and after attaching to the process execute Java.available
to check
@AndrewFasano Try the JDK from https://adoptopenjdk.net/upstream.html and after attaching to the process execute
Java.available
to check
any news ? downloaded the JDK and Java is still not available
Any news? Still have issue.. Downloaded JDK 17 and still have issue.
Does the latest JDK 20 have this problem?
I'm trying to use Frida with a Linux x86_64 Java application. I'm using the OpenJDK 17 with debug symbols provided by Eclipse Adoptium.
When I run the application (a .jar file) with something like
frida /path/to/openjdk17/bin/java myapp.jar
and let it start (%resume
), I then check if Java is available withJava.available
and get an error about two unsupported methods:But methods are referenced in jvm.js here and here. I was going to try adding support for them, but given that they're already there, I'm not sure what to do.
I build Frida from source in a Docker container as follows. In hindsight, this may have been overkill, but I saw the methods in the source here and assumed (incorrectly) the issue was that the pip-based install was out of date.
I believe this is different from frida/frida#171 as I'm getting a different list of missing methods and I don't think they're really missing. Any advice would be much appreciated, thanks!