Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
888 stars 198 forks source link

Add JNI (Java Native Interface) type library #4710

Open xusheng6 opened 10 months ago

xusheng6 commented 10 months ago

This is very helpful for android native .so analysis

Workaround: import https://github.com/Ayrx/binja-typelibs-collection/blob/master/sources/jni_binja.h and set the type of the first parameter of JNI functions to JNIENV*

xusheng6 commented 10 months ago

Relevant plugin: https://github.com/evilpan/jni_helper

https://github.com/Ayrx/binja-JNIAnalyzer

tur11ng commented 10 months ago

I have tried some of those solutions in the past. But if I remember correctly there was some kind of issue or they failed to parse. I will try again some time. Anyways I wanted to mention this will be a great addition!

ExecuteProtect commented 10 months ago

This would be quite impactful, especially if we are getting support for containers anytime in the near future.

tur11ng commented 10 months ago

A further enhancement on this feature would be to resolve registerNatives calls if the JNI methods aren't provided in the form Java_com_foo_bar_Baz_Grill

xusheng6 commented 9 months ago

A further enhancement on this feature would be to resolve registerNatives calls if the JNI methods aren't provided in the form Java_com_foo_bar_Baz_Grill

This is totally do-able, but we likely leave it for a plugin author