frida / frida-java-bridge

Java runtime interop from Frida
318 stars 118 forks source link

Make _ZNK3art6Thread13DecodeJObjectEP8_jobject optional #289

Closed gsingh93 closed 1 year ago

gsingh93 commented 1 year ago

This will fix https://github.com/frida/frida/issues/2468

gsingh93 commented 1 year ago

As this is only used for Android 6 and lower, I think making it optional makes sense instead of having a fallback.

And as a sidenote, I think the current system of looking for these methods is prone to break often. I would suggest instead of attempting to find every method not marked as optional, we just find the version of android we're connecting to, and then have a list of APIs that were added/removed from each version. Then, if we have an API in the "removed" list for Android 7, it will still be required for Android 6 and lower, but not required for anything above Android 6.

gsingh93 commented 1 year ago

@oleavr can you run the checks that require approval?

AAGaming00 commented 1 year ago

Might be slightly off-topic, but how would I build a frida-server binary with these changes?'

nevermind just figured that out as i posted this

gsingh93 commented 1 year ago

The build instructions are the normal ones for Frida, except to use the local version of frida-java-bridge I had to make this modification to frida-gum: https://github.com/gsingh93/frida-gum/commit/dabfe43ecbeb1a83a02b4628e8f85c723accc206

I've asked in #288 what the right way to use a local version of this library is.