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.lang.ClassNotFoundException: Didn't find class on path #304

Open
FabioNevesRezende opened this issue Nov 16, 2023 · 1 comment

Comments

@FabioNevesRezende
Copy link

FabioNevesRezende commented Nov 16, 2023

I'm having this error when using Java.use trying to hook up into a java class under an Android 9 Virtual Machine from Android x86 project. The app is Uncrackable level 2 by OWASP. Steps to reproduce:

Run

frida -U -f owasp.mstg.uncrackable2 -l inject.js

where inject.js is:

console.log(`Injecting into process with PID ${Process.id}`)
console.log(`frida version: ${Frida.version}`)

const MainActivity = Java.use('sg.vantagepoint.uncrackable2.CodeCheck');

The output:

Injecting into process with PID 4276
frida version: 16.1.7
Error: java.lang.ClassNotFoundException: Didn't find class "sg.vantagepoint.uncrackable2.CodeCheck" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/system/lib64, /system/vendor/lib64, /system/lib64, /system/vendor/lib64]]
at (frida/node_modules/frida-java-bridge/lib/env.js:124)
at (frida/node_modules/frida-java-bridge/lib/env.js:115)
at apply (native)
at (frida/node_modules/frida-java-bridge/lib/env.js:97)
at (frida/node_modules/frida-java-bridge/lib/class-factory.js:488)
at value (frida/node_modules/frida-java-bridge/lib/class-factory.js:945)
at value (frida/node_modules/frida-java-bridge/lib/class-factory.js:950)
at _make (frida/node_modules/frida-java-bridge/lib/class-factory.js:165)
at use (frida/node_modules/frida-java-bridge/lib/class-factory.js:62)
at use (frida/node_modules/frida-java-bridge/index.js:258)
at (~/Desktop/test/inject.js:4)
at evaluate (native)
at (/frida/repl-2.js:1)

@eybisi
Copy link
Contributor

eybisi commented Jun 5, 2024

Make sure to wrap inject.js code inside the Java.perform

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