Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Java API only partially available - Adoptium jdk8u352-b08 - Windows 10 x64 #273

Open
brunoaduarte opened this issue Nov 23, 2022 · 1 comment

Comments

@brunoaduarte
Copy link

brunoaduarte commented Nov 23, 2022

I'm trying to debug a 32bit Java 8 Windows application using latest version of Frida 16.0.3 but I got this error: Java API only partially available; please file a bug

I've already installed the Adoptium Temurin JDK 8 (former AdoptOpenJDK)

https://adoptium.net/temurin/archive/?version=8
https://github.com/adoptium/temurin8-binaries/releases/tag/jdk8u352-b08

and set the program to run using it

https://www.ayrx.me/frida-hotspot-jvm/

Why doesn't it load symbols from jvm.dll and I cannot load them manually from .pdb file?

loaded frida-agent is x64 and the application runs in Java 32bit, can that be the cause of the problem?

@oleavr ? 🙏

E:\> frida -p (ps java*).id
     ____
    / _  |   Frida 16.0.3 - A world-class dynamic instrumentation toolkit
   | (_| |
    > _  |   Commands:
   /_/ |_|       help      -> Displays the help system
   . . . .       object?   -> Display information about 'object'
   . . . .       exit/quit -> Exit
   . . . .
   . . . .   More info at https://frida.re/docs/home/
   . . . .
   . . . .   Connected to Local System (id=local)

[Local::PID::14404 ]-> Java.available
Error: Java API only partially available; please file a bug. Missing: _ZN6Method4sizeEb, _ZN6Method19set_native_functionEPhb, _ZN6Method21clear_native_functionEv, _ZN6Method10jmethod_idEv, _ZN20ClassLoaderDataGraph10classes_doEP12KlassClosure, _ZN8VMThread7executeEP12VM_Operation, _ZN11OopMapCache22flush_obsolete_entriesEv, _ZN14NMethodSweeper16sweep_code_cacheEv, JVM_Sleep, _ZTV18VM_RedefineClasses, _ZN18VM_RedefineClasses4doitEv, _ZN18VM_RedefineClasses13doit_prologueEv, _ZN18VM_RedefineClasses13doit_epilogueEv, _ZNK18VM_RedefineClasses26allow_nested_vm_operationsEv, _ZN19Abstract_VM_Version19jre_release_versionEv, _ZN14NMethodSweeper11_traversalsE, _ZN14NMethodSweeper13_should_sweepE
    at E (frida/node_modules/frida-java-bridge/lib/jvm.js:146)
    at b (frida/node_modules/frida-java-bridge/lib/jvm.js:10)
    at _tryInitialize (frida/node_modules/frida-java-bridge/index.js:29)
    at _ (frida/node_modules/frida-java-bridge/index.js:21)
    at <anonymous> (frida/node_modules/frida-java-bridge/index.js:332)
    at call (native)
    at o (/_java.js)
    at <anonymous> (/_java.js)
    at <anonymous> (frida/runtime/java.js:1)
    at call (native)
    at o (/_java.js)
    at r (/_java.js)
    at <eval> (frida/runtime/java.js:3)
    at _loadJava (native)
    at get (frida/runtime/core.js:130)
    at <eval> (<input>:1)
    at eval (native)
[Local::PID::14404 ]-> Process.enumerateModulesSync().map(m => m.path.toLowerCase())
[
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\bin\\java.exe",
    "c:\\windows\\system32\\ntdll.dll",
    "c:\\windows\\system32\\kernel32.dll",
    "c:\\windows\\system32\\kernelbase.dll",
    "c:\\windows\\system32\\apphelp.dll",
    "c:\\windows\\system32\\advapi32.dll",
    "c:\\windows\\system32\\msvcrt.dll",
    "c:\\windows\\system32\\sechost.dll",
    "c:\\windows\\system32\\rpcrt4.dll",
    "c:\\windows\\system32\\user32.dll",
    "c:\\windows\\system32\\win32u.dll",
    "c:\\windows\\system32\\gdi32.dll",
    "c:\\windows\\system32\\gdi32full.dll",
    "c:\\windows\\system32\\msvcp_win.dll",
    "c:\\windows\\system32\\ucrtbase.dll",
    "c:\\windows\\winsxs\\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_a8625c1886757984\\comctl32.dll",
    "c:\\windows\\system32\\imm32.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\msvcr100.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\server\\jvm.dll",
    "c:\\windows\\system32\\psapi.dll",
    "c:\\windows\\system32\\winmm.dll",
    "c:\\windows\\system32\\wsock32.dll",
    "c:\\windows\\system32\\version.dll",
    "c:\\windows\\system32\\ws2_32.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\verify.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\java.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\zip.dll",
    "c:\\windows\\system32\\shell32.dll",
    "c:\\windows\\system32\\windows.storage.dll",
    "c:\\windows\\system32\\combase.dll",
    "c:\\windows\\system32\\wldp.dll",
    "c:\\windows\\system32\\shcore.dll",
    "c:\\windows\\system32\\shlwapi.dll",
    "c:\\windows\\system32\\profapi.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\awt.dll",
    "c:\\windows\\system32\\oleaut32.dll",
    "c:\\windows\\system32\\dwmapi.dll",
    "c:\\windows\\system32\\uxtheme.dll",
    "c:\\windows\\system32\\opengl32.dll",
    "c:\\windows\\system32\\glu32.dll",
    "c:\\windows\\system32\\msctf.dll",
    "c:\\windows\\system32\\ole32.dll",
    "c:\\windows\\system32\\kernel.appcore.dll",
    "c:\\windows\\system32\\bcryptprimitives.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\jpeg.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\freetype.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\fontmanager.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\net.dll",
    "c:\\windows\\system32\\mswsock.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\nio.dll",
    "c:\\users\\myself\\.jssc\\windows\\jssc-2.8_x86.dll",
    "c:\\alerta24h\\sms_power_view\\libs\\hidapi-jni.dll",
    "c:\\windows\\system32\\setupapi.dll",
    "c:\\windows\\system32\\cfgmgr32.dll",
    "c:\\windows\\system32\\bcrypt.dll",
    "c:\\windows\\winsxs\\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9625_none_508ef7e4bcbbe589\\msvcr90.dll",
    "c:\\windows\\system32\\devobj.dll",
    "c:\\windows\\system32\\wintrust.dll",
    "c:\\windows\\system32\\crypt32.dll",
    "c:\\windows\\system32\\msasn1.dll",
    "c:\\windows\\system32\\iphlpapi.dll",
    "c:\\windows\\system32\\nsi.dll",
    "c:\\windows\\system32\\dhcpcsvc6.dll",
    "c:\\windows\\system32\\dhcpcsvc.dll",
    "c:\\windows\\system32\\dnsapi.dll",
    "c:\\windows\\system32\\napinsp.dll",
    "c:\\windows\\system32\\pnrpnsp.dll",
    "c:\\windows\\system32\\wshbth.dll",
    "c:\\windows\\system32\\nlaapi.dll",
    "c:\\windows\\system32\\winrnr.dll",
    "c:\\windows\\system32\\rasadhlp.dll",
    "c:\\windows\\system32\\fwpuclnt.dll",
    "c:\\windows\\system32\\cryptsp.dll",
    "c:\\windows\\system32\\rsaenh.dll",
    "c:\\windows\\system32\\userenv.dll",
    "c:\\windows\\system32\\cryptbase.dll",
    "c:\\windows\\system32\\mscms.dll",
    "c:\\windows\\system32\\coloradapterclient.dll",
    "c:\\windows\\system32\\icm32.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\sunec.dll",
    "c:\\program files (x86)\\java\\eclipse adoptium\\java-1.8.0-openjdk-debug-1.8.0.332-1.b09.ojdkbuild.windows.x86\\jre\\bin\\sunmscapi.dll",
    "c:\\windows\\system32\\ncrypt.dll",
    "c:\\windows\\system32\\ntasn1.dll",
    "c:\\program files (x86)\\frida\\3b9abb6f57ea528938474d7689e102c84190ed78\\frida-agent.dll"
]
[Local::PID::14404 ]-> Module.enumerateSymbolsSync('jvm.dll')
[]
[Local::PID::14404 ]-> DebugSymbol.load("jvm.dll")
[Local::PID::14404 ]-> DebugSymbol.load("jvm.pdb")
Error: unable to load symbols
    at <eval> (<input>:1)
    at eval (native)
[Local::PID::14404 ]-> exit

Thank you for using Frida!
@r0utine
Copy link

r0utine commented Mar 3, 2023

Same kind of issue however Java,available is false in my case

[Local::PID::5780]-> Java.available
false
[Local::PID::5780]-> Process.enumerateModulesSync()
[
    {
        "base": "0x7ff7928c0000",
        "name": "java.exe",
        "path": "C:\\Program Files\\Eclipse Adoptium\\jdk-8.0.362.9-hotspot\\bin\\java.exe",
        "size": 282624
    },
    {
        "base": "0x7ffd8fdf0000",
        "name": "ntdll.dll",
        "path": "C:\\WINDOWS\\SYSTEM32\\ntdll.dll",
        "size": 2064384
    },
    {
        "base": "0x7ffd679e0000",
        "name": "aswhook.dll",
        "path": "C:\\Program Files\\AVAST Software\\Avast\\aswhook.dll",
        "size": 94208
    },
    {
        "base": "0x7ffd8ed30000",
        "name": "KERNEL32.DLL",
        "path": "C:\\WINDOWS\\System32\\KERNEL32.DLL",
        "size": 782336
    },
    {
        "base": "0x7ffd8d8b0000",
        "name": "KERNELBASE.dll",
        "path": "C:\\WINDOWS\\System32\\KERNELBASE.dll",
        "size": 2957312
    },
    {
        "base": "0x7ffd8ee50000",
        "name": "ADVAPI32.dll",
        "path": "C:\\WINDOWS\\System32\\ADVAPI32.dll",
        "size": 712704
    },
    {
        "base": "0x7ffd8de70000",
        "name": "msvcrt.dll",
        "path": "C:\\WINDOWS\\System32\\msvcrt.dll",
        "size": 647168
    },
    {
        "base": "0x7ffd8eaf0000",
        "name": "sechost.dll",
        "path": "C:\\WINDOWS\\System32\\sechost.dll",
        "size": 638976
    },
    {
        "base": "0x7ffd8f920000",
        "name": "RPCRT4.dll",
        "path": "C:\\WINDOWS\\System32\\RPCRT4.dll",
        "size": 1200128
    },
    {
        "base": "0x7ffd8f2f0000",
        "name": "USER32.dll",
        "path": "C:\\WINDOWS\\System32\\USER32.dll",
        "size": 1708032
    },
    {
        "base": "0x7ffd8db90000",
        "name": "win32u.dll",
        "path": "C:\\WINDOWS\\System32\\win32u.dll",
        "size": 139264
    },
    {
        "base": "0x7ffd8f2c0000",
        "name": "GDI32.dll",
        "path": "C:\\WINDOWS\\System32\\GDI32.dll",
        "size": 176128
    },
    {
        "base": "0x7ffd8d7a0000",
        "name": "gdi32full.dll",
        "path": "C:\\WINDOWS\\System32\\gdi32full.dll",
        "size": 1110016
    },
    {
        "base": "0x7ffd8dbc0000",
        "name": "msvcp_win.dll",
        "path": "C:\\WINDOWS\\System32\\msvcp_win.dll",
        "size": 643072
    },
    {
        "base": "0x7ffd8d4e0000",
        "name": "ucrtbase.dll",
        "path": "C:\\WINDOWS\\System32\\ucrtbase.dll",
        "size": 1048576
    },
    {
        "base": "0x7ffd6ca50000",
        "name": "COMCTL32.dll",
        "path": "C:\\WINDOWS\\WinSxS\\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\\COMCTL32.dll",
        "size": 2727936
    },
    {
        "base": "0x7ffd8de30000",
        "name": "IMM32.DLL",
        "path": "C:\\WINDOWS\\System32\\IMM32.DLL",
        "size": 204800
    },
    {
        "base": "0x7ffd7cc80000",
        "name": "vcruntime140.dll",
        "path": "C:\\Program Files\\Eclipse Adoptium\\jdk-8.0.362.9-hotspot\\jre\\bin\\vcruntime140.dll",
        "size": 86016
    },
    {
        "base": "0x7ffd74da0000",
        "name": "msvcp140.dll",
        "path": "C:\\Program Files\\Eclipse Adoptium\\jdk-8.0.362.9-hotspot\\jre\\bin\\msvcp140.dll",
        "size": 634880
    },
    {
        "base": "0x50340000",
        "name": "jvm.dll",
        "path": "C:\\Program Files\\Eclipse Adoptium\\jdk-8.0.362.9-hotspot\\jre\\bin\\server\\jvm.dll",
        "size": 8749056
    },
    {
        "base": "0x7ffd8e020000",
        "name": "PSAPI.DLL",
        "path": "C:\\WINDOWS\\System32\\PSAPI.DLL",
        "size": 32768
    },
    {
        "base": "0x7ffd83610000",
        "name": "WINMM.dll",
        "path": "C:\\WINDOWS\\SYSTEM32\\WINMM.dll",
        "size": 159744
    },
    {
        "base": "0x7ffd83c40000",
        "name": "VERSION.dll",
        "path": "C:\\WINDOWS\\SYSTEM32\\VERSION.dll",
        "size": 40960
    },
    {
        "base": "0x7ffd7a0e0000",
        "name": "WSOCK32.dll",
        "path": "C:\\WINDOWS\\SYSTEM32\\WSOCK32.dll",
        "size": 36864
    },
    {
        "base": "0x7ffd8f230000",
        "name": "WS2_32.dll",
        "path": "C:\\WINDOWS\\System32\\WS2_32.dll",
        "size": 438272
    },
    {
        "base": "0x7ffd8b3c0000",
        "name": "kernel.appcore.dll",
        "path": "C:\\WINDOWS\\SYSTEM32\\kernel.appcore.dll",
        "size": 73728
    },
    {
        "base": "0x7ffd834d0000",
        "name": "verify.dll",
        "path": "C:\\Program Files\\Eclipse Adoptium\\jdk-8.0.362.9-hotspot\\jre\\bin\\verify.dll",
        "size": 65536
    },
    {
        "base": "0x7ffd7cba0000",
        "name": "java.dll",
        "path": "C:\\Program Files\\Eclipse Adoptium\\jdk-8.0.362.9-hotspot\\jre\\bin\\java.dll",
        "size": 176128
    },
    {
        "base": "0x7ffd7c5e0000",
        "name": "zip.dll",
        "path": "C:\\Program Files\\Eclipse Adoptium\\jdk-8.0.362.9-hotspot\\jre\\bin\\zip.dll",
        "size": 98304
    },
    {
        "base": "0x7ffd8e3a0000",
        "name": "SHELL32.dll",
        "path": "C:\\WINDOWS\\System32\\SHELL32.dll",
        "size": 7622656
    },
    {
        "base": "0x7ffd8b5c0000",
        "name": "windows.storage.dll",
        "path": "C:\\WINDOWS\\SYSTEM32\\windows.storage.dll",
        "size": 7938048
    },
    {
        "base": "0x7ffd8fa50000",
        "name": "combase.dll",
        "path": "C:\\WINDOWS\\System32\\combase.dll",
        "size": 3493888
    },
    {
        "base": "0x7ffd8cf40000",
        "name": "Wldp.dll",
        "path": "C:\\WINDOWS\\SYSTEM32\\Wldp.dll",
        "size": 196608
    },
    {
        "base": "0x7ffd8df70000",
        "name": "SHCORE.dll",
        "path": "C:\\WINDOWS\\System32\\SHCORE.dll",
        "size": 708608
    },
    {
        "base": "0x7ffd8e0b0000",
        "name": "shlwapi.dll",
        "path": "C:\\WINDOWS\\System32\\shlwapi.dll",
        "size": 348160
    },
    {
        "base": "0x7ffd8d420000",
        "name": "profapi.dll",
        "path": "C:\\WINDOWS\\SYSTEM32\\profapi.dll",
        "size": 126976
    },
    {
        "base": "0x7ffd52540000",
        "name": "frida-agent-64.dll",
        "path": "C:\\Users\\blood\\AppData\\Local\\Temp\\frida-f53e53668f628fc701fcf91d3b18873e\\frida-agent-64.dll",
        "size": 18075648
    },
    {
        "base": "0x7ffd8dc60000",
        "name": "CRYPT32.dll",
        "path": "C:\\WINDOWS\\System32\\CRYPT32.dll",
        "size": 1400832
    },
    {
        "base": "0x7ffd8e270000",
        "name": "ole32.dll",
        "path": "C:\\WINDOWS\\System32\\ole32.dll",
        "size": 1220608
    },
    {
        "base": "0x7ffd8c960000",
        "name": "DNSAPI.dll",
        "path": "C:\\WINDOWS\\SYSTEM32\\DNSAPI.dll",
        "size": 831488
    },
    {
        "base": "0x7ffd81460000",
        "name": "Secur32.dll",
        "path": "C:\\WINDOWS\\SYSTEM32\\Secur32.dll",
        "size": 49152
    },
    {
        "base": "0x7ffd8d3d0000",
        "name": "SSPICLI.DLL",
        "path": "C:\\WINDOWS\\SYSTEM32\\SSPICLI.DLL",
        "size": 204800
    },
    {
        "base": "0x7ffd8c920000",
        "name": "IPHLPAPI.DLL",
        "path": "C:\\WINDOWS\\SYSTEM32\\IPHLPAPI.DLL",
        "size": 241664
    },
    {
        "base": "0x7ffd8f4a0000",
        "name": "NSI.dll",
        "path": "C:\\WINDOWS\\System32\\NSI.dll",
        "size": 32768
    }
]```


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

No branches or pull requests

2 participants